sensu checks are not working from server

Hi,

I have sensu server client setup where server is CentOS 6.5 64 bit and client is RHEL 32 bit.
When trying to rub the checks from sensu server we are getting below kind of error and no checks are runnning. Please suggest what is the issue.

“event”:{“client”:{“name”:“manualslu”,“address”:“10.150.19.127”,“subscriptions”:[“test”,“webservers”,“production”,“disk”,“mysql”],“timestamp”:1401359898},“check”:{“type”:“metric”,“handlers”:[“graphite”],“command”:"/etc/sensu/plugin/process.sh -s Aricloud.hostname -s",“subscribers”:[“production”],“interval”:10,“name”:“process_metrics”,“issued”:1401359901,“executed”:1401359901,“output":"sh: /etc/sensu/plugin/process.sh: No such file or directory\n”,“status”:127,“duration”:0.005,“history”:[“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”]},“occurrences”:15418,“action”:“create”}

check":{“type”:“metric”,“command”:“disk-metrics.rb -s Aricloud.hostname -s.disk_usage”,“subscribers”:[“production”],“interval”:10,“handlers”:[“graphite”],“name”:“disk_metrics”,“issued”:1401359898,“executed”:1401374296,“output”:"sh: disk-metrics.rb: command not found\n",“status”:127,“duration”:0.004,“history”:[“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”]},“occurrences”:15407,“action”:“create”}

···


Subhadip

If you look on machine “manualslu” at 10.150.19.127, can you find the file /etc/sensu/plugin/process.sh?

The server puts a “check request” into the message queue. The client running on “manualslu” subscribes to that check (“production”), and tries to run the specified command “/etc/sensu/plugin/process.sh”. It fails because it doesn’t find the command locally on the machine.

Best regards,
Mojo

···

On Thu, May 29, 2014 at 3:44 AM, Subhadip Bagui i.bagui@gmail.com wrote:

Hi,

I have sensu server client setup where server is CentOS 6.5 64 bit and client is RHEL 32 bit.

When trying to rub the checks from sensu server we are getting below kind of error and no checks are runnning. Please suggest what is the issue.

“event”:{“client”:{“name”:“manualslu”,“address”:“10.150.19.127”,“subscriptions”:[“test”,“webservers”,“production”,“disk”,“mysql”],“timestamp”:1401359898},“check”:{“type”:“metric”,“handlers”:[“graphite”],“command”:"/etc/sensu/plugin/process.sh -s Aricloud.hostname -s",“subscribers”:[“production”],“interval”:10,“name”:“process_metrics”,“issued”:1401359901,“executed”:1401359901,“output":"sh: /etc/sensu/plugin/process.sh: No such file or directory\n”,“status”:127,“duration”:0.005,“history”:[“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”]},“occurrences”:15418,“action”:“create”}

check":{“type”:“metric”,“command”:“disk-metrics.rb -s Aricloud.hostname -s.disk_usage”,“subscribers”:[“production”],“interval”:10,“handlers”:[“graphite”],“name”:“disk_metrics”,“issued”:1401359898,“executed”:1401374296,“output”:"sh: disk-metrics.rb: command not found\n",“status”:127,“duration”:0.004,“history”:[“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”,“127”]},“occurrences”:15407,“action”:“create”}


Subhadip

Hi Morris,

As I checked in the client machine the file present there in filepath /etc/sensu/plugin/process.sh and I can run the file locally also from client. But when client trying to execute the checks its giving the error. I’m not sure what the issue can be.

Thanks,

Subhadip

I see! Maybe the script is looking for a command that isn’t found in the PATH when it’s executed, but is found when you run the script from your own environment’s PATH.

Mojo

···

On Thu, May 29, 2014 at 11:15 AM, Subhadip Bagui i.bagui@gmail.com wrote:

Hi Morris,

As I checked in the client machine the file present there in filepath /etc/sensu/plugin/process.sh and I can run the file locally also from client. But when client trying to execute the checks its giving the error. I’m not sure what the issue can be.

Thanks,

Subhadip