Sensu is so cool tool that I want to use that for application level metrics, therefore I tested it like this:
echo ‘{
“handlers”: “default”,
“name”: “sdtmetrics”,
“output”: “sdtmetrics.disk_usage.lolcats.used 9000000 1411131484”,
“status”: 0,
“type”: “metric”
}’ | nc -w1 127.0.0.1 3030
and from sensu-server log I can see metric is coming in:
{“timestamp”:“2015-06-07T09:29:44.675629+0300”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:“cat”,“name”:“stdout”},“output”:["{“id”:“fb67d43f-7c0e-4e3e-8926-73b6aec29c0a”,“client”:{“name”:“broker1”,“address”:“188.19.22.22”,“subscriptions”:[“broker1”,“common”,“brokers”],“environment code”:“test”,“environment description”:“TESTING”,“version”:“0.18.1”,“timestamp”:1433658577},“check”:{“handlers”:“default”,“name”:“sdtmetrics”,“output”:“sdtmetrics.disk_usage 1 1”,“status”:0,“type”:“metric”,“executed”:1433658584,“issued”:1433658584,“history”:[“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”],“total_state_change”:0},“occurrences”:1}"]}
But I can see that in influxdb, snippet from my conf:
“metrics”: {
“type”: “set”,
“handlers”: [
“debug”,
“influx”
]
},
All other metrics which are triggered from “server mode” are working just fine e.g. disk space etc
Thanks for any tips and tricks!
(I could not fund solution from any other place =)