check_dns_pl or check_dns

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rvaede
Posts: 5
Joined: Fri Mar 11, 2011 3:41 pm

check_dns_pl or check_dns

Post by rvaede »

I am trying to code a routine in Nagios to check a website dns and if the IP matches does not match IP:xx.xx.xx.xx then generate an alert.
Any suggestions? Thanks
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_dns_pl or check_dns

Post by Box293 »

check_dns comes with the Nagios Plugins package:

Code: Select all

/usr/local/nagios/libexec/check_dns -H xitest.box293.local. -a 10.25.5.2
DNS OK: 0.328 seconds response time. xitest.box293.local. returns 10.25.5.2|time=0.327597s;;;0.000000

/usr/local/nagios/libexec/check_dns -H xiproduction.box293.local. -a 10.25.5.2
DNS CRITICAL - expected '10.25.5.2' but got '10.25.5.1'
Is this what you were after ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rvaede
Posts: 5
Joined: Fri Mar 11, 2011 3:41 pm

Re: check_dns_pl or check_dns

Post by rvaede »

Yes, well done it works perfectly. I knew there was a check_dns but I wasn't aware of the -a option.
thank you
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_dns_pl or check_dns

Post by rkennedy »

Ah! Great to hear you got it working.

Going to close this one out now, but feel free to make a new thread if you require any assistance in the future.
Former Nagios Employee
Locked