NRDS Passive Checks - Questions
NRDS Passive Checks - Questions
All my LINUX/AIX system are configured to use passive checks. that means that that in NRDS configuration Manager I have one configuration for each platform these configrations we have created generic enough so that can be applied to all my systems. but in some cases some clients require additional checks. I would like to see if it's possible to assign two configuration to two systems. What I am trying to avoid is create a configuration for each client. Eventually I am going to end up with hundreds of configurations
Re: NRDS Passive Checks - Questions
You cannot set a remote host to use multiple configuration files as multiple configs would overwrite each other - it would just take whichever was pulled latest. However, you should be able to use the same configuration file on the NRDS server (Nagios XI) for multiple remote hosts. Using multiple configs on the NRDS client could be a good feature request candidate thought.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRDS Passive Checks - Questions
You could manually place a different config in there and adjust your cron in /var/spool/cron/nagios from:
To:
That way it will run both.
Note: If you run the installer again after making this change it WILL overwrite your cron entries and you'll need to re-implement them.
I've already submitted a feature request for this.
Code: Select all
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'TEST1' 2>&1Code: Select all
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'TEST1' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'TEST1' -c /path/to/your/second/nrds.cfg 2>&1Note: If you run the installer again after making this change it WILL overwrite your cron entries and you'll need to re-implement them.
I've already submitted a feature request for this.
Re: NRDS Passive Checks - Questions
it worked, however it does seem to update the config on the client side. I added few more check on the new config but that hasn't been added. I have seen this issue before where clients dont get the updates, but I just don;t remember what the issue is
Re: NRDS Passive Checks - Questions
ssax's suggestion worked for me. I updated both configs in the "NRDS Config Manager" in XI, and both configs updated on the client as well. Here's what I tried (as an example):
Did you set up your configs in a similar way? Can you successfully run the cron commands manually?
What are the permissions of the "/path/to/your/second/nrds.cfg" file?
Code: Select all
[root@192 nrds]# pwd
/usr/local/nrdp/clients/nrds
[root@192 nrds]# ls
misc nrds.cfg nrds.pl nrds_common.pl nrds_updater.pl
[root@192 nrds]# ll misc/
total 4
-rwxrwxr-x 1 nagios nagios 435 Jul 7 17:04 nrds.cfg
[root@192 nrds]# cat nrds.cfg
CONFIG_VERSION="1.1"
CONFIG_OS="Linux"
CONFIG_NAME="mod-gearman"
URL="http://192.168.x.x/nrdp/"
TOKEN="mytoken"
PLUGIN_DIR="/usr/local/nagios/libexec"
SEND_NRDP="/usr/local/nrdp/clients/send_nrdp.sh"
TMPDIR="/usr/local/nrdp/clients/tmp"
COMMAND_PREFIX=""
LOG_FILE=""
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
command[__HOST__]=/usr/local/nagios/libexec/check_ping -H localhost -w 200.0,40% -c 400.0,80% -p 1
command[Check Users]=/usr/local/nagios/libexec/check_users -w 2 -c 5
command[Check Load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[Check Disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
command[Check Zombie Procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[Check Total Procs]=/usr/local/nagios/libexec/check_procs -w 300 -c 500
[root@192 nrds]# cat misc/nrds.cfg
CONFIG_VERSION="0.6"
CONFIG_OS="Linux"
CONFIG_NAME="mod-gearman2"
URL="http://192.168.x.x/nrdp/"
TOKEN="mytoken"
PLUGIN_DIR="/usr/local/nagios/libexec"
SEND_NRDP="/usr/local/nrdp/clients/send_nrdp.sh"
TMPDIR="/usr/local/nrdp/clients/tmp"
COMMAND_PREFIX=""
LOG_FILE=""
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
command[Check Uptime]=/usr/local/nagios/libexec/check_uptime
command[Check Uptime2]=/usr/local/nagios/libexec/check_uptime
[root@192 nrds]# crontab -u nagios -l
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'ModGearman-NRDS' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'ModGearman-NRDS' -c /usr/local/nrdp/clients/nrds/misc/nrds.cfg 2>&1Code: Select all
/usr/local/nrdp/clients/nrds/nrds.pl -H 'TEST1' -c /path/to/your/second/nrds.cfgYou do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRDS Passive Checks - Questions
the cron job it's running, because the checks that have are running, but I added more check to the new config but the new changes didn't propagated to the client.
bhqat6:~ # cd /
bhqat6:/ # cd usr
bhqat6:/usr # cd local
bhqat6:/usr/local # cd nrdp/
bhqat6:/usr/local/nrdp # cd clients/
bhqat6:/usr/local/nrdp/clients # cd nrds/
bhqat6:/usr/local/nrdp/clients/nrds # pwd
/usr/local/nrdp/clients/nrds
bhqat6:/usr/local/nrdp/clients/nrds # ls
linux_prod_hana_backups.cfg nrds.cfg nrds.pl nrds_common.pl nrds_updater.pl
bhqat6:/usr/local/nrdp/clients/nrds # cat linux_prod_hana_backups.cfg
CONFIG_VERSION="5.6"
CONFIG_OS="Linux"
CONFIG_NAME="linux_prod_hana_backups"
URL="http://10.100.30.111/nrdp/"
TOKEN="aet9ohi32d9o"
PLUGIN_DIR="/usr/local/nagios/libexec"
SEND_NRDP="/usr/local/nrdp/clients/send_nrdp.sh"
TMPDIR="/usr/local/nrdp/clients/tmp"
COMMAND_PREFIX=""
LOG_FILE=""
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
command[Check Disk - /dbbackups]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /dbbackups
bhqat6:/usr/local/nrdp/clients/nrds # crontab -u nagios -l
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/linux_prod_hana_backups.cfg 2>&1
bhqat6:/usr/local/nrdp/clients/nrds # ls -l
total 24
-rwxrwxr-x 1 nagios nagios 422 Jul 8 12:14 linux_prod_hana_backups.cfg
-rwxrwxr-x 1 nagios nagios 1371 Jun 25 10:16 nrds.cfg
-rwxrwxr-x 1 nagios nagios 2834 Mar 30 2015 nrds.pl
-rwxrwxr-x 1 nagios nagios 1628 Mar 30 2015 nrds_common.pl
-rwxrwxr-x 1 nagios nagios 6330 Mar 30 2015 nrds_updater.pl
this is what happens with I run it manually
/usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/linux_prod_hana_backups.cfg
Sent 1 checks to http://10.100.30.111/nrdp/
it should be sending two checks, but because the client config isn't getting updated, it's only sending 1 check
bhqat6:~ # cd /
bhqat6:/ # cd usr
bhqat6:/usr # cd local
bhqat6:/usr/local # cd nrdp/
bhqat6:/usr/local/nrdp # cd clients/
bhqat6:/usr/local/nrdp/clients # cd nrds/
bhqat6:/usr/local/nrdp/clients/nrds # pwd
/usr/local/nrdp/clients/nrds
bhqat6:/usr/local/nrdp/clients/nrds # ls
linux_prod_hana_backups.cfg nrds.cfg nrds.pl nrds_common.pl nrds_updater.pl
bhqat6:/usr/local/nrdp/clients/nrds # cat linux_prod_hana_backups.cfg
CONFIG_VERSION="5.6"
CONFIG_OS="Linux"
CONFIG_NAME="linux_prod_hana_backups"
URL="http://10.100.30.111/nrdp/"
TOKEN="aet9ohi32d9o"
PLUGIN_DIR="/usr/local/nagios/libexec"
SEND_NRDP="/usr/local/nrdp/clients/send_nrdp.sh"
TMPDIR="/usr/local/nrdp/clients/tmp"
COMMAND_PREFIX=""
LOG_FILE=""
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
command[Check Disk - /dbbackups]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /dbbackups
bhqat6:/usr/local/nrdp/clients/nrds # crontab -u nagios -l
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/linux_prod_hana_backups.cfg 2>&1
bhqat6:/usr/local/nrdp/clients/nrds # ls -l
total 24
-rwxrwxr-x 1 nagios nagios 422 Jul 8 12:14 linux_prod_hana_backups.cfg
-rwxrwxr-x 1 nagios nagios 1371 Jun 25 10:16 nrds.cfg
-rwxrwxr-x 1 nagios nagios 2834 Mar 30 2015 nrds.pl
-rwxrwxr-x 1 nagios nagios 1628 Mar 30 2015 nrds_common.pl
-rwxrwxr-x 1 nagios nagios 6330 Mar 30 2015 nrds_updater.pl
this is what happens with I run it manually
/usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/linux_prod_hana_backups.cfg
Sent 1 checks to http://10.100.30.111/nrdp/
it should be sending two checks, but because the client config isn't getting updated, it's only sending 1 check
You do not have the required permissions to view the files attached to this post.
Re: NRDS Passive Checks - Questions
H-m-m, I haven't tried this scenario... The NRDS config is called "nrds.cfg". The "CONFIG_NAME" directive in it should match the name of the config you see under the "NRDS Config Manager" in Nagios XI web UI. I don't think using a config name other than "nrds.cfg", i.e. "linux_prod_hana_backups" would work. On the other hand, you can't have two "nrds.cfg" files in the same directory... That's why, when I was testing this, I created a new directory ("misc") in "/usr/local/nrdp/clients/nrds/" on the client machine, and placed the "new nrds.cfg" in it.
Try moving the "linux_prod_hana_backups" to a different directory, and rename it to "nrds.cfg". Modify the crontab with the "new" path. Run the command manually a couple of times to test it. Let us know if this helped.
Try moving the "linux_prod_hana_backups" to a different directory, and rename it to "nrds.cfg". Modify the crontab with the "new" path. Run the command manually a couple of times to test it. Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRDS Passive Checks - Questions
the config still not getting updated on the client
bhqat6:/usr/local/nrdp/clients/nrds/misc # /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/linux_prod_hana_backups.cfg
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/linux_prod_hana_backups.cfg 2>&1
bhqat6:/usr/local/nrdp/clients/nrds/misc # ls -l
total 4
-rwxrwxr-x 1 nagios nagios 422 Jul 8 12:14 linux_prod_hana_backups.cfg
I also tried renaming the file
bhqat6:/usr/local/nrdp/clients/nrds/misc # crontab -u nagios -l
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/nrds.cfg 2>&1
and the run it manually
bhqat6:/usr/local/nrdp/clients/nrds/misc # /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/nrds.cfg
Sent 1 checks to http://10.100.30.111/nrdp/
same result. only 1 check
bhqat6:/usr/local/nrdp/clients/nrds/misc # /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/linux_prod_hana_backups.cfg
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/linux_prod_hana_backups.cfg 2>&1
bhqat6:/usr/local/nrdp/clients/nrds/misc # ls -l
total 4
-rwxrwxr-x 1 nagios nagios 422 Jul 8 12:14 linux_prod_hana_backups.cfg
I also tried renaming the file
bhqat6:/usr/local/nrdp/clients/nrds/misc # crontab -u nagios -l
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhqat6.bose.com' 2>&1
*/5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/nrds.cfg 2>&1
and the run it manually
bhqat6:/usr/local/nrdp/clients/nrds/misc # /usr/local/nrdp/clients/nrds/nrds.pl -H 'bhprd6.bose.com' -c /usr/local/nrdp/clients/nrds/misc/nrds.cfg
Sent 1 checks to http://10.100.30.111/nrdp/
same result. only 1 check
Re: NRDS Passive Checks - Questions
This is frustrating.
We are in "uncharted territory" as using multiple configs on NRDS clients doesn't work "out of the box, it hasn't been tested/documented. Nevertheless, it worked for me every time I tested it. In addition to this, I was wrong about the name of the config file. It doesn't have to be "nrds.cfg". I just used a different config name, and this worked too. See below:
Open the "linux_prod_hana_backups" config in the "NRDS Config Manager" for editing. Don't change anything, just click on "Save" to up the version number. Next, run the cron command on the client manually a couple of times. Did the version number change in the config? What is the "NRDS Config Manager" version that you are currently using?
Admin->Manage Components->NRDS Config Manager
It will be probably easier to troubleshoot this issue if we moved it to our email ticketing system. We may need to schedule a remote.
Code: Select all
[root@192 nrds]# /usr/local/nrdp/clients/nrds/nrds.pl -H 'ModGearman-NRDS' -c /usr/local/nrdp/clients/nrds/mod-gearman4.cfg
Sent 1 checks to http://192.168.x.x/nrdp/
[root@192 nrds]# /usr/local/nrdp/clients/nrds/nrds.pl -H 'ModGearman-NRDS' -c /usr/local/nrdp/clients/nrds/mod-gearman4.cfg
Sent 1 checks to http://192.168.x.x/nrdp/
Updated config to version 0.2
Updated 1 plugins
[root@192 nrds]# /usr/local/nrdp/clients/nrds/nrds.pl -H 'ModGearman-NRDS' -c /usr/local/nrdp/clients/nrds/mod-gearman4.cfg
Sent 2 checks to http://192.168.x.x/nrdp/Admin->Manage Components->NRDS Config Manager
It will be probably easier to troubleshoot this issue if we moved it to our email ticketing system. We may need to schedule a remote.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRDS Passive Checks - Questions
Worked save the config.
the nrds.cfg file got updated.
I think I am all set. I am running two .cfg files now.
the nrds.cfg file got updated.
I think I am all set. I am running two .cfg files now.