Monitoring change of DNS A record result
Posted: Tue Oct 28, 2014 7:58 am
Hey guys,
I'm just evaluating NagiosXI at the moment, so far I've been really impressed by the flexibility and ease of getting it going (installed on an EC2 CentOS AMI)! We host some internet based services for customers, so I'm working on building up a suite of checks that we can run against the servers to confirm everything is OK. I've done some port checks, HTTP response codes, SSL Cert expiry etc. but one of the wizard items that caught my attention was the DNS check that watches for a mismatch of the result of a DNS A record lookup to an IP you specify. Very handy to watch out for config changes, DNS failovers etc. but having to setup a Service for each Host and specify the IP there (in ARGS) is not really scalable (at 40 hosts now but could be at 2-300 shortly).
So I'm wondering if anybody has thoughts on how to make this Check more scalable? I tried sticking the expected IP in as a Free Variable of the Host, and this works well as you only need one Service object that references that variable. But this still requires looking up and typing in the IP of each host as we add them, I feel there's probably a clever trick here to do this in an automated way
. Maybe a script that runs when a new Host is added, does the lookup and sets the Free Variable? Or a script that you can run periodically during a time that you are happy that all hosts have the correct IPs and goes through all hosts to update the Free Variable. I used Kaseya in a previous life and it had the concept of a baseline audit that would run when a host was added, then you could report on variances from that baseline.
Any thoughts?
Thanks!
I'm just evaluating NagiosXI at the moment, so far I've been really impressed by the flexibility and ease of getting it going (installed on an EC2 CentOS AMI)! We host some internet based services for customers, so I'm working on building up a suite of checks that we can run against the servers to confirm everything is OK. I've done some port checks, HTTP response codes, SSL Cert expiry etc. but one of the wizard items that caught my attention was the DNS check that watches for a mismatch of the result of a DNS A record lookup to an IP you specify. Very handy to watch out for config changes, DNS failovers etc. but having to setup a Service for each Host and specify the IP there (in ARGS) is not really scalable (at 40 hosts now but could be at 2-300 shortly).
So I'm wondering if anybody has thoughts on how to make this Check more scalable? I tried sticking the expected IP in as a Free Variable of the Host, and this works well as you only need one Service object that references that variable. But this still requires looking up and typing in the IP of each host as we add them, I feel there's probably a clever trick here to do this in an automated way
Any thoughts?
Thanks!