NRDP

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.
peter19x
Posts: 119
Joined: Tue Dec 08, 2015 10:16 am

NRDP

Post by peter19x »

Hello,

I was able to install NRDP and make sure it is working fine.

I have sent some passive checks from my server to the nagios core but I do not know how I can see them in nagios core. I know that in Nagios XI I need to go to Unconfigured objects and accept them. How is it done in nagios core?

Thanks,
Peter
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP

Post by tmcdonald »

The Unconfigured Objects page in XI basically shows output from parsing the logs, specifically looking for any mentions of results found for a host/service that does not exist (is not in the CCM). It then lists the names there and gives you the option to configure them. In Core, you need to configure these by hand to match the exact names that are being sent in.
Former Nagios employee
peter19x
Posts: 119
Joined: Tue Dec 08, 2015 10:16 am

Re: NRDP

Post by peter19x »

Hello,

Thank you for the response. Is there a guide on how to do that ?

Best Regards,
Peter
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP

Post by tmcdonald »

Not for Core, no. That's an XI thing only, unfortunately.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRDP

Post by eloyd »

@donald may be overthinking this.

Since there is no "unconfigured objects" in Nagios Core, there is no guide on how to do it. But there are plenty of guides to installing hosts in Nagios Core, not the least of which is https://assets.nagios.com/downloads/nag ... bject.html.

What you need to do is search your /usr/local/nagios/var/nagios.log file for service check results for hosts/services that do not exist. Once you have that information, you can go build new config files (or add them to existing templates) to configure them.

As Nagios Core is always configured by changing configuration files on the filesystem, this is why a lot of people pay for XI - it makes [re-]configuration much easier. However, Nagios Core, because it only relies on configuration files, can be much more easily scripted and automated, so once you figure out how to do this once, you can write a cron job that will scan for unconfigured objects in your nagios.log file every 30 minutes (or whatever you want) and automatically add things it finds.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP

Post by tmcdonald »

Thanks for the added details, @eliod!
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRDP

Post by eloyd »

No problem, @TMCdonald.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP

Post by tmcdonald »

@peter19x did you have any related questions or are we good to close this up?
Former Nagios employee
peter19x
Posts: 119
Joined: Tue Dec 08, 2015 10:16 am

Re: NRDP

Post by peter19x »

Hello,

Sorry for the late reply.

I have done as you advised @Eloyd and my passive checks were not showed in the log file below:

Code: Select all

[root@GSIP_MGNT_A admin]# cat /usr/local/nagios/var/nagios.log
[1465772400] LOG ROTATION: DAILY
[1465772400] LOG VERSION: 2.0
[1465772400] CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.03 ms
[1465772400] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.00, 0.01, 0.05
[1465772400] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 1 users currently logged in
[1465772400] CURRENT SERVICE STATE: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden - 3737 bytes in 0.001 second response time
[1465772400] CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.03 ms
[1465772400] CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 2782 MB (75% inode=93%):
[1465772400] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.3 (protocol 2.0)
[1465772400] CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 100% free (8191 MB out of 8191 MB)
[1465772400] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 193 processes with STATE = RSZDT
[1465774181] Auto-save of retention data completed successfully.
[1465777781] Auto-save of retention data completed successfully.
[1465781381] Auto-save of retention data completed successfully.
[1465784981] Auto-save of retention data completed successfully.
Is this the way it should be done?

Thanks,
Peter
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRDP

Post by eloyd »

I am not sure what you did, specifically, since what I suggested was an idea, not a series of steps. I'll run through some steps here.

First, I used NRDP to send a passive check back to my Nagios server for a bogus host, and a bogus service on on that host. This is what shows up in the nagios.log:

Code: Select all

[1465828938] Error: Got host checkresult for 'NOTAREALHOST', but no such host can be found
[1465829018] Error: Got check result for service 'NOTAREALSERVICE' on host 'NOTAREALHOST'. Unable to find service
Now I can use grep on the nagios.log file to find "but no such host can be found" to look for hosts which show up as passive checks but aren't configured. I can also search for "Unable to find service" to look for services that are sending checks but aren't configured.

With that information, I could create a script which does this automatically, adds NOTAREALHOST to a basic template of simple hosts, and NOTAREALSERVICE to a basic template for simple service checks. Obviously, a disk check would have different requirements and alerting than a CPU or memory check, so you will need to program in some decisions based on the name of the service check.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked