Page 1 of 1

service linked to hostgroup fails to show in UI

Posted: Sun Apr 13, 2014 2:23 am
by nflores
Hi all,
I have the following config:

Code: Select all

define hostgroup {
	hostgroup_name	Linux
	alias		All Linux Servers
}

define host{
        use linux-server
        host_name host1
        alias Host One
	hostgroups Linux
        address 127.0.0.1
        }

define service{
        use generic-service ; Name of service template to use
        hostgroup_name Linux
        service_description PING
	check_command check_ping!100.0,20%!500.0,60%
}

define service{
        use generic-service ; Name of service template to use
        hostgroup_name Linux
        service_description Checking Myself
	check_command check_myself
}

Shouldn't these two service checks be applied to host1? Or am I missing something? I don't see anything in the UI. The host does show up in the Host link in the UI but under services I do not see host1. Any ideas as to what may be wrong?

I'm using:
Nagios Core 4.0.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-14-2014
License: GPL

Linux localhost 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Re: service linked to hostgroup fails to show in UI

Posted: Mon Apr 14, 2014 12:02 pm
by slansing
The services will appear under the hosts in that host group, are they not? Can you provide the output of:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Did you verify your config files, and restart nagios?

Re: service linked to hostgroup fails to show in UI

Posted: Tue Apr 15, 2014 12:22 am
by nflores
Sure enough, errors were flying by that I was not seeing, but yet nagios was able to successfully restart. Going back and clearing up these issues correctly displayed the services being executed against my sample hosts.

Thanks!

Re: service linked to hostgroup fails to show in UI

Posted: Tue Apr 15, 2014 9:07 am
by tmcdonald
nflores wrote:Sure enough, errors were flying by that I was not seeing, but yet nagios was able to successfully restart. Going back and clearing up these issues correctly displayed the services being executed against my sample hosts.

Thanks!
Great! Can we close the thread now?