This directory contains demo code for jmxtrans to Levitate remote write integration using jmxtrans Graphite output plugin pointing to vmagent.
jmxtrans/jmxtrans image does not work on MacOS M1 chipset. To test this docker-compose setup, please use a Linux variant.
- Update the following variables in docker-compose.yaml or update export them as environment variables
- $LEVITATE_REMOTE_WRITE_URL
- $LEVITATE_REMOTE_WRITE_USERNAME
- $LEVITATE_REMOTE_WRITE_PASSWORD
- Run
docker-compose up --build --force-recreate --remove-orphans
-
The above run should publish the sample app metrics to Levitate.
-
By default, graphite metrics are dumped in
a.b.c.d
format. This can lead to increase in metric names and remove the flexibility of labels i.e. instead of havingrequests{host='a'}
, without any transformation, the metric would show up asrequests.host.a
-
To address this, we leverage vmagent graphite relabeling. A sample setup is added in vmagent.yaml, which converts a flattened metric like
"metric": { "__name__": "sample.service.jvmapp_4000.sun_management_MemoryImpl.HeapMemoryUsage_committed", },
to
"metric": { "__name__": "HeapMemoryUsage_committed", "service": "sample_service", "instance": "jvmapp_4000", }
-
This sample vmagent.yaml can be modified for any other relabeling as required.