DNS

Check DNS via Powershell

Description:

Check DNS as Powershell Script, to be used with NSClient/NSCP

Windows DNS-Server parents might be external DNS-Server provided by ISP or google so this upstream connection can be checked with this script

Current Version

1.0

Last Release Date

2015-01-01

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

Project Notes
Sample nagios command definition: define command { # ARG1: 8.8.8.8, dns server # ARG2: www.google.de, host_name command_name check_windows_dns command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_dns -a $ARG1$ $ARG2$ } Sample NSCP (Version: 0.4+) nsclient.ini: [/settings/external scripts/wrapped scripts] ;; DNS Check ;; ARG1: DNS-Server ;; ARG2: DNS-Name to check check_dns = check_dns.ps1 $ARG1$ $ARG2$ [/settings/external scripts/wrappings] ; WRAPPING - An external script wrapping ps1 = cmd /c echo scripts%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -command - Sample Output: $ /usr/lib/nagios/plugins/check_nrpe -H -c check_dns -a 8.8.8.8 www.google.com OK: dns returned 145.253.244.233 Or on error (this message is localized by your windows, so it might be timeout or something like this): CRITICAL dns server 8.8.8.8: Error: *** Zeitberschreitung bei Anforderung an UnKnown
Reviews (1) Add a Review
Worked out of the box
by GldRush98, November 30, 2017

No issues, and worked immediately out of the box. Great way to functionally test a DNS server from NSClient.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
5 (2)
Favorites
0
Views
14,973