gatus icon indicating copy to clipboard operation
gatus copied to clipboard

Support retrieving domain expiration date via WHOIS

Open evsyukovaa opened this issue 4 years ago • 3 comments

Is it possible to track dns, dns expiration date as for certificates. whois google.ru created: 2004-03-03T21: 00: 00Z paid-till: 2022-03-04T21: 00: 00Z free-date: 2022-04-05 DNS does not have such a function, or I don’t know how to do it?

evsyukovaa avatar Jul 11 '21 04:07 evsyukovaa

By "dns expiration date", you meant the domain expiration date, right?

That data is actually exposed by the registrars AFAIK, not the DNS, and WHOIS is the "protocol" used to access the information. It's not currently supported, but I can see that being a useful feature.

TwiN avatar Jul 11 '21 20:07 TwiN

yes, it will be enough to know when "paid till" and show it if the due date approaches. Need to create a task about this)?

evsyukovaa avatar Jul 12 '21 02:07 evsyukovaa

I lazily implemented a WHOIS client at https://github.com/TwiN/whois and I'm thinking about implementing monitoring for domain expiration.

Should be as simple as using strings.Index with the knowledge that Registry Expiry Date: and \n are the two strings wrapping the data we're interested in.

That being said, https://github.com/TwiN/whois might need some more polishing

As for the implementation on Gatus' side, to be consistent with the other types of protocols that can be monitored, we'd need something like expiry://domain.com? Sounds a little silly. I'm sure we can find a better name for it.

TwiN avatar Nov 16 '21 03:11 TwiN