I need to send plain-text to graphite from sensu.
I have sensu-plugin for cpu check(https://github.com/sensu-plugins/sensu-plugins-cpu-checks/blob/master/bin/check-cpu.rb) and the output is plaintext as below
“CheckCPU TOTAL OK: total=0.0 user=0.0 nice=0.0 system=0.0 idle=100.0 iowait=0.0 irq=0.0 softirq=0.0 steal=0.0 guest=0.0” which can be seen in Uchiwa.
Now I need to push this to graphite and created json file as below in sensu server:
“command”: " /usr/bin/env /etc/sensu/plugins/check-cpu.rb",
Issue is :
how to provide tree structure in above json file
how to parse the output to graphite in plaintext
Request to help me out.
Thanks in advance