gatus: domain expiration check
Describe the bug
It seems that DOMAIN_EXPIRATION check fails whenever Expiry date is few years ahead:
output from whois:
Relevant dates:
...
Expiry date: 31-Jul-2031
...
check is failing:
What do you see?
No response
What do you expect to see?
No response
List the steps that must be taken to reproduce this issue
Use DOMAIN_EXPIRATION check on long lasting domain
Version
No response
Additional information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 20 (12 by maintainers)
This issue is still exist in latest version.
For anybody who wants to support additional domains, as I mentioned in an earlier comment, it goes through https://github.com/TwiN/whois, so Iād suggest submitting a PR if you can, but you can also create an issue on said repo š
@ArturZurawski , the issue is that there is no specific format for WHOIS information. The Gatus project uses github.com/TwiN/whois to parse this information. In the whois project, TLDs are used for filtering and applying the date format. The function responsible for this can be found in the following link: https://github.com/TwiN/whois/blob/029a9259cbe132dd38eea0e6935e2fbb253ad1ec/whois.go#L150
The date format can be as follows: 01/02/2016. However, depending on the TLD, the first digit can represent either the month or the day. It is impossible to parse this date without additional context.
I am relying on what has been previously implemented in the package used by Gatus for all other cases. If you have a better solution, I would be glad to hear it and will try to implement it.
@lefes sure!
This may or may not involve another project of mine: github.com/TwiN/whois