Uses old Rust 2015
|0.1.3||May 4, 2017|
|0.1.2||Mar 21, 2017|
|0.1.1||Feb 20, 2017|
|0.1.0||Feb 19, 2017|
#61 in #metrics
capella is an aysnchronous StatsD server written in Rust.
# Install from crates.io. cargo install capella # Building capella with optimizations. cargo build --release # Running the unit tests. cargo test
capella uses an environment variable based configuration file named
capella.env. capella expects
this file to be in the same directory as the binary. Currently the necessary configuration values
needed are as follows:
# The connection string for the graphite host. It includes an IP address as well as a port. CAPELLA_GRAPHITE_CONNECTION=127.0.0.1:2003 # The address and port on which capella should listen. CAPELLA_LISTENER=127.0.0.1:8125 # The flushing duration defines how long capella buffers metrics before sending to graphite. # It is defined in seconds. CAPELLA_FLUSH_DURATION=10 # Set the log level for the `env_logger` module. RUST_LOG=info
capella supports the four metrics that StatsD implements. They are counter, gauges, timers, and sets.
Counters represent metrics that can only increase. Counters can also have an associated sampling rate that tells capella that a metric is only being sent for a fraction of the time.
# This tells capella that the rate is only being sent once every half of the flush duration. counter:email@example.com
Gauges are metrics that can fluctuate both negatively and postively. They are similar to a gauge in a car.
# This subtracts one from the current value for the "gauge" key. gauge:-1|g
Sets are metrics that hold a unique collection of values. The metric derived by capella for this type is the cardinality of the set.
# Add a new value to the set which is only added if it doesn't exist. set:11|s
Timers are unique in that many statistics are derived from them. Per flush duration, timers generate the following:
- Minimum value
- Maximum value
- Standard Deviation
- 95th Percentile
Timers also support sampling.
Currently capella is not nearly as configurable as the original StatsD. It may never be but support for the most used options will be added on an as-needed basis. capella will continue to add unit tests to increase code coverage and ensure that metrics handling is identical to StatsD. Please open issues to ask questions about adding features or to point out bugs.
capella is released under the MIT license.