Page 1 of 1

Passive monitoring files not being backed up

Posted: Mon Dec 30, 2013 3:50 pm
by vmesquita
We did a backup using the instructions provided here:
http://assets.nagios.com/downloads/nagi ... ing_XI.pdf

And restored in a newly installed server. Since the passive checks, by default, don't warn if state doesn't change, some passive checks were being ignored by the server, and we only found out about the issue when a link went down and NAGIOS never reported. At this point we found out that the files /etc/xinetd.d/nsca and /usr/local/nagios/etc/nsca.cfg are not part of the backup/restore procedure. So:

1) Is this a normal behavior?

2) Are there any other relevand files/folders which are not part of this backup?

Re: Passive monitoring files not being backed up

Posted: Thu Jan 02, 2014 10:08 am
by tmcdonald
Have you tried looking in your Unconfigured Objects for the passive checks?

Re: Passive monitoring files not being backed up

Posted: Thu Jan 02, 2014 11:48 am
by vmesquita
The passive checks were working perfectly in the old server, and the item corresponding to the monitoring was still existant when configuration was restored in the new server. These 2 files I mentioned, however, where not included in the backup script and prevent the passive checks from working. So my question is: wouldn't it be a bug in the backup script? Or is there a possible reason for this files to be excluded from the backup?

Re: Passive monitoring files not being backed up

Posted: Thu Jan 02, 2014 12:48 pm
by abrist
That is very odd, at least concerning the config file as all files in:

Code: Select all

/usr/local/nagios/etc/
*should* be backed up by the backup script. What version of XI are you running?

Re: Passive monitoring files not being backed up

Posted: Thu Jan 02, 2014 12:54 pm
by BanditBBS
abrist wrote:That is very odd, at least concerning the config file as all files in:

Code: Select all

/usr/local/nagios/etc/
*should* be backed up by the backup script. What version of XI are you running?
Andy,

I see what he is saying. It isn't any files under /usr/local/nagios/etc, it is the two specific files he listed in his opening post. I agree with him, I would hope those two files would be grabbed by the backup script so you don't have to manually back them up.

Re: Passive monitoring files not being backed up

Posted: Thu Jan 02, 2014 1:01 pm
by abrist
The nsca config should have been backed up. The following lines from the backup script should have covered it:

Code: Select all

echo "Backing up Nagios Core..."
#cp -rp /usr/local/nagios $mydir
tar czfps $mydir/nagios.tar.gz /usr/local/nagios
I am unsure how the xinetd nsca config is generated though. It may only get created on XI install . . .