Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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
Owner
Luke Groschen
Website
https://github.com/lgroschen/check_domain
Download URL
https://github.com/lgroschen/check_domain/blob/master/check_domain.php
License
GPL
Compatible With
v1.1.0
README
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 <[email protected]>, 2009-2014 Elan Ruusamäe <[email protected]> Under GPL v2 License
This plugin checks the expiration date of a domain name.
Usage: check_domain.php -h | -d <domain> [-c <critical>] [-w <warning>] [-s <whoisServer>] 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"
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!
Hello vertices, Not sure why you're having an issue, but I tried this recently on my CentOS machine from the command line (which has the plugin in Nagios XI): [root@XIdevr21 libexec]# ./check_domain.php -d godaddy.com -w 60 -c 15 OK - Domain godaddy.com will expire in 2484 days (2021-11-01T11:59:59Z). Are you using v1.1.0? When I do the same command above, but use '-s whois.godaddy.com' it errors out saying: Error running whois: So I guess the default whois server works for godaddy.
Dear programmer can you also add support for .gr Greek and .eu European domain. Regards,
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!