mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-09 08:42:17 -04:00
Merge pull request #1634 from ghciv6/check_dns_detect_unreach_svc
detect unreachable dns service in nslookup output
This commit is contained in:
commit
cadac85e12
1 changed files with 6 additions and 1 deletions
|
|
@ -202,7 +202,10 @@ main (int argc, char **argv)
|
|||
if (error_scan (chld_err.line[i]) != STATE_OK) {
|
||||
result = max_state (result, error_scan (chld_err.line[i]));
|
||||
msg = strchr(input_buffer, ':');
|
||||
if(msg) msg++;
|
||||
if(msg)
|
||||
msg++;
|
||||
else
|
||||
msg = input_buffer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -348,6 +351,8 @@ error_scan (char *input_buffer)
|
|||
/* DNS server is not running... */
|
||||
else if (strstr (input_buffer, "No response from server"))
|
||||
die (STATE_CRITICAL, _("No response from DNS %s\n"), dns_server);
|
||||
else if (strstr (input_buffer, "no servers could be reached"))
|
||||
die (STATE_CRITICAL, _("No response from DNS %s\n"), dns_server);
|
||||
|
||||
/* Host name is valid, but server doesn't have records... */
|
||||
else if (strstr (input_buffer, "No records"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue