sensu-graphite plaintext output

Hi ,

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:

{

“checks”: {

“CpuPlain”: {

“command”: " /usr/bin/env /etc/sensu/plugins/check-cpu.rb",

“handlers”: [“graphite”],

“output_format”: “graphite_plaintext”,

“interval”: 30,

“subscribers”: [

“default”

]

}

}

}

Issue is :

  1. how to provide tree structure in above json file

  2. how to parse the output to graphite in plaintext

Request to help me out.

Thanks in advance

Hi All,

I am waiting for the response.Please suggest.

···

On Wednesday, January 6, 2016 at 12:27:22 PM UTC+5:30, kumar kittu wrote:

Hi ,

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:

{

“checks”: {

“CpuPlain”: {

“command”: " /usr/bin/env /etc/sensu/plugins/check-cpu.rb",

“handlers”: [“graphite”],

“output_format”: “graphite_plaintext”,

“interval”: 30,

“subscribers”: [

“default”

]

}

}

}

Issue is :

  1. how to provide tree structure in above json file
  1. how to parse the output to graphite in plaintext

Request to help me out.

Thanks in advance

HI ,

Please help me out.

···

On Wednesday, January 6, 2016 at 12:27:22 PM UTC+5:30, kumar kittu wrote:

Hi ,

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:

{

“checks”: {

“CpuPlain”: {

“command”: " /usr/bin/env /etc/sensu/plugins/check-cpu.rb",

“handlers”: [“graphite”],

“output_format”: “graphite_plaintext”,

“interval”: 30,

“subscribers”: [

“default”

]

}

}

}

Issue is :

  1. how to provide tree structure in above json file
  1. how to parse the output to graphite in plaintext

Request to help me out.

Thanks in advance

Is there some particular reason you don’t want to collect the CPU metrics?

I use metrics-cpu-mpstat.rb to collect all the CPU metrics and then push them to graphite using wizardvan (sensu-metrics-relay) https://github.com/opower/sensu-metrics-relay.

Cheers,

Joel

···

On Friday, 29 January 2016 11:20:33 UTC, kumar kittu wrote:

HI ,

Please help me out.

On Wednesday, January 6, 2016 at 12:27:22 PM UTC+5:30, kumar kittu wrote:

Hi ,

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:

{

“checks”: {

“CpuPlain”: {

“command”: " /usr/bin/env /etc/sensu/plugins/check-cpu.rb",

“handlers”: [“graphite”],

“output_format”: “graphite_plaintext”,

“interval”: 30,

“subscribers”: [

“default”

]

}

}

}

Issue is :

  1. how to provide tree structure in above json file
  1. how to parse the output to graphite in plaintext

Request to help me out.

Thanks in advance