Hi
I’ve noticed that in one of my servers that I monitoring with Sensu gives me an error detecting a process:
{“timestamp”:“2016-03-17T15:07:38.062126+0100”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“xxxx.kimsufi.com”,“check”:{“name”:“cron”,“issued”:1458223705,“command”:"/etc/sensu/plugins/system/check-process.sh -p cron",“executed”:1458223658,“duration”:0.061,“output”:“CRITICAL - process cron does not exist\n”,“status”:2}}}
``
but If I run same script in the server the sh file shows another result!
[root@xxxx ~]# /etc/sensu/plugins/system/check-process.sh -p cron
PROCESS OK - cron
``
Server is a CentOS 6.X
Why this happens? Can I fix this in someway?
Thanks!
I notice that when you manually run the check you are doing so as root. Does it make a difference if you run it as the sensu user? One difference is that the sensu user doesn’t have a shell. I use the ruby version, so can’t directly compare.
···
On Thursday, 17 March 2016 14:11:23 UTC, Rubén Ortiz wrote:
Hi
I’ve noticed that in one of my servers that I monitoring with Sensu gives me an error detecting a process:
{“timestamp”:“2016-03-17T15:07:38.062126+0100”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“xxxx.kimsufi.com”,“check”:{“name”:“cron”,“issued”:1458223705,“command”:“/etc/sensu/plugins/system/check-process.sh -p cron”,“executed”:1458223658,“duration”:0.061,“output”:“CRITICAL - process cron does not exist\n”,“status”:2}}}
``
but If I run same script in the server the sh file shows another result!
[root@xxxx ~]# /etc/sensu/plugins/system/check-process.sh -p cron
PROCESS OK - cron
``
Server is a CentOS 6.X
Why this happens? Can I fix this in someway?
Thanks!
Hi!
that’s the point … I could not check as sensu because sensu does not have a valid bash. Anyway…it’s weird, I have other Centos 6x same setup and don’t show this kind of wrong result.
Can I don something to purge the client? Or I don’t know, something to reset sensu server at some level?
: /
Thanks!
···
On Thursday, March 17, 2016 at 4:17:56 PM UTC+1, joel....@nhs.net wrote:
I notice that when you manually run the check you are doing so as root. Does it make a difference if you run it as the sensu user? One difference is that the sensu user doesn’t have a shell. I use the ruby version, so can’t directly compare.
On Thursday, 17 March 2016 14:11:23 UTC, Rubén Ortiz wrote:
Hi
I’ve noticed that in one of my servers that I monitoring with Sensu gives me an error detecting a process:
{“timestamp”:“2016-03-17T15:07:38.062126+0100”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“xxxx.kimsufi.com”,“check”:{“name”:“cron”,“issued”:1458223705,“command”:“/etc/sensu/plugins/system/check-process.sh -p cron”,“executed”:1458223658,“duration”:0.061,“output”:“CRITICAL - process cron does not exist\n”,“status”:2}}}
``
but If I run same script in the server the sh file shows another result!
[root@xxxx ~]# /etc/sensu/plugins/system/check-process.sh -p cron
PROCESS OK - cron
``
Server is a CentOS 6.X
Why this happens? Can I fix this in someway?
Thanks!