Internet Domains and WHOIS

check_domain.php

Description:

A Nagios plugin for checking a domain expiration date by registry name.

The major changes made from the shell version is that registry expiration dates have different date formats and keys. This version accepts a wide variety of Registry formats and is intended to support all TLDs that are supported by whois.

(UPDATE: now can use the -s option to set a whois server)

Current Version

1.1.0

Last Release Date

2014-07-01

Compatible With

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

License

GPL


Project Files
Project Notes
Nagios Plugin: check_domain ============================ A Nagios plugin for checking a domain expiration date by registry name. > This plugin relies on [jwhois](https://github.com/jodrell/jwhois) to find the registration > dates so any TLD that is not supported by whois will not return correctly and will output > something similar to the following: > > Error running whois: > > Thanks to [glensc](https://github.com/glensc) for his work on [nagios-plugin-check_domain](https://github.com/glensc/nagios-plugin-check_domain) > which inspired this php version of his shell plugin. Usage: $./check_domain.php -d nagios.org OK - Domain nagios.org will expire in 248 days (2015-10-04) Full Usage: check_domain.php - v1.1.0 Copyright (c) 2014 Luke Groschen, Nagios Enterprises , 2009-2014 Elan Ruusamäe Under GPL v2 License This plugin checks the expiration date of a domain name. Usage: check_domain.php -h | -d [-c ] [-w ] [-s ] NOTE: -d must be specified Options: -h Print this help and usage message -d Domain name to query against -w Response time to result in warning status (days) -c Response time to result in critical status (days) -s Specify a whois server (whois.internic.net by default) This plugin will use the whois service to get the expiration date for the domain name. Example: $./check_domain.php -d nagios.com -w 30 -c 10 nn"
Reviews (2) Add a Review
Problems with GoDaddy Domains
by vertices, January 31, 2015

Installed it on Opsview Core. So far, most domains I have tried to monitor work great. Then I ran into a bunch that do not. I discovered they are all domains registered through GoDaddy. Any thoughts on how to fix that? I tried changing the whois server to who.godaddy.com to no avail. Even godaddy.com itself doesn't work. $ /usr/local/nagios/libexec/check_domain.php -d godaddy.com -w 60 -c 15 RETURN CODE: 2 (CRITICAL) OUTPUT: CRITICAL - Domain godaddy.com will expire in -16448 days (clientRenewProhibited). Thanks for all of the great your work you have put into this so far!



adding greek domains
by dkan, November 30, 2014

Dear programmer can you also add support for .gr Greek and .eu European domain. Regards,



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 (3)
Favorites
1
Views
28,840