schedule immediate check, gives "An error occured"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: schedule immediate check, gives "An error occured"

Post by lyle »

That's what I have:

Code: Select all

drwxrwsr-x 2 nagios nagcmd     4096 Mar 24 14:58 rw
Maybe there's some startup failure in the log files?

Thanks for the help....Lyle
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: schedule immediate check, gives "An error occured"

Post by mguthrie »

Hey Lyle,

Did you migrate any of the main config files from your Core installation? Such as the nagios.cfg or the nsca.cfg? If so that could be problematic. Can you double check the following directive in both of the above files:

Code: Select all

command_file=/usr/local/nagios/var/rw/nagios.cmd
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: schedule immediate check, gives "An error occured"

Post by lyle »

Since I just did the reinstall of XI on top of a fresh Centos 5.5 install, I have done no manual configuration or copies from our production Core server.
The timestamps on nagios.cfg and nsca.cfg are from the install, and the static directory has only the 3 xi*.cfg files.

Looks like my command_file definitions are ok too:

Code: Select all

# grep command_file nagios.cfg nsca.cfg
nagios.cfg:command_file=/usr/local/nagios/var/rw/nagios.cmd
nsca.cfg:command_file=/usr/local/nagios/var/rw/nagios.cmd
Thanks for the help on this puzzler. It's odd how I have the same behavior on my old install (admittedly not a fresh Centos), and on the new fresh install.

...Lyle
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: schedule immediate check, gives "An error occured"

Post by mguthrie »

Hey Lyle,

Can you glance through your nagios log, and also perhaps the debug file and see if you have any clues (error messages) showing up?

/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/nagios.debug

Then just for kicks, can you run:

Code: Select all

killall -9 nagios
service nagios start
And then check to see if the /usr/local/nagios/var/rw/nagios.cmd file is there.

Another thing to try would be running:

Code: Select all

/usr/local/nagiosxi/scripts/reset_config_perm
to make sure your files have correct permissions.
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: schedule immediate check, gives "An error occured"

Post by lyle »

Well, nothing like taking a few days off to make problems go away. 8-)

I tried "Schedule an immediate check" this morning, and now I have a nagios.cmd file and the command succeeds.

So I guess this can go back to the "solved" queue. Thanks for the help.

...Lyle
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: schedule immediate check, gives "An error occured"

Post by rdedon »

lyle wrote:Well, nothing like taking a few days off to make problems go away. 8-)

I tried "Schedule an immediate check" this morning, and now I have a nagios.cmd file and the command succeeds.

So I guess this can go back to the "solved" queue. Thanks for the help.

...Lyle
Excellent! If you do find out what happens could you share with us in case others run into similar issues?

thanks!
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: schedule immediate check, gives "An error occured"

Post by lyle »

I assume that, at some point, Nagios created the nagios.cmd file, and everything started working. The request for an immediate check must be treated as an external command and go through nagios.cmd

The /usr/local/nagios/var/rw directory had been empty, though protections on the directory looked ok. I offered to touch an empty nagios.cmd file at one point, but never did.
Don't know why a file wasn't created at install time.

Thanks again....Lyle
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: schedule immediate check, gives "An error occured"

Post by rdedon »

Very odd that it wasn't created in that path and I am wondering if at some point it could have been a permissions issue that was fixed and then nagios.cmd was created.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked