Host name from IP address

Az az at whoever.org
Mon Nov 6 21:42:50 CET 2006


Michael Jewett wrote:
> again, I think I'm not explaining myself clearly.  I want to be able to 
> get the host_name in the hosts.cfg file, like this:
>
> define host{
>          use                     edgeswitch-host
>          host_name               5510-Toole
>          alias                   Toole 5510
>          address                 172.16.24.28
>          }
>
> So I give the IP address 172.16.24.28 and I get 5510-Toole as the 
> returned value.
Have a look on Nagios Exchange. There are a variety of lumps of code 
that read parts of Nagios config and status files, so one of these will 
give you a starting point. Natively, I don't believe there is a way to 
do what you're asking (although there are macros containing host values 
etc but I dont think these will give you what you want in your case).


-------------------------------------------------------------------------
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