Unable to see the new host From front end(GUI)
-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Unable to see the new host From front end(GUI)
Hi All,
Recently i have added one new host in to nagios monitoring , but i am unable to see that host in GUI.
post configuration everything is fine and also i am able to receive alerts to my mail id ,but the only thing is i am unable to see the host in GUI.
Can any one help on this.
Recently i have added one new host in to nagios monitoring , but i am unable to see that host in GUI.
post configuration everything is fine and also i am able to receive alerts to my mail id ,but the only thing is i am unable to see the host in GUI.
Can any one help on this.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to see the new host From front end(GUI)
Did you restart nagios after adding the config?
Are you logged in as nagiosadmin or a specific user?
Is the .cfg file you added included in the nagios.cfg?
Can you share the configuration for the host you created?
Are you logged in as nagiosadmin or a specific user?
Is the .cfg file you added included in the nagios.cfg?
Can you share the configuration for the host you created?
-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Re: Unable to see the new host From front end(GUI)
Thank you for responding to my email.
Is restart mandatory ? After adding I just reloaded the configuration by using below command, every time i am following the same and earlier i have added almost 15 hosts in to monitoring and all are running fine. but this time not sure what happened. After adding everything is fine,MOnitoring is enabled and also i am able to receive alerts to my mail id, the only thing is i unable to see the new host in web interface.
/etc/rc.d/init.d/nagios reload
Yes i have logged into the web interface by using nagiosadmin only .
yes
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name lpdvcamys01
alias lpdvcamys01
address lpdvcamys01
}
define hostgroup{
hostgroup_name dev-db-servers; The name of the hostgroup
alias Dev Servers ; Long name of the group
members irvldoedb01,irvldbbdb01,irvldmysdb01,lnpvphpa01 ; Comma separated list of hosts that belong to this group
Code: Select all
Did you restart nagios after adding the config?/etc/rc.d/init.d/nagios reload
Code: Select all
Are you logged in as nagiosadmin or a specific user?Code: Select all
Is the .cfg file you added included in the nagios.cfg?Code: Select all
Can you share the configuration for the host you created?use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name lpdvcamys01
alias lpdvcamys01
address lpdvcamys01
}
define hostgroup{
hostgroup_name dev-db-servers; The name of the hostgroup
alias Dev Servers ; Long name of the group
members irvldoedb01,irvldbbdb01,irvldmysdb01,lnpvphpa01 ; Comma separated list of hosts that belong to this group
-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Re: Unable to see the new host From front end(GUI)
Code: Select all
Warning: Could not open object cache file '/nagiosmon/nagios/var/objects.cache' for writing!when i looked for the permissions for objects.cache file, it showing as below
-rw-r--r-- 1 149 nagios 155K Dec 5 01:13 objects.cache
-rw-r--r-- 1 149 nagios 155K Dec 5 01:13 objects.precache
and for remaining it showing as below
-rw------- 1 nagios nagios 260K Feb 28 22:44 retention.dat
-rw-r--r-- 1 nagios nagios 29K Feb 28 22:44 nagios.log
-rw-rw-r-- 1 nagios nagios 259K Feb 28 23:17 status.dat
under /etc
total 68K
-rw-rwxr--+ 1 149 nagios 44K Oct 8 2014 nagios.cfg
-rw-rwxr--+ 1 149 nagios 12K Oct 8 2014 cgi.cfg
-rw-rwx---+ 1 149 nagios 1.3K Oct 8 2014 resource.cfg
-rw-rwxr--+ 1 root root 26 Oct 8 2014 htpasswd.users
drwxrwxr-x+ 2 149 nagios 4.0K Feb 27 07:51 objects
-bash-4.1$
Under objects
-rw-rwxr--+ 1 149 nagios 3.6K Jan 2 22:44 timeperiods.cfg
-rw-rwxr--+ 1 149 nagios 2.8K Feb 4 20:42 contacts.cfg
-rw-rwxr--+ 1 149 nagios 24K Feb 27 07:44 localhost.cfg
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to see the new host From front end(GUI)
this certainly would be problematic however the permissions you showed didn't sow both user and groupsandeep027 wrote:Code: Select all
Warning: Could not open object cache file '/nagiosmon/nagios/var/objects.cache' for writing!
I would try restarting nagios which should re-create this file
Code: Select all
/etc/rc.d/init.d/nagios restartCode: Select all
ls -al /nagiosmon/nagios/var/objects.cache
ls -ld /nagiosmon/nagios/var
ls -ld /nagiosmon/nagios
ls -ld /nagiosmon-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Re: Unable to see the new host From front end(GUI)
Code: Select all
this certainly would be problematic however the permissions you showed didn't sow both user and group
-rw-r--r-- 1 149 nagios 158707 Dec 5 01:13 /nagiosmon/nagios/var/objects.cache
and i have restarted the Nagios by using /etc/rc.d/init.d/nagios restart ,still same problem
Please find the permissions as below for the
-bash-4.1$ ls -al /nagiosmon/nagios/var/objects.cache
-rw-r--r-- 1 149 nagios 158707 Dec 5 01:13 /nagiosmon/nagios/var/objects.cache
-bash-4.1$ ls -ld /nagiosmon/nagios/var
drwxrwxr-x+ 5 149 nagios 4096 Mar 1 04:44 /nagiosmon/nagios/var
-bash-4.1$ ls -ld /nagiosmon/nagios
drwxr-xr-x 9 smsqlp01 users 4096 Oct 8 2014 /nagiosmon/nagios
-bash-4.1$ ls -ld /nagiosmon
drwxr-xr-x 8 smsqlp01 users 4096 Oct 23 2014 /nagiosmon
can you please check and help on this.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to see the new host From front end(GUI)
For some reason the user is set to 149 not the group, and I see this file hasn't been updated in months.
Lets run the following
Lets run the following
Code: Select all
chown nagios.nagios -R /nagiosmon/nagios/var-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Re: Unable to see the new host From front end(GUI)
Code: Select all
chown nagios.nagios -R /nagiosmon/nagios/varand also for the below one's also we have same 149 and nagios permissions ,and up to now everything is fine. if we change to nagios nagios it won't be any problem right?
-rw-rwxr--+ 1 149 nagios 3.6K Jan 2 22:44 timeperiods.cfg
-rw-rwxr--+ 1 149 nagios 2.8K Feb 4 20:42 contacts.cfg
-rw-rwxr--+ 1 149 nagios 24K Mar 1 05:02 localhost.cfg
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unable to see the new host From front end(GUI)
No it won't be a problem and should be how the permissions should be set.
-
sandeep027
- Posts: 33
- Joined: Tue May 08, 2018 2:12 am
Re: Unable to see the new host From front end(GUI)
Thank you for quick update. Let me try.