Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_domain.pl

Current Version
1.1
Last Release Date
2012-05-15
Compatible With
  • Nagios 3.x
License
GPL
Hits
65988
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
This plugin will do a whois lookup on a given domain and return the number of days remaining until it expires.
Usage: $USER1$/check_domain.pl -d domainname.tld -w int -c int

Version history:
1.0: initial release
1.0a: minor regex bug fix
1.1: major regex updates
Reviews (1)
if ($whois =~ m/expir.*?((# dd-Mon-yy
d{2}-w{3}-(d{4}|d{2})|
#Jul 11 23:59:59 GMT 2013
w{3}sw{3}sd{2}sd{2}:d{2}:d{2}sw{3}sd{4}|
# dd Mon yyyy
d{2}sw{3}sd{4}|
# yyyy-mm-dd
d{4}-w{2}-d{2}))/xi or
$whois =~ m/status:.*OK-UNTILs((d{8}))d{6}/xi or
$whois =~ m/paid-till.*?((d{4}.d{2}.d{2}))/xi
) {
$edate = $1;
}
else {
print "Unknown - $domain expiration date not found.
";
exit 3;
}