Page 1 of 1
Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 8:08 am
by Tenttu
Hello!
I've installed Nagios Core on CentOS 6.3 (32-bit) and it's mostly working quite good but i ran into a problem with the service return codes. Is it possible to give some labels for the codes? For example, if a service check returns a code 4 (which is "timeout"), is it possible to make the text "timeout" visible on the services -page? As default it only shows "SNMP CRITICAL - *4*". It would be a lot better if it would be like "SNMP CRITICAL - *timeout(4)*" or something like that.
Thanks in advance!
Re: Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 9:20 am
by slansing
That depends on the plugin, the output text in a service's description is governed by the plugin script. You could modify this, but be sure to check the licensing on the plugin.
Re: Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 10:10 am
by Tenttu
I must admit that i'm not too advanced with linux and/or nagios, so i apologize for any stupid questions in advance!
First, what do you actually mean by "That depends on the plugin" ? I've downloaded and installed the official nagios plugins from the main nagios site. Also where are the plugin scripts located? I didn't find them in the main nagios folder or it's sub folders (or i might've missed them also).

Re: Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 11:31 am
by slansing
By default when following our documentation your new plugins are located in:
This is also where you will need to add new plugins to be used locally. If you were, for instance to install the NRPE agent on a remote server, you would also compile the Nagios plugins there, and they would be in the same location "most likely" as shown above.
What I meant by "it depends on the plugin" is that those error codes are pulled from the plugin file itself. Say, for instance you were unable to make a NRPE connection, you may see an error such as NRPE: Unable to complete SSL handshake.. This error is defined within check_NRPE itself and would need to be altered there.
No question is a stupid question

Re: Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 12:14 pm
by Tenttu
Yep i followed your documentation so i will look again in that folder.. As i had worked on my thesis/project many, many hours already at that point, i'm sure i've just browsed cross-eyed through that folder without actually "looking" in it!
And thanks for explaining your previous plugin comment that puzzled me!

Re: Need help with Nagios Core service return codes
Posted: Thu Mar 28, 2013 2:38 pm
by abrist
Do you have any more questions concerning return codes, or is this thread lock-ready?
Re: Need help with Nagios Core service return codes
Posted: Fri Mar 29, 2013 5:45 am
by Tenttu
I think that's enough information, so the thread is lock-ready. Thank you!