summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 386b791)
raw | patch | inline | side by side (parent: 386b791)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Wed, 25 Mar 2009 03:46:09 +0000 (23:46 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Wed, 25 Mar 2009 03:46:09 +0000 (23:46 -0400) |
NEWS | patch | blob | history | |
plugins/check_nt.c | patch | blob | history |
index 4f3a833e562bf292982bcc9f04d0bb360c3c1dfb..e9e24a7820528060a89334920b80505c47eb907b 100644 (file)
--- a/NEWS
+++ b/NEWS
Fixed negate not printing the real timeout in ALRM handler when left to default
negate timeout result is now configurable
Fixed segfault in check_mysql with old slaves (#2696823 - Oskar Ahner)
+ check_nt can return UNKNOWN on timeouts (-u)
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 48bdcccdac9bb0a221226df4ce5ec41eb1908e60..ec944e4c45a379d9ac6365414714a5c0247e9a42 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
{"params", required_argument,0,'l'},
{"secret", required_argument,0,'s'},
{"display", required_argument,0,'d'},
+ {"unknown-timeout", no_argument, 0, 'u'},
{"version", no_argument, 0,'V'},
{"help", no_argument, 0,'h'},
{0,0,0,0}
}
while (1) {
- c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",longopts,&option);
+ c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:u",longopts,&option);
if (c==-1||c==EOF||c==1)
break;
if (!strcmp(optarg,"SHOWALL"))
show_all = TRUE;
break;
+ case 'u':
+ socket_timeout_state=STATE_UNKNOWN;
+ break;
case 't': /* timeout */
socket_timeout=atoi(optarg);
if(socket_timeout<=0)
printf (" %s", _("Parameters passed to specified check (see below)"));
printf (" %s\n", "-d, --display={SHOWALL}");
printf (" %s", _("Display options (currently only SHOWALL works)"));
+ printf (" %s\n", "-u, --unknown-timeout");
+ printf (" %s", _("Return UNKNOWN on timeouts"));
printf ("%d)\n", DEFAULT_SOCKET_TIMEOUT);
printf (" %s\n", "-h, --help");
printf (" %s\n", _("Print this help screen"));
{
printf (_("Usage:"));
printf ("%s -H host -v variable [-p port] [-w warning] [-c critical]\n",progname);
- printf ("[-l params] [-d SHOWALL] [-t timeout]\n");
+ printf ("[-l params] [-d SHOWALL] [-u] [-t timeout]\n");
}