glensc / monitoring-plugin-check_domain

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

Add support for RESTENA-WHOIS (.lu domains) #70

Closed kwisatz closed 6 years ago

kwisatz commented 7 years ago

Sorry, I'm not an awk expert. The guess_expiration() function could probably be rewritten in a more efficient way. I'm happily accepting improvement suggestions ;)

kwisatz commented 7 years ago

OK, I see that this is not going to work for each version of awk out there. E.g.

original-awk: calling undefined function strftime
 input record number 31, file /tmp/check_domainybLDLU
 source line number 67

Related question: how to make the tests fail in this case?

glensc commented 7 years ago

please include the line you parse in code comments.

yes, the tests that run, do not trigger actual error, it's only to visually inspect things are fine. i haven't got around to write one myself, and haven't found useful shell based testing framerwork either.

i guess one call do system call if awk is poor enough?