Support retrieving domain expiration date via WHOIS
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?
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.
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)?
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.