shift / domain_exporter

Prometheus WHOIS domain details exporter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exporter can't parse *.kz domain

UstyuzhaninAV opened this issue · comments

exporter can't parse *.kz domain

level=warn ts=2020-03-13T10:21:15.944Z caller=main.go:169 warn="Don't know how to parse domain: blablabla.kz"
level=warn ts=2020-03-13T10:21:15.944Z caller=main.go:109 warn="Don't know how to parse domain: blablabla.kz"

That error is coming from no expiration date found in the WHOIS response. I don't see any lines for a couple *.kz domains.

$ whois google.kz
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

refer:        whois.nic.kz

domain:       KZ

organisation: Association of IT Companies of Kazakhstan
address:      6/5 Kabanbai Batyra
address:      Office 3
address:      Astana AST 010000
address:      Kazakhstan

contact:      administrative
name:         Nurlan Issin
organisation: Association of IT Companies of Kazakhstan
address:      6/5 Kabanbai Batyra
address:      Office 3
address:      Astana AST 010000
address:      Kazakhstan
phone:        +7 (7172) 92-55-52
fax-no:       +7 (7172) 92 54 11
e-mail:       info@itk.kz

contact:      technical
name:         Pavel Gussev
organisation: KazNIC Organization
address:      Ilyashev str, 47/2
address:      Semey VKO 071400
address:      Kazakhstan
phone:        +7 (7222) 60-00-06, 60-44-44
fax-no:       +7 (7222) 60-47-40
e-mail:       pg@nic.kz

nserver:      NS.NIC.KZ 194.0.21.5 2001:678:98:1:0:0:0:5
nserver:      NS1.NIC.KZ 185.79.212.7 2a01:7640:9000:0:0:0:0:7

whois:        whois.nic.kz

status:       ACTIVE
remarks:      Registration information: http://www.nic.kz

created:      1994-09-19
changed:      2017-01-13
source:       IANA

Whois Server for the KZ top level domain name.
This server is maintained by KazNIC Organization, a ccTLD manager for Kazakhstan Republic.

Domain Name............: google.kz

Organization Using Domain Name
Name...................: Google Inc.
Organization Name......: Google Inc.
Street Address.........: 2400 E. Bayshore Pkwy
City...................: Mountain View
State..................: CA
Postal Code............: 94043
Country................: US

Administrative Contact/Agent
NIC Handle.............: C000000197393-KZ
Name...................: DNS Admin
Phone Number...........: +1.6502530000 
Fax Number.............: +1.6506188571 
Email Address..........: ccops@markmonitor.com

Nameserver in listed order

Primary server.........: ns1.google.com
Primary ip address.....: 216.239.32.10

Secondary server.......: ns2.google.com
Secondary ip address...: 216.239.34.10


Domain created: 1999-06-07 13:01:43 (GMT+0:00)
Last modified : 2012-11-28 03:16:59 (GMT+0:00)
Domain status : ok - Normal state.
                
Registar created: KAZNIC
Current Registar: KAZNIC


That error is coming from no expiration date found in the WHOIS response. I don't see any lines for a couple *.kz domains.

$ whois google.kz
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

refer:        whois.nic.kz

domain:       KZ

organisation: Association of IT Companies of Kazakhstan
address:      6/5 Kabanbai Batyra
address:      Office 3
address:      Astana AST 010000
address:      Kazakhstan

contact:      administrative
name:         Nurlan Issin
organisation: Association of IT Companies of Kazakhstan
address:      6/5 Kabanbai Batyra
address:      Office 3
address:      Astana AST 010000
address:      Kazakhstan
phone:        +7 (7172) 92-55-52
fax-no:       +7 (7172) 92 54 11
e-mail:       info@itk.kz

contact:      technical
name:         Pavel Gussev
organisation: KazNIC Organization
address:      Ilyashev str, 47/2
address:      Semey VKO 071400
address:      Kazakhstan
phone:        +7 (7222) 60-00-06, 60-44-44
fax-no:       +7 (7222) 60-47-40
e-mail:       pg@nic.kz

nserver:      NS.NIC.KZ 194.0.21.5 2001:678:98:1:0:0:0:5
nserver:      NS1.NIC.KZ 185.79.212.7 2a01:7640:9000:0:0:0:0:7

whois:        whois.nic.kz

status:       ACTIVE
remarks:      Registration information: http://www.nic.kz

created:      1994-09-19
changed:      2017-01-13
source:       IANA

Whois Server for the KZ top level domain name.
This server is maintained by KazNIC Organization, a ccTLD manager for Kazakhstan Republic.

Domain Name............: google.kz

Organization Using Domain Name
Name...................: Google Inc.
Organization Name......: Google Inc.
Street Address.........: 2400 E. Bayshore Pkwy
City...................: Mountain View
State..................: CA
Postal Code............: 94043
Country................: US

Administrative Contact/Agent
NIC Handle.............: C000000197393-KZ
Name...................: DNS Admin
Phone Number...........: +1.6502530000 
Fax Number.............: +1.6506188571 
Email Address..........: ccops@markmonitor.com

Nameserver in listed order

Primary server.........: ns1.google.com
Primary ip address.....: 216.239.32.10

Secondary server.......: ns2.google.com
Secondary ip address...: 216.239.34.10


Domain created: 1999-06-07 13:01:43 (GMT+0:00)
Last modified : 2012-11-28 03:16:59 (GMT+0:00)
Domain status : ok - Normal state.
                
Registar created: KAZNIC
Current Registar: KAZNIC

Yes, but if we try cheсk date at Russian server expire date present there
whois google.kz -h whois.ru domain: WHOIS.RU nserver: jessica.ns.cloudflare.com. nserver: trey.ns.cloudflare.com. state: REGISTERED, DELEGATED, VERIFIED org: Domain name registrar SALENAMES LTD. registrar: SALENAMES-RU admin-contact: https://partner.salenames.ru/contact_admin.khtml created: 1999-05-14T13:58:12Z paid-till: 2020-05-31T21:00:00Z free-date: 2020-07-02 source: TCI

Confirmed that shows up. We'll need to query the other WHOIS server for *.kz doamins and parse out paid-till as the expiration.

I think paid-till isn't the right field. Three domains return the same result.

$ whois akorda.kz -h whois.ru  | grep paid 
paid-till:     2020-05-31T21:00:00Z

$ whois google.kz -h whois.ru  | grep paid 
paid-till:     2020-05-31T21:00:00Z

$ whois kmg.kz -h whois.ru  | grep paid 
paid-till:     2020-05-31T21:00:00Z

it's magic but I can give information for our domain at this whois check server
https://www.nic.ru/whois/?ipartner=3537&adv_id=41&utm_source=adwords&utm_medium=cpc&utm_campaign=Whois_Russia_Search_Google&utm_content=82385672480_whois&gclid=EAIaIQobChMI4_PM6M305wIVRuaaCh08LgtiEAAYBCAAEgJpI_D_BwE&searchWord=timepad.kz

but for you domain I can't give the same output
maby it dependence when (date/year) domain registrated?

Hmm. I can't find an address from nic.ru to make WHOIS queries with. The exporter (and underlying library) doesn't scrape HTML, but I think we could add it here.

WHOIS attempts
$ whois -h whois.ru -- timepad.kz
whois: connect(): Operation timed out

$ whois -h whois.nic.kz -- timepad.kz
Whois Server for the KZ top level domain name.
This server is maintained by KazNIC Organization, a ccTLD manager for Kazakhstan Republic.

Domain Name............: timepad.kz

Organization Using Domain Name
Name...................: Dmitriy N Ukhanov
Organization Name......: Dmitriy N Ukhanov
Street Address.........: Centre of moscow
City...................: Moscow
State..................: Moscow
Postal Code............: 119119
Country................: RU

Administrative Contact/Agent
NIC Handle.............: MHP5WKX-RU
Name...................: Dmitriy N Ukhanov
Phone Number...........: +7.9257402260 
Fax Number.............:  
Email Address..........: dima.ukhanov@gmail.com

Nameserver in listed order

Primary server.........: cloe.ns.cloudflare.com
Primary ip address.....: 173.245.58.86

Secondary server.......: valentin.ns.cloudflare.com
Secondary ip address...: 162.159.44.206


Domain created: 2020-02-17 13:07:37 (GMT+0:00)
Last modified : 2020-02-17 13:21:23 (GMT+0:00)
Domain status : clientTransferProhibited - 
                clientRenewProhibited - 
                
Registar created: CENTROHOST
Current Registar: CENTROHOST


But here no Registrar Registration Expiration Date

@shift any thoughts if we add an http+html parser for this?

@adamdecaf I've no objections.

@adamdecaf Is this resolved now?

I doubt it. I haven't made any changes to scrape their HTML whois page.