diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index d19445a55b9389ff7f6603366a2e56269b846700..5c4cd4a3a7d769126b7bea5df1d25f45a612c4e4 100644 (file)
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
#include "popen.h"
#include "utils.h"
-const char *PROGNAME = "check_nagios";
+const char *progname = "check_nagios";
int process_arguments (int, char **);
void print_usage (void);
else
terminate (STATE_UNKNOWN,
"Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
process_string = argv[3];
return OK;
}
switch (c) {
case '?': /* print short usage statement if args not parsable */
- printf ("%s: Unknown argument: %c\n\n", PROGNAME, optopt);
+ printf ("%s: Unknown argument: %c\n\n", progname, optopt);
print_usage ();
exit (STATE_UNKNOWN);
case 'h': /* help */
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (PROGNAME, "$Revision$");
+ print_revision (progname, "$Revision$");
exit (STATE_OK);
case 'F': /* hostname */
status_log = optarg;
else
terminate (STATE_UNKNOWN,
"Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
break;
}
}
if (status_log == NULL)
terminate (STATE_UNKNOWN,
"You must provide the status_log\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
else if (process_string == NULL)
terminate (STATE_UNKNOWN,
"You must provide a process string\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
return OK;
}
{
printf
("Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n",
- PROGNAME);
+ progname);
}
void
print_help (void)
{
- print_revision (PROGNAME, "$Revision$");
+ print_revision (progname, "$Revision$");
printf
("Copyright (c) 2000 Ethan Galstad/Karl DeBisschop\n\n"
"This plugin attempts to check the status of the Nagios process on the local\n"