summaryrefslogtreecommitdiffstats
path: root/plugins/check_dig.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_dig.c')
-rw-r--r--plugins/check_dig.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index e3f7adb..34197ec 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -143,8 +143,10 @@ main (int argc, char **argv)
143 } 143 }
144 } 144 }
145 145
146 if (result == STATE_UNKNOWN) 146 if (result == STATE_UNKNOWN) {
147 msg = (char *)_("No ANSWER SECTION found"); 147 msg = (char *)_("No ANSWER SECTION found");
148 result = STATE_CRITICAL;
149 }
148 150
149 /* If we get anything on STDERR, at least set warning */ 151 /* If we get anything on STDERR, at least set warning */
150 if(chld_err.buflen > 0) { 152 if(chld_err.buflen > 0) {
@@ -295,7 +297,10 @@ process_arguments (int argc, char **argv)
295int 297int
296validate_arguments (void) 298validate_arguments (void)
297{ 299{
298 return OK; 300 if (query_address != NULL)
301 return OK;
302 else
303 return ERROR;
299} 304}
300 305
301 306
@@ -357,7 +362,7 @@ void
357print_usage (void) 362print_usage (void)
358{ 363{
359 printf (_("Usage:")); 364 printf (_("Usage:"));
360 printf ("%s -H <host> -l <query_address> [-p <server port>]\n", progname); 365 printf ("%s -l <query_address> [-H <host>] [-p <server port>]\n", progname);
361 printf (" [-T <query type>] [-w <warning interval>] [-c <critical interval>]\n"); 366 printf (" [-T <query type>] [-w <warning interval>] [-c <critical interval>]\n");
362 printf (" [-t <timeout>] [-a <expected answer address>] [-v]\n"); 367 printf (" [-t <timeout>] [-a <expected answer address>] [-v]\n");
363} 368}