Name: statsd-injector-release
Owner: Cloud Foundry
Description: null
Created: 2016-12-23 19:04:25.0
Updated: 2018-03-22 21:37:52.0
Pushed: 2018-05-23 21:08:32.0
Homepage: null
Size: 106
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Companion component to Metron that receives Statsd and emits to Metron.
statsd_injector
is to be colocated with a metron_agent
. It receives
metrics via UDP and will emit to metron-agent
via the Loggregator v2 api which is built on
gRPC.
submodule update --init --recursive
create-release
These instructions are colocating the job with metron_agent
.
Generate certs for statsd_injector
by running
scripts/generate-certs <loggregator-ca.crt> <loggregator-ca.key>
. The
Loggregator CA cert is generated from the loggregator release.
This script generates two files in ./statsd-injector-certs
that are used
as bosh properties.
Add the release to your deployment manifest.
ases:
version: latest
Then bosh upload release
the latest statsd-injector-release
bosh release.
Colocate the job that has metron_agent
.
:
name: some_job_z1
mplates:
name: metron_agent
release: loggegator
name: statsd_injector
release: statsd-injector
stances: 1
source_pool: default
tworks:
- name: default
operties:
metron_agent:
zone: z1
statsd_injector:
deployment: some_deployment_name
loggregator:
tls:
ca_cert: loggregator_cert
metron:
cert: metron_cert
key: metron_key
statsd_injector:
cert: <cert from script generation>
key: <key from script generation>
Then bosh deploy
this updated manifest.
Send it a metric
You can emit statsd metrics to the injector by sending a correctly formatted message to udp port 8125 on the job's VM.
As an example using nc
:
"origin.some.counter:1|c" | nc -u -w0 127.0.0.1 8125
NOTE: The injector expects the the name of the metric to be of the form <origin>.<metric_name>
Validate the metric can be seen.
Assuming you are using statsd-injector
with CF Release, you can use the
CF Nozzle plugin
ozzle -filter CounterEvent | grep <metric_name>