-
Notifications
You must be signed in to change notification settings - Fork 53
Description
In most environments, Sensu runs as the sensu user in the sensu group and sensu may not be able to see all the processes. While it may be obvious, if you run the command check-process.rb as root, you can monitor everything root can see. But, if you su to the sensu user, you can only see the processes that are owned by sensu.
Example:
[root@server]# /opt/sensu/embedded/bin/check-process.rb -p dovecot -w 1000 -c 1200
CheckProcess OK: Found 315 matching processes; cmd /dovecot/
[root@server]# sudo -u sensu /bin/bash
bash-4.2$ /opt/sensu/embedded/bin/check-process.rb -p dovecot
CheckProcess CRITICAL: Found 0 matching processes; cmd /dovecot/
Ultimately this is an environment issue and the fix will be to give the sensu user permission to run /opt/sensu/embedded/bin/check-process.rb as root, via visudo
That said, it would be helpful to a user to note this in the documentation.