glensc / monitoring-plugin-check_domain

Nagios/Icinga plugin for checking a domain name expiration date
78 stars 57 forks source link

Update for check_domain.sh #17

Closed nevilleonline closed 9 years ago

nevilleonline commented 9 years ago

Hi,

it does not work for the below domains. autoproff.ir expire-date: 2016-02-05 (expiry date format from the "whois somedomain.ir" command) autoproff.pl renewal date: 2016.01.14 18:47:31 autoproff.pt Data de expiração / Expiration Date (dd/mm/yyyy): 18/01/2016 autoproff.si expire: 2016-01-19 autoproff.at
autoproff.be autoproff.ch autoproff.de autoproff.es autoproff.eu autoproff.fr autoproff.gl autoproff.gr autoproff.li autoproff.lt autoproff.lu autoproff.lv autoproff.nl

Most of these domains are purchased by us but not used for hosting yet.

The response I get for all is below. UNKNOWN 02-16-2015 01:25:02 0d 0h 21m 43s 3/3 UNKNOWN - Unable to figure out expiration date for somedomain.eu Domain.

If possible please make the changes to accommodate above root domains.

glensc commented 9 years ago

most of these domains whois output contains no expiry information (run yourself whois DOMAIN.TLD). likely because your domain is not active. find some other domain from the tld if you need the support. I found data only for 4 items:

$ ./test.sh autoproff.gl autoproff.ir autoproff.pl autoproff.si
-> autoproff.gl
OK - Domain autoproff.gl will expire in 330 days (2016-01-14).
<- autoproff.gl
-> autoproff.ir
UNKNOWN - Unable to figure out expiration date for autoproff.ir Domain.
<- autoproff.ir
-> autoproff.pl
UNKNOWN - Unable to figure out expiration date for autoproff.pl Domain.
<- autoproff.pl
-> autoproff.si
UNKNOWN - Unable to figure out expiration date for autoproff.si Domain.
<- autoproff.si

the three with UNKNOWN can be fixed.

nevilleonline commented 9 years ago

I think some of the whois servers do not support format which include expiry date. I maybe wrong. Like for example whois autoproff.at

domain: autoproff.at registrant: AA9977813-NICAT admin-c: AA9977813-NICAT tech-c: LDA7128895-NICAT nserver: ns1.gratisdns.dk nserver: ns2.gratisdns.dk nserver: ns3.gratisdns.dk nserver: ns4.gratisdns.dk nserver: ns5.gratisdns.dk changed: 20150114 18:47:39 source: AT-DOM

personname: XXXXX organization: XXXXXXX street address: XXXXXXXXX street address: XXXXXXXXXXXXX postal code: XXX city: XXXXX country: XXXXXXXXX nic-hdl: AA9977813-NICAT changed: 20150114 18:47:36 source: AT-DOM

personname: organization: XXXXXXXXXXXX street address: XXXXXXXXXXXXXX street address: XXXXXXXXXXXXXXXX postal code: XXXXXX city: XXXXXXXXXX country: XXXXXXXXX nic-hdl: LDA7128895-NICAT changed: 20100420 11:43:21 source: AT-DOM

Another example whois autoproff.be

Domain: autoproff.be Status: NOT AVAILABLE Registered: Wed Jan 14 2015

Registrant: Not shown, please visit www.dns.be for webbased whois.

Registrar Technical Contacts: Name: XXXXXXXXXXXX Organisation: XXXXXXXXXXXX Language: en Phone: XXXXXXXXXXXX Fax: XXXXXXXXXXXX Email: XXXXXXXXXXXX

Registrar: Name: XXXXXXXXXXXX Website: http://www.gratisdns.dk/

Nameservers: ns1.gratisdns.dk ns2.gratisdns.dk ns3.gratisdns.dk ns4.gratisdns.dk ns5.gratisdns.dk

Keys:

Flags:

But I will find out the real reason why they dont include some form of expiry date parameter.Thanks for your help.

nevilleonline commented 9 years ago

Would you be able to add for autoproff.pt domain

whois autoproff.pt [Querying whois.dns.pt] [whois.dns.pt] Nome de domínio / Domain Name: autoproff.pt Data de registo / Creation Date (dd/mm/yyyy): 19/01/2015 Data de expiração / Expiration Date (dd/mm/yyyy): 18/01/2016 Estado / Status: ACTIVE

Titular / Registrant XXXXXXX XXXXXXX XXXXXXX Email: XXXXXXX

Entidade Gestora / Billing Contact EPAG Domainservices GmbH Email: XXXXXXX

Responsável Técnico / Tech Contact EPAG Domainservices GmbH Email: XXXXXXX

Nameserver Information Nameserver: autoproff.pt NS ns4.gratisdns.dk. Nameserver: autoproff.pt NS ns1.gratisdns.dk. Nameserver: autoproff.pt NS ns2.gratisdns.dk. Nameserver: autoproff.pt NS ns5.gratisdns.dk. Nameserver: autoproff.pt NS ns3.gratisdns.dk.

This one also include expiry date information (Data de expiração / Expiration Date (dd/mm/yyyy): 18/01/2016). Thanks

glensc commented 9 years ago

create new issue what whois data is available for domains you request.