Hi,
I have set up sensu, I have created a process check using one of the plugins for the sensu github page. When I execute the check I get the output. But it does not appear in the sensu dashboard. I am not able to identify why is it not sending checks.
I am adding a few details below.
My json file is:
{
“checks”: {
“nginx_check”: {
“handlers”: [“default”],
“command”: “/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p nginx -C 1”,
“interval”: 60,
“subscribers”: [
“ALL”,
“Nginx”
]
}
}
``
This is the output I get when i execute the command:
CheckProcs CRITICAL: Found 0 matching processes; cmd /nginx/
``
When I check the logs I get this:
{“timestamp”:“2015-02-25T11:19:08.454519-0800”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}
{“timestamp”:“2015-02-26T01:17:35.703239+0530”,“level”:“warn”,“message”:“received signal”,“signal”:“TERM”}
{“timestamp”:“2015-02-26T01:17:35.706756+0530”,“level”:“warn”,“message”:“stopping”}
{“timestamp”:“2015-02-26T01:17:35.707976+0530”,“level”:“info”,“message”:“completing checks in progress”,“checks_in_progress”:}
{“timestamp”:“2015-02-26T01:17:36.219059+0530”,“level”:“warn”,“message”:“stopping reactor”}
{“timestamp”:“2015-02-26T01:17:37.635422+0530”,“level”:“warn”,“message”:“config file does not exist or is not readable”,“file”:"/etc/sensu/config.json"}
{“timestamp”:“2015-02-26T01:17:37.635543+0530”,“level”:“warn”,“message”:“ignoring config file”,“file”:"/etc/sensu/config.json"}
{“timestamp”:“2015-02-26T01:17:37.635599+0530”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:"/etc/sensu/conf.d"}
{“timestamp”:“2015-02-26T01:17:37.635645+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/client.json"}
{“timestamp”:“2015-02-26T01:17:37.635693+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/nginx.json"}
{“timestamp”:“2015-02-26T01:17:37.635768+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/nginx.json",“changes”:{“checks”:{“nginx_check”:[null,{“handlers”:[“default”],“command”:"/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p nginx -C 1",“interval”:60,“subscribers”:[“ALL”,“Nginx”]}]}}}
{“timestamp”:“2015-02-26T01:17:37.635841+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/check-ntp.json"}
{“timestamp”:“2015-02-26T01:17:37.635912+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/check-ntp.json",“changes”:{“checks”:{“apache_check”:[null,{“command”:"/etc/sensu/plugins/check-ntp.rb",“interval”:60,“subscribers”:[“ALL”,“ntp”]}]}}}
{“timestamp”:“2015-02-26T01:17:37.635964+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/redis.json"}
{“timestamp”:“2015-02-26T01:17:37.636017+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/redis.json",“changes”:{“redis”:[null,{“host”:“192.168.44.153”,“port”:6379}]}}
{“timestamp”:“2015-02-26T01:17:37.636064+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/api.json"}
{“timestamp”:“2015-02-26T01:17:37.636130+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/api.json",“changes”:{“api”:[null,{“host”:“192.168.44.153”,“port”:4567}]}}
{“timestamp”:“2015-02-26T01:17:37.636177+0530”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/rabbitmq.json"}
{“timestamp”:“2015-02-26T01:17:37.636249+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/rabbitmq.json",“changes”:{“rabbitmq”:[null,{“host”:“192.168.44.153”,“port”:5672,“vhost”:"/sensu",“user”:“sensu”,“password”:“REDACTED”}]}}
{“timestamp”:“2015-02-26T01:17:37.638748+0530”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}
``
Can some one please help me identify where is the issue is it because of RabbitMQ or Redis or Sensu API?
Thanks Looking forward for some help on this.
Adithya