Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-process.rb requires permission to monitor processes #67

Open
jaylaprade opened this issue Oct 9, 2018 · 0 comments
Open

check-process.rb requires permission to monitor processes #67

jaylaprade opened this issue Oct 9, 2018 · 0 comments

Comments

@jaylaprade
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant