Help with NRDS?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Help with NRDS?

Post by jbennett »

I've finally been able to look into NRDS some.

It really looks like this might be the best option for us for SNMP checks, NRPE checks, and Traps all in one.

It will make pushing out the changes to all of the hosts a heck of a lot easier.

I suppose I can abandon this thread and start a new one for NRDS? It looks like the component was already installed on the old box and copied over when I moved to the new box.

When I click on the NRDS config manager, I see the following:

Code: Select all

You need to configure the NRDP server 
before you can create a NRDS config.

You must have the version 1.2 or greater of the NRDP Server before you can create a NRDS config.
Apparently, the NRDP server is already installed on this box, but I was getting an error that it wasn't the 1.2 version so I downloaded it and ran through the document here: http://assets.nagios.com/downloads/nrdp ... erview.pdf

I am able to input the token to test the nagios commands and the check data. I get an ok on the commands and the following on the check data:

Code: Select all

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<result>
<status>0</status>
<message>OK</message>
<meta>
<output>2 checks processed.</output>
</meta>
</result>
However, when I click back on the NRDS Config manager link, I get the following:

Code: Select all

You must have the version 1.2 or greater of the NRDP Server before you can create a NRDS config.
I'm guessing there's a better way to update NRDP?
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with NRDS?

Post by jbennett »

I just checked the /usr/local/nrdp/server/config.inc.php file to see if there might be something else I needed to configure and I came across this:

Code: Select all

///////// DONT MODIFY ANYTHING BELOW THIS LINE /////////

$cfg['product_name']='nrdp';
$cfg['product_version']='1.0'
Thinking that the file might have been old from the previous install, I downloaded NRDP again (http://assets.nagios.com/downloads/nrdp/nrdp.zip) and checked the config.inc.php file in there to see if it had a newer version.

It still lists 1.0 as the version in that file as well.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with NRDS?

Post by scottwilkerson »

NRDS contains special plugins added to NRDP

Please run

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
./install.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with NRDS?

Post by jbennett »

scottwilkerson wrote:NRDS contains special plugins added to NRDP

Please run

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
./install.sh

Code: Select all

# ./install.sh
NRDS already installed
I had already tried removing the component and uploading it again. WHen I did this, I was presented with the instructions to follow on the Nagios server putty session, which I did. Now, when I go back to the manage components page, I only see the following. The instructions to complete the install are no longer there.

Code: Select all

NRDS Config Manager
This component allows administrators to manage their NRDS config files to be distributed to remote clients. 
Version: 1.2 Date: 02/27/2012 Author: Scott Wilkerson. Nagios Enterprises, LLC
For measure, I tried removing the component and uploading once more. Upon uploading again, I get the install instructions again:

Code: Select all

]# ./installnrds
--2013-03-28 15:07:59--  http://assets.nagios.com/downloads/nrdp/nrds.tar.gz
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:5865... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
2013-03-28 15:07:59 ERROR 407: Proxy Authentication Required.

NRDS Server component installed sucessfully
On the Nagios server:

Code: Select all

]# ./installnrds
--2013-03-28 15:07:59--  http://assets.nagios.com/downloads/nrdp/nrds.tar.gz
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:5865... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
2013-03-28 15:07:59 ERROR 407: Proxy Authentication Required.

NRDS Server component installed sucessfully
I realize it tells me auth required, but then it tells me tat the server component installed successfully?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with NRDS?

Post by scottwilkerson »

Ok, the component zip installed but we need to get the package through the proxy

Follow the info here to adjust your /etc/wgetrc proxy settings

Code: Select all

http://support.nagios.com/wiki/index.php/Nagios_XI:FAQs#Problems_Using_Nagios_XI_With_Proxies
Then run

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
rm -f installed.nrds
./install.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with NRDS?

Post by jbennett »

I tried this on our old server. I have more control over this old server and I can get out via proxy via CNTLM without having to submit a ticket to the server guys. If I can get it working here, I will have to submit a ticket to the server guys to have them open up the new server for the installs and I will have to provide them with step-by-step instructions.

Here is what I've been able to do so far on the old server:

Uploaded the nrdsconfigmanager.zip to the 'Manage Components' page and followed the resulting instructions:

Code: Select all

[root@nagiosxivm ~]# cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
[root@nagiosxivm nrdsconfigmanager]# chmod +x installnrds
[root@nagiosxivm nrdsconfigmanager]# ./installnrds
wget: Unknown command âproxy_usernameâ
                                      --2013-04-01 14:19:08--  http://assets.nagios.com/downloads/nrdp/nrds.tar.gz
Resolving proxy.company.org... xxx.xxx.xxx.xxx
Connecting to proxy.company.org|xxx.xxx.xxx.xxx|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 19841685 (19M) [application/x-gzip]
Saving to: ânrds.tar.gzâ

100%[======================================>] 19,841,685  9.65M/s   in 2.0s

2013-04-01 14:19:14 (9.65 MB/s) - ânrds.tar.gzâ


    ##################################
    #
    # Adding NRDS to NRDP Server
    #
    ##################################

copying files...
Updating permissions...
updating NRDP server config...

    ##################################
    #
    # NRDS update complete.
    # You will also want to install the NRDS Config Manager
    # component if you have not done so already.
    #
    ##################################

NRDS Server component installed sucessfully
I now have the NRDS Config Manager menu item under the CCM -> Monitoring Config section. I was able to copy the token that is provided here for use in the config.inc.php file for the NRDP server below.

Now to install & configure the NRDP server:

Code: Select all

[root@nagiosxivm nrdsconfigmanager]# cd /tmp
[root@nagiosxivm tmp]# wget http://assets.nagios.com/downloads/nrdp/nrdp.zip
wget: Unknown command âproxy_usernameâ
                                      --2013-04-01 14:30:21--  http://assets.nagios.com/downloads/nrdp/nrdp.zip
Resolving proxy.company.org... xxx.xxx.xxx.xxx
Connecting to proxy.company.org|xxx.xxx.xxx.xxx|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 16664 (16K) [application/zip]
Saving to: ânrdp.zipâ

100%[===================================================================================================================>] 16,664      --.-K/s   in 0s

2013-04-01 14:30:21 (125 MB/s) - ânrdp.zipâ
[root@nagiosxivm tmp]# unzip nrdp.zip
Archive:  nrdp.zip
   creating: nrdp/
  inflating: nrdp/CHANGES.TXT
   creating: nrdp/clients/
  inflating: nrdp/clients/send_nrdp.php
  inflating: nrdp/install-html
  inflating: nrdp/INSTALL.TXT
  inflating: nrdp/LICENSE.TXT
  inflating: nrdp/nrdp.conf
   creating: nrdp/server/
  inflating: nrdp/server/config.inc.php
   creating: nrdp/server/includes/
  inflating: nrdp/server/includes/constants.inc.php
  inflating: nrdp/server/includes/utils.inc.php
  inflating: nrdp/server/index.php
   creating: nrdp/server/plugins/
   creating: nrdp/server/plugins/nagioscorecmd/
  inflating: nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php
   creating: nrdp/server/plugins/nagioscorepassivecheck/
  inflating: nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php
[root@nagiosxivm tmp]# mkdir /usr/local/nrdp
mkdir: cannot create directory `/usr/local/nrdp': File exists
[root@nagiosxivm tmp]# cd nrdp
[root@nagiosxivm nrdp]# cp -r * /usr/local/nrdp
cp: overwrite `/usr/local/nrdp/CHANGES.TXT'? y
cp: overwrite `/usr/local/nrdp/clients/send_nrdp.php'? y
cp: overwrite `/usr/local/nrdp/install-html'? y
cp: overwrite `/usr/local/nrdp/INSTALL.TXT'? y
cp: overwrite `/usr/local/nrdp/LICENSE.TXT'? y
cp: overwrite `/usr/local/nrdp/nrdp.conf'? y
cp: overwrite `/usr/local/nrdp/server/config.inc.php'? y
cp: overwrite `/usr/local/nrdp/server/includes/utils.inc.php'? y
cp: overwrite `/usr/local/nrdp/server/includes/constants.inc.php'? y
cp: overwrite `/usr/local/nrdp/server/index.php'? y
cp: overwrite `/usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php'? y
cp: overwrite `/usr/local/nrdp/server/plugins/nagioscorecmd/nagioscorecmd.inc.php'? y
[root@nagiosxivm nrdp]# chown -R nagios.nagios /usr/local/nrdp
[root@nagiosxivm nrdp]# vi /usr/local/nrdp/server/config.inc.php
.
.
.
// an array of one or more tokens that are valid for this NRDP install
// a client request must contain a valid token in order for the NRDP to response or honor the request
// NOTE: tokens are just alphanumeric strings - make them hard to guess!
$cfg['authorized_tokens'] = array(
        "token_example",
        );
.
.
.
[root@nagiosxivm nrdp]# cp nrdp.conf /etc/httpd/conf.d
cp: overwrite `/etc/httpd/conf.d/nrdp.conf'? y
[root@nagiosxivm nrdp]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Now, when I go to the NRDP server page and test the checks with the token I entered into the config.inc.php page, I get OKs in return.

However, when I go back to the NRDS Config Manager page, I get the same error message:

Code: Select all

You must have the version 1.2 or greater of the NRDP Server before you can create a NRDS config.
When I check the bottom of the /usr/local/nrdp/server/config.inc.php file, I see the following again:

Code: Select all

///////// DONT MODIFY ANYTHING BELOW THIS LINE /////////

$cfg['product_name']='nrdp';
$cfg['product_version']='1.0'


?>
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with NRDS?

Post by scottwilkerson »

jbennett wrote: Uploaded the nrdsconfigmanager.zip to the 'Manage Components' page and followed the resulting instructions:
This looks good
jbennett wrote:Now to install & configure the NRDP server:
This is where you are going wrong... NRDP is already installed and when you do this you are rolling back to a previous version that doesn't include the NRDS addons.

To resolve the issue, run this

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
rm installed.nrds
./installnrds
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with NRDS?

Post by jbennett »

AH HA!

So then, the NRDS document doesn't even come into the picture in this instance?

This makes things a whole lot easier. :)
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Help with NRDS?

Post by jbennett »

Ok - I was able to get this configured and was able to go through the config manager and create a new config for a Linux machine using the provided sample config.

I then followed the instructions from the client install instructions as the document says:

Code: Select all

host_name:~ # cd /tmp
host_name:/tmp # wget -O xxx.xxx.xxx.xxx.tar.gz "http://nagiosserver/nrdp/?cmd=nr                                                                             dsgetclient&token=6nkf34brogs6&configname=xxx.xxx.xxx.xxx"
--15:59:16--  http://nagiosserver/nrdp/?cmd=nrdsgetclient&token=6nkf34brogs6&con                                                                             figname=xxx.xxx.xxx.xxx
           => `xxx.xxx.xxx.xxx.tar.gz'
Connecting to xxx.xxx.xxx.xxx:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14,650 (14K) [application/octet-stream]

100%[====================================>] 14,650        --.--K/s

15:59:16 (1.91 MB/s) - `xxx.xxx.xxx.xxx.tar.gz' saved [14650/14650]

host_name:/tmp # gunzip -c xxx.xxx.xxx.xxx.tar.gz | tar xf -
tar: clients/1-usersgroups: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/installnrds: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/send_nrdp.sh: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/init.sh: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/nrds/nrds.cfg: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/nrds/nrds.pl: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/nrds/nrds_updater.pl: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/nrds/nrds_common.pl: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/nrds: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/send_nrdp.py: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients/send_nrdp.php: time stamp 2013-04-01 16:01:50 is 154 s in the future
tar: clients: time stamp 2013-04-01 16:01:50 is 154 s in the future
host_name:/tmp # cd clients
host_name:/tmp/clients # ./installnrds xxx.xxx.xxx.xxx 1
nagios group already exists.
nagios user already exists.
Installing NRDS Client

Adding cron jobs for xxx.xxx.xxx.xxx at a 1 minute interval

Crontabs installed OK
Updating config and plugins
Updated config to version 0.1 Updated 5 plugins
Installation complete
host_name:/tmp/clients # date
Mon Apr  1 15:59:43 CDT 2013
host_name:/tmp/clients #
I'm then going to the unconfigured objects manager and I'm not seeing this host come up. I can also check in the config manager for hsots and services, and I won't find anything related.

So close, yet so far...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with NRDS?

Post by scottwilkerson »

is cron running on this remote machine?

Do you see any errors, and can you see it running in the cron log

Code: Select all

tail -f /var/log/cron
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked