Page 1 of 1

Nagios.cmd file is missing after upgrade

Posted: Wed Feb 20, 2019 5:40 am
by lifetouch
Hi Team,

Today i have upgraded my nagioxi from v5.4.1 to v5.5.10.

When i am checking service detail in nagiosxi it is showing "Object Does Not Exist".

While i am checking the nagios status it is showing below output(nagios is not running).

[xxxxxxxxx@xxxxx rw]$ sudo /sbin/service nagios status
nagios is not running
[xxxxxxxxx@xxxxx rw]$ sudo /sbin/service nagios start
Starting nagios: done.
[xxxxxxxxx@xxxxx rw]$ sudo /sbin/service nagios status
nagios is not running

Also, I found that nagios.cmd is not available or might be auto deleted at /usr/local/nagios/var/rw.

Please help ASAP.

Re: Nagios.cmd file is missing after upgrade

Posted: Wed Feb 20, 2019 9:26 am
by lifetouch
Hi Team,

our system is effectively down and unusable right now. It is affecting our all production monitoring. Please look into this ASAP.

Re: Nagios.cmd file is missing after upgrade

Posted: Wed Feb 20, 2019 11:31 am
by SteveBeauchemin
While you wait for actual Nagios support - here is something from a user (Me) who went thru this migration too.

Look at the lock file location. All 4 scripts need to point to the same location.

From my notes:

Nagios uses a lock file to store the primary PID of running processes. The OS startup and stop tools use this as well. There are 4 locations where this is defined and they all need to use the same path. The Nagios XI 5.5.x and higher path for lock is /var/run/nagios.lock

Ensure that these 4 files use the same locations.

cat /etc/rc.d/init.d/nagios | grep NagiosRunFile=
cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint.sh | grep lockfile=
cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint_specific.sh | grep lockfile=
cat /usr/local/nagios/etc/nagios.cfg | grep lock

Older versions will use /usr/local/nagios/var/nagios.lock for the file location.
You need to use the new location /var/run/nagios.lock

There are 2 places where nagios startup files may exist.
For OS RedHat 6 - Old versions 5.4 and older used /etc/rc.d/init.d
For OS RedHat 7 - New version 5.5 and higher use /usr/lib/systemd/system

also - The rw file should only exist while nagios is running.

Good luck.

You should probably open a ticket and get on a call with support.

Steve B

Re: Nagios.cmd file is missing after upgrade

Posted: Wed Feb 20, 2019 11:32 am
by scottwilkerson
Can you post the output of the following

Code: Select all

tail -50 /usr/local/nagios/var/nagios.log
ps -ef|grep nagios.cfg