Hostgroup tricks?
Axel Rosenski
rosenski at wave-computer.de
Tue Nov 8 17:10:44 CET 2011
Hi Tim,
I don't have a direct reply, but perhaps a hint in another direction to solve
your problem.
Personally, I don't like negations and I don't recommend them.
I left the hostgroup empty and assigned all hostgroups in the host definition.
This looks like
define hostgroup{
hostgroup_name hgrp-icmp
alias ICMP
}
define host{
use tpl-host-linux
host_name 127.0.0.1
alias Nagios
address 127.0.0.1
hostgroups +hgrp-icmp
}
Nagios will parse your config and will add this host to this hostgroup.
Perhaps this can help you
Axel
Am Dienstag 08 November 2011, 15:45:58 schrieb Tim AtLee:
> Hello
>
> I have a hostgroup defined as:
> define hostgroup {
> hostgroup_name ping-servers
> alias Pingable hosts
> members *
> }
>
> I have recently added a host outside our firewall that has ping disabled.
> I have changed the host's check_command to be 'check_tcp!80' so that the
> host won't be offline permanently, but I am wondering if there is a way to
> exclude this host from the 'ping-servers' hostgroup in the host
> definition?
>
> Ideally, something like:
> define host {
> host_name outsidefirewallhost
> alias Host outside firewall
> address some.ip.address
> use generic-host
>
> hostgroup !ping-servers
> }
>
> This generates an error when I test the configuration. The only way I have
> been able to achieve this is to change the ping-servers hostgroup
> definition to exclude this individual host (*,!outsidefirewallhost), but
> I'd rather keep the exclusion define in the host, not in the "blanket
> rule".
>
> Maybe it's just me being OCD... but is this possible?
>
> Thanks,
>
> Tim
--
Axel Rosenski
- Administration -
______________________________
Wave Computersysteme GmbH
Philipp-Reis-Str. 1-3 / 9
35440 Linden
Geschäftsführer: Carsten Kellmann
Registergericht Gießen HRB 1823
Tel.: +49 (0)6403 / 9050 8317
Fax: +49 (0)6403 / 9050 5089
mailto:rosenski at wave-computer.de
http://www.wave-computer.de
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list