Cloud Foundry Firehose Nozzle for InfluxDB

April 7, 2017 ยท View on GitHub

This nozzle will take ValueMetric and CounterEvent metrics from the Cloud Foundry firehose and send them to an InfluxDB Server for storage. It can be horizontally scaled, as long as the subscription ID (see below) is the same across all instances

Build

./mvnw clean package

Run

Accepted Environment Variables

NameDescTypeRequiredDefault
INFLUXDB_NOZZLE_API_HOSTThe Cloud Countroller API HostStringY
INFLUXDB_NOZZLE_CLIENT_IDThe OAuth2 Client ID (must have doppler.firehose scope)StringY
INFLUXDB_NOZZLE_CLIENT_SECRETThe Secret for the above clientStringY
INFLUXDB_NOZZLE_FOUNDATIONIdentifying string to be added to all measurements as a tagStringN
INFLUXDB_NOZZLE_SKIP_SSL_VALIDATIONPlease don'tBooleanYfalse
INFLUXDB_NOZZLE_DB_NAMEThe Influx DB name (must exist)StringYmetrics
INFLUXDB_NOZZLE_DB_HOSTThe Influx DB URLStringYhttp://localhost:8086
INFLUXDB_NOZZLE_BATCH_SIZEThe batch size to be sent to Influx. Should be between 1 - 5000intY100
INFLUXDB_NOZZLE_BACKOFF_POLICYHow to backoff between retries (one of exponential, linear, or randomStringYexponential
INFLUXDB_NOZZLE_MIN_BACKOFFTime in millis to wait between retries, at leastlongY100
INFLUXDB_NOZZLE_MAX_BACKOFFTime in millis to wait between retries, at mostlongY30000
INFLUXDB_NOZZLE_MAX_RETRIESMax number of retries before giving upintY10
INFLUXDB_NOZZLE_SUBSCRIPTION_IDThe identifying string for the Cloud Foundry firehose. Must be the same across all instances, but must be unique from all other nozzles.StringYinfluxdb-nozzle
INFLUXDB_NOZZLE_TAG_FIELDSMetric fields that can be saved as InfluxDB tags. Current accepted values are job, index, deployment, tags, delta, unit. Must be sent as a JSON list. For example, ["job","index","unit"]StringY[]

Note about Batch Size: There is a direct correlation between the batch size and the amount of memory used. Running the app on Cloud Foundry, a batch size of 250 routinely uses around 550 MB RAM. A batch size of 500 will routinely go over 1 GB.