centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

Problem with apps::protocols::dns::plugin

Open Hellnino18 opened this issue 6 years ago • 2 comments

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.

Hellnino18 avatar Apr 10 '19 10:04 Hellnino18

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

garnier-quentin avatar Apr 10 '19 11:04 garnier-quentin

What do you think about it ?

garnier-quentin avatar Apr 11 '19 09:04 garnier-quentin

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.

fmattesct avatar Oct 31 '23 15:10 fmattesct