Sensu client not sending checks

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

I tried enabling ssl on RabbitMQ.

After that I get this in my sensu-client.log

{“timestamp”:“2015-02-26T02:26:01.198066+0530”,“level”:“warn”,“message”:“received signal”,“signal”:“TERM”}
{“timestamp”:“2015-02-26T02:26:01.198255+0530”,“level”:“warn”,“message”:“stopping”}
{“timestamp”:“2015-02-26T02:26:01.198306+0530”,“level”:“info”,“message”:“completing checks in progress”,“checks_in_progress”:}
{“timestamp”:“2015-02-26T02:26:01.699881+0530”,“level”:“warn”,“message”:“stopping reactor”}
{“timestamp”:“2015-02-26T02:26:03.022979+0530”,“level”:“warn”,“message”:“config file does not exist or is not readable”,“file”:“/etc/sensu/config.json”}
{“timestamp”:“2015-02-26T02:26:03.023094+0530”,“level”:“warn”,“message”:“ignoring config file”,“file”:“/etc/sensu/config.json”}
{“timestamp”:“2015-02-26T02:26:03.023148+0530”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:“/etc/sensu/conf.d”}
{“timestamp”:“2015-02-26T02:26:03.023192+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/client.json”}
{“timestamp”:“2015-02-26T02:26:03.023237+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/nginx.json”}
{“timestamp”:“2015-02-26T02:26:03.023307+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-26T02:26:03.023377+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/check-ntp.json”}
{“timestamp”:“2015-02-26T02:26:03.023441+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/check-ntp.json”,“changes”:{“checks”:{“ntp_check”:[null,{“command”:“/etc/sensu/plugins/check-ntp.rb”,“interval”:60,“subscribers”:[“ALL”,“ntp”]}]}}}
{“timestamp”:“2015-02-26T02:26:03.023488+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/redis.json”}
{“timestamp”:“2015-02-26T02:26:03.023541+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-26T02:26:03.023587+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/api.json”}
{“timestamp”:“2015-02-26T02:26:03.023642+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-26T02:26:03.023687+0530”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/rabbitmq.json”}
{“timestamp”:“2015-02-26T02:26:03.023766+0530”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/rabbitmq.json”,“changes”:{“rabbitmq”:[null,{“ssl”:{“cert_chain_file”:“/etc/sensu/ssl/cert.pem”,“private_key_file”:“/etc/sensu/ssl/key.pem”},“host”:“192.168.44.153”,“port”:5671,“vhost”:“/sensu”,“user”:“sensu”,“password”:“REDACTED”}]}}
{“timestamp”:“2015-02-26T02:26:03.026307+0530”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:“/etc/sensu/extensions”}
<SSL_incomp>{“timestamp”:“2015-02-26T02:26:03.130447+0530”,“level”:“warn”,“message”:“reconnecting to transport”}
<SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp><SSL_incomp>

``

Now the clients also don’t show up.

···

On Thursday, February 26, 2015 at 1:33:08 AM UTC+5:30, Adithya Khamithkar wrote:

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