Problem with apps::protocols::dns::plugin
Hi,
I'm trying to use plugin : apps::protocols::dns::plugin with multiple nameservers. This is the way I wrote the command :
./centreon_plugins.pl --plugin=apps::protocols::dns::plugin --mode=request --nameservers=1.2.3.4 --nameservers=2.3.4.5 --search=www.domain.tld --expected-answer=5.6.7.8 ==> OK even if 1.2.3.4 and 2.3.4.5 doesn't answer (it use default configuration like /etc/resolv.conf ?)
I tried : ./centreon_plugins.pl --plugin=apps::protocols::dns::plugin --mode=request --nameservers=1.2.3.4,2.3.4.5 --search=www.domain.tld ==> The answer is : CRITICAL: DNS Query Failed: no nameservers
The thing I want is : if 1 DNS fail => I get warning and if all nameservers failed, I want CRITICAL. Is it possible ?
Thanks for your help.
Right now, it doesn't work like that. But you can get the IP of the nameserver responding with $reply->answerfrom. So we can add a counter of nameservers failed. You need to use nameservers option like that: --nameservers=1.2.3.4 --nameservers=2.3.4.5
What do you think about it ?
Hi, Thanks for your interest in Centreon. Requests for new features and enhancements must be suggested here. Troubleshooting and questions must now be asked here (cf our new issue template.
Thank you for your understanding.