View Sensu Metrics with Kibana

Hi, I’d like to visualize Sensu metrics with Logstash/Kibana, the logs seems fine but I get no data on Kibana.

==> /var/log/sensu/server.log <==

{“timestamp”:“2014-01-22T18:10:53.167055+0000”,“level”:“info”,“message”:“handler extension output”,“extension”:{“type”:“extension”,“name”:“debug”},“output”:"{“client”:{“name”:“sensu-server”,“address”:“127.0.0.1”,“safe_mode”:false,“subscriptions”:[“os”,“default”],“timestamp”:1390414238},“check”:{“type”:“metric”,“handlers”:[“default”],“command”:"/etc/sensu/plugins/system/vmstat-metrics.rb",“interval”:10,“subscribers”:[“os”],“name”:“vmstat_metrics”,“issued”:1390414252,“executed”:1390414252,“output”:“744b20924f41.vmstat.swap.in\t0\t1390414253\n744b20924f41.vmstat.swap.out\t0\t1390414253\n744b20924f41.vmstat.memory.cache\t1062892\t1390414253\n744b20924f41.vmstat.memory.swap_used\t0\t1390414253\n744b20924f41.vmstat.memory.free\t153012\t1390414253\n744b20924f41.vmstat.memory.buffers\t240388\t1390414253\n744b20924f41.vmstat.cpu.waiting\t0\t1390414253\n744b20924f41.vmstat.cpu.idle\t93\t1390414253\n744b20924f41.vmstat.cpu.system\t3\t1390414253\n744b20924f41.vmstat.cpu.user\t4\t1390414253\n744b20924f41.vmstat.system.interrupts_per_second\t550\t1390414253\n744b20924f41.vmstat.system.context_switches_per_second\t2645\t1390414253\n744b20924f41.vmstat.io.received\t0\t1390414253\n744b20924f41.vmstat.io.sent\t0\t1390414253\n744b20924f41.vmstat.procs.waiting\t0\t1390414253\n744b20924f41.vmstat.procs.uninterruptible\t0\t1390414253\n\n”,“status”:0,“duration”:1.042,“history”:[“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”]},“occurrences”:1}"}

logstash.conf

input{

stdin{}

file{

type => “syslog”

path => ["/var/log/*.log", “/var/log/syslog”]

}

zeromq {

type => “zeromq-type”

mode => “server”

topology => “pubsub”

address => “tcp://0.0.0.0:49021”

charset => “UTF-8”

format => “json_event”

}

}

output{

stdout{}

elasticsearch{

host => “127.0.0.1”

}

}

sensu config.js

“handlers”: {

“default”: {

“type”: “set”,

“handlers”: [“logstash”, “debug”]

},

“logstash”: {

“severities”: [

“ok”,

“warning”,

“critical”,

“unknown”

],

“socket”: {

“host”: “172.17.0.2”,

“port”: 49021

},

“type”: “tcp”,

“command”: “/etc/sensu/handlers/notification/logstash”

}

}

Do you know why? Or could link some working usage of this this handler https://github.com/sensu/sensu-community-plugins/blob/master/handlers/notification/logstash.rb ?

Thanks

Gy

It looks like you’re trying to connect a plain TCP socket from sensu-server to a zeromq pubsub socket on logstash. I don’t think this will work.

You could try listening on a plain TCP input socket in logstash http://logstash.net/docs/1.3.3/inputs/tcp

···

On Wed, Jan 22, 2014 at 10:41 AM, gy ty riccio@inmail.sk wrote:

Hi, I’d like to visualize Sensu metrics with Logstash/Kibana, the logs seems fine but I get no data on Kibana.

==> /var/log/sensu/server.log <==

{“timestamp”:“2014-01-22T18:10:53.167055+0000”,“level”:“info”,“message”:“handler extension output”,“extension”:{“type”:“extension”,“name”:“debug”},“output”:"{“client”:{“name”:“sensu-server”,“address”:“127.0.0.1”,“safe_mode”:false,“subscriptions”:[“os”,“default”],“timestamp”:1390414238},“check”:{“type”:“metric”,“handlers”:[“default”],“command”:"/etc/sensu/plugins/system/vmstat-metrics.rb",“interval”:10,“subscribers”:[“os”],“name”:“vmstat_metrics”,“issued”:1390414252,“executed”:1390414252,“output”:“744b20924f41.vmstat.swap.in\t0\t1390414253\n744b20924f41.vmstat.swap.out\t0\t1390414253\n744b20924f41.vmstat.memory.cache\t1062892\t1390414253\n744b20924f41.vmstat.memory.swap_used\t0\t1390414253\n744b20924f41.vmstat.memory.free\t153012\t1390414253\n744b20924f41.vmstat.memory.buffers\t240388\t1390414253\n744b20924f41.vmstat.cpu.waiting\t0\t1390414253\n744b20924f41.vmstat.cpu.idle\t93\t1390414253\n744b20924f41.vmstat.cpu.system\t3\t1390414253\n744b20924f41.vmstat.cpu.user\t4\t1390414253\n744b20924f41.vmstat.system.interrupts_per_second\t550\t1390414253\n744b20924f41.vmstat.system.context_switches_per_second\t2645\t1390414253\n744b20924f41.vmstat.io.received\t0\t1390414253\n744b20924f41.vmstat.io.sent\t0\t1390414253\n744b20924f41.vmstat.procs.waiting\t0\t1390414253\n744b20924f41.vmstat.procs.uninterruptible\t0\t1390414253\n\n”,“status”:0,“duration”:1.042,“history”:[“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”,“0”]},“occurrences”:1}"}

logstash.conf

input{

stdin{}

file{

type => “syslog”

path => ["/var/log/*.log", “/var/log/syslog”]

}

zeromq {

type => “zeromq-type”

mode => “server”

topology => “pubsub”

address => “tcp://0.0.0.0:49021

charset => “UTF-8”

format => “json_event”

}

}

output{

stdout{}

elasticsearch{

host => “127.0.0.1”

}

}

sensu config.js

“handlers”: {

“default”: {

“type”: “set”,

“handlers”: [“logstash”, “debug”]

},

“logstash”: {

“severities”: [

“ok”,

“warning”,

“critical”,

“unknown”

],

“socket”: {

“host”: “172.17.0.2”,

“port”: 49021

},

“type”: “tcp”,

“command”: “/etc/sensu/handlers/notification/logstash”

}

}

Do you know why? Or could link some working usage of this this handler https://github.com/sensu/sensu-community-plugins/blob/master/handlers/notification/logstash.rb ?

Thanks

Gy