Page 1 of 1
Gettign more verbose from the service test button
Posted: Tue Mar 08, 2016 8:42 am
by psteam
I am building script to suit my system. It’s mostly bash scripts. Now what I have been struggling the most is that my script works from the cli of Nagios itself but don’t work when I do the test service. It returns empty fields. After a bit of a headache I figured out its a path not passed… Anyway I noticed that there is no error messages that come out from the nagiosxi interface. I searched a bit and found some places that they say stderr is not captured my Nagios. Is there a way to enable stderr message to show up in the test service ?
Re: Gettign more verbose from the service test button
Posted: Tue Mar 08, 2016 3:27 pm
by lmiltchev
Is there a way to enable stderr message to show up in the test service ?
The "Test Check Command" in the CCM is placed there for convenience. It's not a substitute for testing from the CLI. In fact, in some cases it fails (DB checks, escaping issues, etc.). You can even have a check that fails when tested in the CCM but it works just fine in the GUI.
I would recommend testing your scripts mainly from the command line, not from within the CCM. Here's a document on how to manage plugins in XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Gettign more verbose from the service test button
Posted: Tue Mar 08, 2016 9:57 pm
by Box293
You also might want to check out this presentation:
https://support.nagios.com/kb/article.php?id=448