DNS Service monitor
-
-
Hi!
It's possible only with external tools. You can define external parameter on any agent like this:
ExternalParameter = DNS.Check(*):/usr/bin/dig +noall +short @$1 $2 A | grep $3 | wc -l
You'll get new agant parameter DNS.Check, which accepts 3 arguments: DNS server address, DNS name to test, expected IP address. It will return 1 for successful test and 0 for failed. For example, in my network I can call it like
DNS.Check(172.30.30.1,www.netxms.org,5.9.19.37)
to check that my local DNS server at 172.30.30.1 resolves DNS name www.netxms.org to correct IP address (5.9.19.37).
Best regards,
Victor -
-
You should set a threshold on your DCI (with condition "last values equals 0"), and add rule in event processing policy to generate an alarm. Here is a tutorial for a similar task: http://wiki.netxms.org/wiki/How_to_send_e-mail_notification_when_disk_space_is_low - it should help you understand the concept.
Best regards,
Victor -
-
I wanted to add to this thread a Windows equivalent which I needed for myself. I've added two new DCI's to my agent's config file:
ExternalParameter = DNS.Lookup(*):dig +noall +short @$1 $2 A ExternalParameterShellExec = DNS.Check(*):dig +noall +short @$1 $2 A | find /c "$3"The first returns the IP looked up as I wanted to be able to check it for myself, the second is the equivalent of the example from Victor that returns just a code. The reason for the "ShellExec" is because "find" is a built-in function of the command-prompt, and "/c" returns the count.
You'll also need a copy of "dig" for Windows which can be found here.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login