nrds.cfg being overwritten

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

nrds.cfg being overwritten

Post by ks6764 »

I have a template defined on my Nagios XI monitoring servers that our monitored servers are able to pull and this functionality works great and I am able to import the monitoring via the Unconfigured Objects in the GUI.
My question is that the servers we are monitoring are owned by an application team that would like to append the nrds.cfg file with custom monitoring on a per server basis....so no two servers may have the monitoring they would be adding on to nrds.cfg. When they add on monitoring to nrds.cfg, it is being overwritten and based on the time stamp in which it is changing, I think it is occurring when cron kicks off the job to report in to the Nagios xi monitoring server.

What is the best way for them to do what they are seeking to do ? Should they change

Code: Select all

UPDATE_CONFIG="1"
to

Code: Select all

UPDATE_CONFIG="0"
as I would think this would keep the nrds.cfg file from being overwritten ?
Alternatively, should they setup a separate nrds.cfg file called something like nrds_myapp.cfg and populate it and call this configuration via a separate cron entry ? If so, what would that cron entry need to look like ?

Thanks for any assistance.

Kerry
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: nrds.cfg being overwritten

Post by tacolover101 »

which directory is nrds.cfg located in?
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: nrds.cfg being overwritten

Post by ks6764 »

/usr/local/nrdp/clients/nrds
dwasswa

Re: nrds.cfg being overwritten

Post by dwasswa »

ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: nrds.cfg being overwritten

Post by ks6764 »

Anything on this ??
kyang

Re: nrds.cfg being overwritten

Post by kyang »

Yes, the nrds.cfg still does overwrite.

You could define a cron to run both nrds.cfgs. A previous post mentions this same exact topic. You can take a look at it. :D
Quoted from another forum post
https://support.nagios.com/forum/viewto ... 16&t=39238

You could manually place a different config in there and adjust your cron in /var/spool/cron/nagios from:

Code: Select all

 */5 * * * * /usr/local/nrdp/clients/nrds/nrds.pl -H 'TEST1' 2>&1
To:

Code: 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>&1
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.

Does this help?
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: nrds.cfg being overwritten

Post by ks6764 »

Perfect, thanks.
kyang

Re: nrds.cfg being overwritten

Post by kyang »

Let us know if you have any more questions.
Locked