Hi,
What is the general troubleshooting process for event handler debugging in Nagios?
Stuart
event handler question
Re: event handler question
The first step is always making sure the actual script works. Make sure you aren't testing it just as the root user - it will be run as the nagios user so make sure it works in that context.
Then typically I have it write to a file in a location it would have permission to do so, just to make sure it is firing properly. If this fails double-check the permissions and try writing the file as the nagios user.
After that it's just a matter of adding functionality and unit-testing as you go. Log files are useful for seeing what fails and when in your script, and debugging output can show you each step as it is run.
Then typically I have it write to a file in a location it would have permission to do so, just to make sure it is firing properly. If this fails double-check the permissions and try writing the file as the nagios user.
After that it's just a matter of adding functionality and unit-testing as you go. Log files are useful for seeing what fails and when in your script, and debugging output can show you each step as it is run.
Former Nagios employee