Services by hostgroup_name configuration


#1

Hello,

Like said in the nagios 3.0.1 documentation, we can assign services checks to a group of hosts.
[blockquote]
host_name: This directive is used to specify the short name(s) of the host(s) that the service “runs” on or is associated with. Multiple hosts should be separated by commas.
hostgroup_name: This directive is used to specify the short name(s) of the hostgroup(s) that the service “runs” on or is associated with. Multiple hostgroups should be separated by commas. The hostgroup_name may be used instead of, or in addition to, the host_name directive.
[/blockquote]

I’ve declared somes hostgroups by example :
[blockquote]
define hostgroup {
hostgroup_name LinuxServer
alias Linux Servers
members myhost1,myhost2,myhost3,myhost4
}

define hostgroup {
hostgroup_name SolarisServer
alias Solaris Servers
members solhost1,solhost2,solhost3,solhost4
}

[/blockquote]

and assigned somes services to this group:

[blockquote]
define service {
use networking-service
host_name !myhost1,!solhost4
hostgroup_name LinuxServer,SolarisServer
service_description +ping
check_command check_ping
active_checks_enabled 1
passive_checks_enabled 1
contact_groups myadmingroup
}
[/blockquote]

Ok nagios config check pass without any error or warning

[blockquote]
Checking services…
Checked 659 services.
Checking hosts…
Checked 145 hosts.
Checking host groups…
Checked 15 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 2 contacts.
Checking contact groups…
Checked 5 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 41 commands.
Checking time periods…
Checked 5 time periods.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…

Total Warnings: 0
Total Errors: 0
[/blockquote]

and nagios starts, everything looks fine

but sometimes all services are not shown in the nagios services interface.
in the log file i have these messages:
[blockquote]
[1208509058] Warning: The check of service ‘+ping’ on host ‘myhost4’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…
[1208509058] Warning: The check of service ‘+ping’ on host ‘myhost2’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…
[/blockquote]
and
[blockquote]
[1208508946] Warning: Check result queue contained results for service ‘+ping’ on host ‘myhost4’, but the service could not be found! Perhaps you forgot to define the service in your config files?
[1208508947] Warning: Check result queue contained results for service ‘+ping’ on host ‘myhost3’, but the service could not be found! Perhaps you forgot to define the service in your config files?
[/blockquote]

nagios do the check the service for all servers, ok ! but I dont understand why he said that the service is not defined ? O_o

any idea ? :frowning:

regards,
Laurent.


#2

no idea ?


#3

Hm, looks weird. Check this out:
meulie.net/portal_plugins/fo … ?9802.last
Maybe an update is needed.