Host not showing up in dashboard after commit

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Host not showing up in dashboard after commit

Post by hockad »

I attempted a fix related to a service not being deleted in the post here https://support.nagios.com/forum/viewto ... rd#p226782

That didn't work.

The problem we are having is adding a new host to CCM then committing. It doesn't show up in the dashboard. If we use the Config File Management I can find the file that was written when the commit happened. I can then import the file and commit again and then the host shows up in the dashboard.

Any idea's assistance would be appreciated.

Nagios version 5.4.8
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host not showing up in dashboard after commit

Post by scottwilkerson »

Are you successfully Apply Configuration after adding the new host?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: Host not showing up in dashboard after commit

Post by hockad »

Yes, and a file is written into the configuration directory. The host doesn't show up on the dashboard.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host not showing up in dashboard after commit

Post by scottwilkerson »

This leads me to believe either ndo2db isn't running or you have db corruption.

Lets start with a basic DB repair script we have

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
After this, if the host still doesn't show up in the system, can you verify that the checkbox in the upper right of the screen is green?

Finally if that is the case, provide the output of this command as we may have multiple parent instances of nagios running

Code: Select all

ps -ef|grep bin/nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: Host not showing up in dashboard after commit

Post by hockad »

Ran the script it came back with no errors, i have attached the output as a file.

Yes i have the green check mark in the upper right hand corner, see attachment for image capture.

[root@lxjh159 ~]# ps -ef|grep bin/nagios
nagios 61838 1 1 Jul26 ? 05:08:55 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 61878 61838 0 Jul26 ? 00:03:26 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 116901 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116902 61838 0 Aug09 ? 00:00:34 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116903 61838 0 Aug09 ? 00:00:34 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116904 61838 0 Aug09 ? 00:00:32 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116905 61838 0 Aug09 ? 00:00:34 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116906 61838 0 Aug09 ? 00:00:35 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116907 61838 0 Aug09 ? 00:00:34 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116908 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116909 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116910 61838 0 Aug09 ? 00:00:36 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116911 61838 0 Aug09 ? 00:00:31 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116912 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116913 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116914 61838 0 Aug09 ? 00:00:33 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 116915 61838 0 Aug09 ? 00:00:35 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 118069 1 0 13:48 ? 00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
nagios 118071 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118072 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118073 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118074 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118075 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118076 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118077 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118078 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118079 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118080 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118081 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118082 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118083 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118084 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118085 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios --worker /var/spool/nagios/cmd/nagios.qh
nagios 118087 118069 0 13:48 ? 00:00:00 /usr/sbin/nagios -d /etc/nagios/nagios.cfg
root 123802 116097 0 13:56 pts/0 00:00:00 grep bin/nagios
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host not showing up in dashboard after commit

Post by scottwilkerson »

I was right, there are multiple nagios processes, it looks like from 2 separate locations, which is odd, not sure why you have a/usr/sbin/nagios loacation

Run the following:

Code: Select all

service nagios stop
killall -9 nagios
service nagios start
Then you may want to run the the previous command I gave you and make sure you only have lines with

Code: Select all

/usr/local/nagios/bin/nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: Host not showing up in dashboard after commit

Post by hockad »

Same issue: however started digging. I thought the install was a build. Have you switched to RPM's?

[root@lxjh159 init.d]# rpm -qa | grep nagios
nagios-common-4.3.2-5.el6.x86_64
nagios-repo-6-2.el6.noarch
nagios-4.3.2-5.el6.x86_64


Snippet from init script:

[root@lxjh159 init.d]# cat nagios
#!/bin/sh
#
# chkconfig: - 99 01
# description: Nagios network monitor
# processname: nagios
# File : nagios
#
# Author : Jorge Sanchez Aymar ([email protected])
#
# Changelog :
#
# 1999-07-09 Karl DeBisschop <[email protected]>
# - setup for autoconf
# - add reload function
# 1999-08-06 Ethan Galstad <[email protected]>
# - Added configuration info for use with RedHat's chkconfig tool
# per Fran Boon's suggestion
# 1999-08-13 Jim Popovitch <[email protected]>
# - added variable for nagios/var directory
# - cd into nagios/var directory before creating tmp files on startup
# 1999-08-16 Ethan Galstad <[email protected]>
# - Added test for rc.d directory as suggested by Karl DeBisschop
# 2000-07-23 Karl DeBisschop <[email protected]>
# - Clean out redhat macros and other dependencies
# 2003-01-11 Ethan Galstad <[email protected]>
# - Updated su syntax (Gary Miller)
#
# Description: Starts and stops the Nagios monitor
# used to provide network services status.
#
### BEGIN INIT INFO
# Provides: nagios
# Required-Start: $local_fs $syslog $network
# Required-Stop: $local_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts and stops the Nagios monitoring server
# Description: Starts and stops the Nagios monitoring server
### END INIT INFO

# Our install-time configuration.
prefix=/usr/share/nagios
exec_prefix=/var/lib/nagios
NagiosBin=/usr/sbin/nagios
NagiosCfgFile=/etc/nagios/nagios.cfg
NagiosCfgtestFile=/var/log/nagios/nagios.configtest
NagiosStatusFile=/var/log/nagios/status.dat
NagiosRetentionFile=/var/log/nagios/retention.dat
NagiosCommandFile=/var/spool/nagios/cmd/nagios.cmd
NagiosVarDir=/var/log/nagios/
NagiosRunFile=/var/run/nagios/nagios.pid
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=/usr/sbin
NagiosUser=nagios
NagiosGroup=nagios
checkconfig="true"
hockad
Posts: 24
Joined: Wed Dec 21, 2011 1:52 pm

Re: Host not showing up in dashboard after commit

Post by hockad »

Issue can be marked resolved. OS was updated and nagios got installed from EPEL. I removed those RPM's, re-ran the upgrade script for NagiosXI and then copied an init script from another XI box. System seems to operating normally.

Follow up question. Do you use/need the epel repo enabled for NagiosXI installation or upgrade?

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host not showing up in dashboard after commit

Post by scottwilkerson »

hockad wrote:Issue can be marked resolved. OS was updated and nagios got installed from EPEL. I removed those RPM's, re-ran the upgrade script for NagiosXI and then copied an init script from another XI box. System seems to operating normally.

Follow up question. Do you use/need the epel repo enabled for NagiosXI installation or upgrade?

Thanks.
yes
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked