You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: