service linked to hostgroup fails to show in UI

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nflores
Posts: 4
Joined: Wed Oct 09, 2013 7:24 pm

service linked to hostgroup fails to show in UI

Post 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
Last edited by slansing on Mon Apr 14, 2014 11:58 am, edited 1 time in total.
Reason: Please do not double post, edit your previous post to add more information, double posting will only bump you lower on our reply list.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: service linked to hostgroup fails to show in UI

Post 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?
nflores
Posts: 4
Joined: Wed Oct 09, 2013 7:24 pm

Re: service linked to hostgroup fails to show in UI

Post 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!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: service linked to hostgroup fails to show in UI

Post 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?
Former Nagios employee
Locked