validate_arguments (void)
{
if (variable_number == -1)
usage4 (_("You must supply the variable number"));
if (label == NULL)
label = strdup ("value");
if (units == NULL)
units = strdup ("");
return OK;
}
void
print_help (void)
{
print_revision (progname, revision);
printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
printf (COPYRIGHT, copyright, email);
printf ("%s\n", _("This plugin will check either the average or maximum value of one of the"));
printf ("%s\n", _("two variables recorded in an MRTG log file."));
printf ("\n\n");
print_usage ();
printf (_(UT_HELP_VRSN));
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", _("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?"));
printf (" %s\n", "-v, --variable=INTEGER");
printf (" %s\n", _("Which variable set should we inspect? (1 or 2)"));
printf (" %s\n", "-w, --warning=INTEGER");
printf (" %s\n", _("Threshold value for data to result in WARNING status"));
printf (" %s\n", "-c, --critical=INTEGER");
printf (" %s\n", _("Threshold value for data to result in CRITICAL status"));
printf (" %s\n", "-l, --label=STRING");
printf (" %s\n", _("Type label for data (Examples: Conns, \"Processor Load\", In, Out)"));
printf (" %s\n", "-u, --units=STRING");
printf (" %s\n", _("Option units label for data (Example: Packets/Sec, Errors/Sec,"));
printf (" %s\n", _("\"Bytes Per Second\", \"%% Utilization\")"));
printf ("%s\n", _("If the value exceeds the <vwl> threshold, a WARNING status is returned. If"));
printf ("%s\n", _("the value exceeds the <vcl> threshold, a CRITICAL status is returned. If"));
printf ("%s\n", _("the data in the log file is older than <expire_minutes> old, a WARNING"));
printf ("%s\n", _("status is returned and a warning message is printed."));
printf ("%s\n", _("This plugin is useful for monitoring MRTG data that does not correspond to"));
printf ("%s\n", _("bandwidth usage. (Use the check_mrtgtraf plugin for monitoring bandwidth)."));
printf ("%s\n", _("It can be used to monitor any kind of data that MRTG is monitoring - errors,"));
printf ("%s\n", _("packets/sec, etc. I use MRTG in conjuction with the Novell NLM that allows"));
printf ("%s\n", _("me to track processor utilization, user connections, drive space, etc and"));
printf ("%s\n\n", _("this plugin works well for monitoring that kind of data as well."));
printf ("%s\n", _("Notes:"));
printf (" %s\n", _("- This plugin only monitors one of the two variables stored in the MRTG log"));
printf (" %s\n", _(" file. If you want to monitor both values you will have to define two"));
printf (" %s\n", _(" commands with different values for the <variable> argument. Of course,"));
printf (" %s\n", _("you can always hack the code to make this plugin work for you..."));
printf (" %s\n", _("- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded from"));
printf (" %s\n", "http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html");
printf (_(UT_SUPPORT));
}
/* original command line:
<log_file> <expire_minutes> <AVG|MAX> <variable> <vwl> <vcl> <label> [units] */
void
print_usage (void)
{
printf (_("Usage:"));
printf ("%s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n",progname);
printf ("[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n");
}
=4=
THE END |