mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
Fix long options parsing in check_disk, check_dns, check_mrtg and check_mrtgtraf (check_tcp was done in an earlier commit)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2078 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
4bdb362b61
commit
4e366f82de
8 changed files with 14 additions and 15 deletions
2
NEWS
2
NEWS
|
|
@ -11,7 +11,7 @@ This file documents the major additions and syntax changes between releases.
|
|||
Extra-opts (C plugins) does not allow trailing comments anymore (like N::P)
|
||||
Fixed dependency issue on libtap when ./configure --enable-libtap used. Warning: will install libtap
|
||||
Fixed segfault in extra-opts under some circumstance when reading multiple sections
|
||||
Fix long options parsing in check_tcp
|
||||
Fix long options parsing in check_disk, check_dns, check_mrtg, check_mrtgtraf and check_tcp.
|
||||
check_icmp now reports min and max round trip time perfdata (Steve Rader)
|
||||
Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159)
|
||||
|
||||
|
|
|
|||
|
|
@ -477,8 +477,8 @@ process_arguments (int argc, char **argv)
|
|||
{"iwarning", required_argument, 0, 'W'},
|
||||
/* Dang, -C is taken. We might want to reshuffle this. */
|
||||
{"icritical", required_argument, 0, 'K'},
|
||||
{"kilobytes", required_argument, 0, 'k'},
|
||||
{"megabytes", required_argument, 0, 'm'},
|
||||
{"kilobytes", no_argument, 0, 'k'},
|
||||
{"megabytes", no_argument, 0, 'm'},
|
||||
{"units", required_argument, 0, 'u'},
|
||||
{"path", required_argument, 0, 'p'},
|
||||
{"partition", required_argument, 0, 'p'},
|
||||
|
|
|
|||
|
|
@ -340,8 +340,8 @@ process_arguments (int argc, char **argv)
|
|||
{"reverse-server", required_argument, 0, 'r'},
|
||||
{"expected-address", required_argument, 0, 'a'},
|
||||
{"expect-authority", no_argument, 0, 'A'},
|
||||
{"warning", no_argument, 0, 'w'},
|
||||
{"critical", no_argument, 0, 'c'},
|
||||
{"warning", required_argument, 0, 'w'},
|
||||
{"critical", required_argument, 0, 'c'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,8 @@ main (int argc, char *argv[])
|
|||
{"auto-off", no_argument, 0, '0'},
|
||||
{"nagios", no_argument, 0, 'n'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'V'}, {0, 0, 0, 0}
|
||||
{"version", no_argument, 0, 'V'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ process_arguments (int argc, char **argv)
|
|||
{"warning", required_argument, 0, 'w'},
|
||||
{"label", required_argument, 0, 'l'},
|
||||
{"units", required_argument, 0, 'u'},
|
||||
{"verbose", no_argument, 0, 'v'},
|
||||
{"variable", required_argument, 0, 'v'},
|
||||
{"version", no_argument, 0, 'V'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
|
|
@ -334,7 +334,7 @@ print_help (void)
|
|||
|
||||
printf (" %s\n", "-F, --logfile=FILE");
|
||||
printf (" %s\n", _("The MRTG log file containing the data you want to monitor"));
|
||||
printf ("-e, --expires=MINUTES");
|
||||
printf (" %s\n", "-e, --expires=MINUTES");
|
||||
printf (" %s\n", _("Minutes before MRTG data is considered to be too old"));
|
||||
printf (" %s\n", "-a, --aggregation=AVG|MAX");
|
||||
printf (" %s\n", _("Should we check average or maximum values?"));
|
||||
|
|
|
|||
|
|
@ -223,13 +223,11 @@ process_arguments (int argc, char **argv)
|
|||
|
||||
int option = 0;
|
||||
static struct option longopts[] = {
|
||||
{"logfile", required_argument, 0, 'F'},
|
||||
{"filename", required_argument, 0, 'F'},
|
||||
{"expires", required_argument, 0, 'e'},
|
||||
{"aggregation", required_argument, 0, 'a'},
|
||||
{"variable", required_argument, 0, 'v'},
|
||||
{"critical", required_argument, 0, 'c'},
|
||||
{"warning", required_argument, 0, 'w'},
|
||||
{"verbose", no_argument, 0, 'v'},
|
||||
{"version", no_argument, 0, 'V'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
|
|
@ -385,6 +383,6 @@ void
|
|||
print_usage (void)
|
||||
{
|
||||
printf (_("Usage"));
|
||||
printf (" %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair>",progname);
|
||||
printf ("-c <critical_pair> [-e expire_minutes] [-t timeout] [-v]\n");
|
||||
printf (" %s -F <log_file> -a <AVG | MAX> -w <warning_pair>\n",progname);
|
||||
printf ("-c <critical_pair> [-e expire_minutes]\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ process_arguments (int argc, char **argv)
|
|||
return ERROR;
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "hvVSP:p:u:d:H:s:q:w:c:", longopts, &option);
|
||||
c = getopt_long (argc, argv, "hvVP:p:u:d:H:s:q:w:c:", longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -745,6 +745,6 @@ void print_help(void)
|
|||
void print_usage(void)
|
||||
{
|
||||
printf (_("Usage:"));
|
||||
printf ("%s -H host -v variable [-p port] [-w warning] [-c critical]",progname);
|
||||
printf ("%s -H host -v variable [-p port] [-w warning] [-c critical]\n",progname);
|
||||
printf ("[-l params] [-d SHOWALL] [-t timeout]\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue