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

Running under NRPE (non-root) with defaults causes incorrect or unclear monitoring statuses #3

Open
markski2 opened this issue Jan 26, 2023 · 0 comments

Comments

@markski2
Copy link

When run under nagios/nrpe (non-root) the default log file location is set to /var/log which is not generally writable by anyone but root. The script attempts to run the dxcmd command and log the output, then grab the return code for driver status. However, running as non-root, you get a generic RC=1 from the OS (not dxcmd) because the logfile couldn’t be written. The script misinterprets this as driver state “STARTING” (RC=1 from dxcmd) and gives it an “OK” status for monitoring. I worked around this by relocating the logfile via the --logfile parameter but the script should really be checking writability of the log file, and certainly not failing silently with an "OK" status.

Similar issue with the location of the dxcmd/ndsconfig commands, if it can’t find them via --bindir or PATH, it just syntax errors out on the dxcmd/ndsconfig calls as the variables are null (however this is enough to present an "UNKNOWN" status). A clear message that the commands could not be located should really be surfaced to the nrpe message.

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