NRDP, Freshness and Host status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

NRDP, Freshness and Host status

Post by johndoe »

Hi all,

For the sake of this question here is some details about my infrastructure:

- Servers run CentOS 5.6 (x86_64)
- Central monitoring server runs NagiosXI (latest) and Apache.
- I have /nrdp/ accessible and using SSL (no problems there)
- Nodes to be monitored have an installation of nagios core and send results via NRDP to the central server.
- We will be adding plenty of nodes in an ongoing basis hence all should be as automated as possible yet without turning into a spaghetti bolognaise of code and hacks.

Now here's how I've been doing things:

Usually I set up a new machine, use the base localhost.cfg (with the linux defaults) as base for the monitoring checks to be done, then on the central server I wait for the initial checks to come to the "Unconfigured objects", once they all arrive I click on the little blue arrow.

Now what I'm missing (a.k.a my questions):

Since these are passive checks I need to add some sort of freshness to them os that they are translated to critical or warning if some NRDP packages are not received. I've been doing this by clicking on "re-configure this service check" for each service check, my question here is: Is there a way to automate this so that I don't have to go and add the freshness one by one to all services? As you might understand everytime I add a new node/machine to be monitored that would mean i'd have to configure freshness on about 10 services...

My second question and also quite important is, even though the host is configured and receiving the passive checks (and all checks show green), the host status itself is still showing as "Host check is pending...", surely there is something missing since this should be "UP" or "Down" etc... On a side note I checked this http://nagios.sourceforge.net/docs/3_0/ ... ation.html and enabled it yet the status is still the same.. what am i missing here?

P.S: Hopefuly no flaming on why we use the above monitoring architecture, suffice to say we MUST run with this monitoring architecture.
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NRDP, Freshness and Host status

Post by mguthrie »

I would suggest just enabling freshness checking for the common template that they're all using, and setting the freshness threshold there. If you leave the freshness settings blank for all of those services they will just inherit the template values. That way you only have to make changes in one place.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: NRDP, Freshness and Host status

Post by johndoe »

@mguthrie, indeed followed your advice on this one, thanks.

@anyone that can help: Still some open questions above though regarding the host state.
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NRDP, Freshness and Host status

Post by mguthrie »

My second question and also quite important is, even though the host is configured and receiving the passive checks (and all checks show green), the host status itself is still showing as "Host check is pending...", surely there is something missing since this should be "UP" or "Down" etc... On a side note I checked this http://nagios.sourceforge.net/docs/3_0/ ... ation.html and enabled it yet the status is still the same.. what am i missing here?
For this question, a PENDING state exists when a host or service's current_state=0, and the last_check=0, meaning it has never received any results. Are you seeing this on passive checks that you should have already received results for?
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: NRDP, Freshness and Host status

Post by johndoe »

mguthrie, turns out i wasn't using the ochp correctly, i have now corrected this.

Now the host status itself is that of an http local check. Still on the same topic, is it possible that the host status itself adapts if say X services are Critical to change its status to DOWN ?

On a side note, what would i need to do to get the "Performance graphs" showing on passive service checks? I keep getting "No performance graphs were found for this service." :?
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: NRDP, Freshness and Host status

Post by SDohmen »

I can help you a bit with the performance graphs. Since we have just about precise the same setup it should be easy to adept the commands below to your own setup. Both commands are used on the core installation for sending everything to the central.

Code: Select all

define command{
        command_name    submit_check_result
        command_line    /usr/bin/php /usr/local/nrdp/clients/send_nrdp.php  --url=https://central.link/nrdp --token=randomcode --host=$HOSTNAME$ --service='$SERVICEDESC$' --state=$SERVICESTATEID$ --output='$SERVICEOUTPUT$ | $SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]'
}

define command{
        command_name    submit_host_result
        command_line    /usr/bin/php /usr/local/nrdp/clients/send_nrdp.php  --url=https://central.link/nrdp --token=randomcode --host=$HOSTNAME$ --state=$HOSTSTATEID$ --output='$HOSTOUTPUT$ | $HOSTPERFDATA$'
}
Both the host and service will have performance data added now to the nrdp output.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: NRDP, Freshness and Host status

Post by johndoe »

Legend SDohmen,
Thanks for the "code" bit, looks like some graphs are already starting to show...

Since you mentioned you're using a similar setup to the one we are just a suggestion from my site, instead of directly calling the send_nrdp.php script would be good for you to make a wrapper script that you can call in order to avoid repetition of the "--url=" and "--token=" (Just in case you need to change them one day.. then it would be centralized :) )

Nagios would call the wrapper script which then adds the central server location and the token to be used and passes those parameters to the send_nrdp.php script.

Just a suggestion and thanks for the inputs guys, this thread can now be closed as "Solved"
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk