Wavexfront (Wavexfront v0.2.0) View Source
This guide provide the necessary to configure and use the Wavexfront and start monitoring your application
Configuration
The :wavexfront
application needs to be configured properly in order to work.
This configuration can be done, for example, in config/config.exs
:
config :wavexfront,
enabled: true,
histogram_1m: [
enabled: true,
host: "myhost.com"
]
This would enabled wavexfront and start a connection pool for the 1 minute histogram support. This will also send the metrics to "myhost.com" on default port 40001
:enabled
- Enable sending metrics to Wavefront proxy. If set tofalse
it is not even attempting to send them. If value is set to:log
, metrics will be showing in the logs. If set totrue
, metrics will attempt to forward to the the correct connection pool and proxy configured based on the type of metric sent. Default values isfalse
.- One or many configuration for each pool.
This library is quite configurable so you can decide where to send the metrics and how much concurrency you want for it (using pool connection)
There are currently 4 connection pools supported:
histogram_1m
: for Minute histograms metricshistogram_1h
: for Hourly histograms metricshistogram_1d
: for daily histograms metricscounter_and_gauge
: for counter and gauge metrics
Each connection pool has its own set of configuration. The following options are available
:enabled
- Wether to enable this connection pool or not. When false, the connection pool will not be started:host
- The host to send the metrics too. Default to localhost:port
- The port to connect to. Defaults are:- for histogram_1m: 40001
- for histogram_1h: 40002
- for histogram_1d: 40003
- for counter_and_gauge: 2878
:timeout
- Connection timeout:pool_size
- Number of connection in the pool
Sending metrics
In order to send metrics, a simple API exists. Currently we do not support storing locally metrics and then then send the data to the proxy. We expect the proxy to store histogram or counter value and take care of it. Which means need to talk to the same proxy.
For counter, you will need to store yourself the counter (in process, state or :ets table) if you decide to use them
Here is how you would send an histogram value
Wavexfront.send_histogram("my_histo", value: 2, source: "my_host", labels: [name: :value])
Link to this section Summary
Functions
Callback implementation for Application.start/2
.