-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SimpleDomain check #59
Conversation
sauna/plugins/ext/simple_domain.py
Outdated
@staticmethod | ||
def config_sample(): | ||
return ''' | ||
# Make an domain request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: Make a domain request, crit if domain can't be resolved
sauna/plugins/ext/simple_domain.py
Outdated
domain = check_config.get('domain') | ||
|
||
try: | ||
r = socket.gethostbyname(domain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only problem I see is that it does not support IPv6.
Could you check if getaddrinfo
does the job?
https://docs.python.org/3/library/socket.html#socket.getaddrinfo
sauna/plugins/ext/simple_domain.py
Outdated
@staticmethod | ||
def config_sample(): | ||
return ''' | ||
# Make an domain request, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still miss one: Make A domain request ;)
Usefull to just be alert if DNS is down or if your domain name can't be resolv
IPv6 is working now |
Usefull to just be alert if DNS is down or if your domain name can't be
resolv