NSClient++ DNS name instead of IP address
Andreas Ericsson
ae at op5.se
Thu Sep 28 13:06:33 CEST 2006
narendran.neelamegam at wipro.com wrote:
> Hi,
> Is it possible to provide hostname instead of the IP address of the
> Nagios server in allowed hosts and use DNS to resolve?
>
> allowed_hosts=FQDN
>
> How can we achieve this?
>
I'm guessing you're doing this either for NRPE or NSCA, correct?
If so, the sad answer is that you can't. Both those programs store the
"allowed_hosts" variable as a string in memory and converts the incoming
IP-address to its string notation equivalence. They then match the
stringified IP-address with whatever you put on allowed_hosts. Since
system calls never return the FQDN of a connecting host, you're screwed.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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