User-defined host/service attributes
Marc Haber
mh+nagios-users at zugschlus.de
Sat Oct 14 17:29:54 CEST 2006
Hi,
recently, I was confused by my Nagios reporting a host DOWN event
while the host was alive and kicking. After debugging for a while, I
found out that the host had changed IP addresses and nagios was, of
course, still checking the old address since it was configured to
check the IP address.
To catch such error situations earlier, I'd now like to have Nagios
check that the host name indeed still points to the IP address we're
actually checking.
This is easy enough:
define service {
use my-service
hostgroup_name hostnameip
service_description my_hostnameip
check_command check_hostnameip
}
define command {
command_name check_hostnameip
command_line $USER1$/check_dns --hostname=$HOSTNAME$ --expected-address=$HOSTADDRESS$
}
This, however, means that one has to have the DNS name of the host in
the host_name field:
define host {
use my-linux-host
host_name ipdesc.iface.host.loc.mydomain.example
hostgroups defaultping, snmp-w68, ssh, hostnameip
alias foo server running bar and baz services, colocated in blu
address 10.1.1.47
parents localhost
}
This is a bit clumsy since our host names are complicated and lengthy.
I'd like to have something like
define command {
command_name check_hostnameip
command_line $USER1$/check_dns --hostname=$CUSTOMATTR$ --expected-address=$HOSTADDRESS$
}
define host {
use my-linux-host
host_name host.mydomain.example
custom_attribute ipdesc.iface.host.loc.mydomain.example
hostgroups defaultping, snmp-w68, ssh, hostnameip
alias foo server running bar and baz services, colocated in blu
address 10.1.1.47
parents localhost
}
If this possible in Nagios2? If not, are there other ideas how to
solve this?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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