I don't think I explained this properly. I don't want to know the host name (DNS), I want know the name that Nagios knows it by, from the hosts.cfg file.
Any suggestions? Michael -------- Original Message -------- From: "Ben Thomas" <[EMAIL PROTECTED]> To: "Michael Jewett" <[EMAIL PROTECTED]>, nagios-users@lists.sourceforge.net Subject: Re:[Nagios-users] Host name from IP address Date: Fri Nov 03 2006 15:46:36 GMT-0400 (Atlantic Standard Time) > So if you are not looking to write a script, just use ping -a <IP> in > windows and that will reverse dns the IP for you. Then just do a ctl + > f in the config files. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael > Jewett > Sent: Friday, November 03, 2006 8:46 AM > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] Host name from IP address > > Good morning, > > I was curious if anyone knows a way to find out the hostname from the > hosts.cfg if I know the IP address. > > For instance I have a program that I wrote that runs on switch 1 that > returns me an IP address of switch 2 and its status. I would then like > the get the name from Nagios's configs for switch 2. Is this possible, > without going through the entire hosts.cfg file? If not, has anyone > else written something to do the similar function? > > Thanks, > > Michael > > ------------------------------------------------------------------------ > - > 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@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 > ...................................................................... > The information contained in this communication may be confidential or > legally privileged and is intended only for the recipient named above. > If the reader of this message is not the intended recipient, you are > hereby notified that any dissemination, distribution or copying of this > communication or its contents is strictly prohibited. If you have > received this communication in error, please immediately advise the > sender and delete the original and any copies from your computer system. > > > ------------------------------------------------------------------------- > 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@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 ------------------------------------------------------------------------- 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@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