Need help with Nagios Core service return codes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Tenttu
Posts: 9
Joined: Thu Mar 28, 2013 8:02 am

Need help with Nagios Core service return codes

Post 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!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need help with Nagios Core service return codes

Post 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.
Tenttu
Posts: 9
Joined: Thu Mar 28, 2013 8:02 am

Re: Need help with Nagios Core service return codes

Post 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). :P
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need help with Nagios Core service return codes

Post by slansing »

By default when following our documentation your new plugins are located in:

Code: Select all

/usr/local/nagios/libexec
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 :)
Tenttu
Posts: 9
Joined: Thu Mar 28, 2013 8:02 am

Re: Need help with Nagios Core service return codes

Post 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! ;)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Need help with Nagios Core service return codes

Post by abrist »

Do you have any more questions concerning return codes, or is this thread lock-ready?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Tenttu
Posts: 9
Joined: Thu Mar 28, 2013 8:02 am

Re: Need help with Nagios Core service return codes

Post by Tenttu »

I think that's enough information, so the thread is lock-ready. Thank you!
Locked