summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 140a93c)
raw | patch | inline | side by side (parent: 140a93c)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sun, 27 Apr 2008 14:35:26 +0000 (14:35 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sun, 27 Apr 2008 14:35:26 +0000 (14:35 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
33 files changed:
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 02653933789f4b6f075390f9f2edf219e787ab46..bd59c7069d1b6bb51c5e44933ac8e12cd6e98220 100644 (file)
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
* Nagios check_apt plugin
*
* License: GPL
-* Copyright (c) 2006-2007 Nagios Plugins Development Team
+* Copyright (c) 2006-2008 Nagios Plugins Development Team
*
* Original author: Sean Finney
*
const char *progname = "check_apt";
const char *revision = "$Revision$";
-const char *copyright = "2006-2007";
+const char *copyright = "2006-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
print_help (void)
{
print_revision(progname, revision);
-
+
printf(_(COPYRIGHT), copyright, email);
-
+
printf("%s\n", _("This plugin checks for software updates on systems that use"));
printf("%s\n", _("package management systems based on the apt-get(8) command"));
printf("%s\n", _("found in Debian GNU/Linux"));
printf ("\n\n");
print_usage();
-
+
printf(_(UT_HELP_VRSN));
-
+
printf(_(UT_TIMEOUT), timeout_interval);
-
+
printf (" %s\n", "-U, --upgrade=OPTS");
printf (" %s\n", _("[Default] Perform an upgrade. If an optional OPTS argument is provided,"));
printf (" %s\n", _("apt-get will be run with these command line options instead of the"));
printf (" %s\n", _("upgrades for Debian and Ubuntu:"));
printf (" \t\%s\n", SECURITY_RE);
printf (" %s\n", _("Note that the package must first match the include list before its"));
- printf (" %s\n\n\n", _("information is compared against the critical list."));
-
+ printf (" %s\n\n", _("information is compared against the critical list."));
+
printf ("%s\n\n", _("The following options require root privileges and should be used with care:"));
printf (" %s\n", "-u, --update=OPTS");
printf (" %s\n", _("First perform an 'apt-get update'. An optional OPTS parameter overrides"));
printf (" %s\n", _("the default options. Note: you may also need to adjust the global"));
printf (" %s\n", _("timeout (with -t) to prevent the plugin from timing out if apt-get"));
printf (" %s\n", _("upgrade is expected to take longer than the default timeout."));
+
+ printf(_(UT_SUPPORT));
}
-
+
/* simple usage heading */
void
print_usage(void)
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 9b38506ffcdbfc14aabecf8c7e00eb7bd6b3c21e..37874bf8ccaed50718929be10061857f26adc2b6 100644 (file)
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
* Nagios check_by_ssh plugin
*
* License: GPL
-* Copyright (c) 2000-2007 Nagios Plugins Development Team
+* Copyright (c) 2000-2008 Nagios Plugins Development Team
*
* Last Modified: $Date$
*
* $Id$
*
*****************************************************************************/
-
+
const char *progname = "check_by_ssh";
const char *revision = "$Revision$";
-const char *copyright = "2000-2007";
+const char *copyright = "2000-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
printf (_("This plugin uses SSH to execute commands on a remote host"));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]"));
printf (_(UT_WARN_CRIT));
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
+ printf (_(UT_VERBOSE));
+ printf("\n");
printf (" %s\n", _("The most common mode of use is to refer to a local identity file with"));
printf (" %s\n", _("the '-i' option. In this mode, the identity pair should have a null"));
printf (" %s\n", _("passphrase and the public key should be listed in the authorized_keys"));
printf (" %s\n", _("only one command on the remote server. If the remote SSH server tracks"));
printf (" %s\n", _("invocation arguments, the one remote program may be an agent that can"));
printf (" %s\n", _("execute additional commands as proxy"));
+ printf("\n");
printf (" %s\n", _("To use passive mode, provide multiple '-C' options, and provide"));
printf (" %s\n", _("all of -O, -s, and -n options (servicelist order must match '-C'options)"));
printf ("\n");
printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c1;0; up 2 days");
printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days");
printf (" %s\n", "[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days");
- printf (_(UT_VERBOSE));
- printf (_(UT_SUPPORT));
+
+ printf(_(UT_SUPPORT));
}
index c67573a36cc4bd83e805e67d4c4bb53f686d5611..ac3eeceb0eebce9b891af4e8ae218aaaee7e8971 100644 (file)
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
printf("\n");
printf("%s\n", _("Notes:"));
- printf(" %s\n", _("See:"));
- printf(" %s\n", ("http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT"));
- printf(" %s\n", _("for THRESHOLD format and examples."));
+ printf(_(UT_THRESHOLDS_NOTES));
printf(_(UT_SUPPORT));
- printf("\n");
}
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 72dd5992c0bff0116e78b2c932eb53430ab1cb5d..d7e1f579368670a890f7d8ae6c7d143ff2fa75d8 100644 (file)
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
* Nagios check_dig plugin
*
* License: GPL
-* Copyright (c) 2002-2007 Nagios Plugins Development Team
+* Copyright (c) 2002-2008 Nagios Plugins Development Team
*
* Last Modified: $Date$
*
const char *progname = "check_dig";
const char *revision = "$Revision$";
-const char *copyright = "2002-2007";
+const char *copyright = "2002-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h"
printf (_(UT_WARN_CRIT));
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
printf (_(UT_VERBOSE));
+
+ printf("\n");
printf ("%s\n", _("Examples:"));
printf (" %s\n", "check_dig -H DNSSERVER -l www.example.com -A \"+tcp\"");
printf (" %s\n", "This will send a tcp query to DNSSERVER for www.example.com");
+
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 44c154fce085a9a8e326cc295d274ed375cf7d01..7048a561b6ba8cbb56561cf49ca4fb92b485f2de 100644 (file)
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
temp_list = temp_list->name_next;
}
-
+
/* Process for every path in list */
for (path = path_select_list; path; path=path->name_next) {
for (temp_list = path_select_list; temp_list; temp_list=temp_list->name_next) {
if (temp_list->group && ! (strcmp(temp_list->group, path->group))) {
-
+
stat_path(path);
get_fs_usage (temp_list->best_match->me_mountdir, temp_list->best_match->me_devname, &tmpfsp);
fsp.fsu_bavail += (tmpfsp.fsu_bavail > tmpfsp.fsu_bfree ? 0 : tmpfsp.fsu_bavail); /* Free blocks available to non-superuser. */
fsp.fsu_files += tmpfsp.fsu_files; /* Total file nodes. */
fsp.fsu_ffree += tmpfsp.fsu_ffree; /* Free file nodes. */
-
+
if (verbose > 3)
printf("Group %s: add %llu blocks (%s) \n", path->group, tmpfsp.fsu_bavail, temp_list->name);
/* printf("Group %s: add %u blocks (%s)\n", temp_list->name); *//* path->group, tmpfsp.fsu_bavail, temp_list->name); */
me->me_mountdir, total, available, available_to_root, used, fsp.fsu_files, fsp.fsu_ffree);
dused_pct = calculate_percent( used, used + available ); /* used + available can never be > uintmax */
-
+
dfree_pct = 100 - dused_pct;
dused_units = used*fsp.fsu_blocksize/mult;
dfree_units = available*fsp.fsu_blocksize/mult;
while (temp_list) {
if (temp_list->best_match) {
if (np_regex_match_mount_entry(temp_list->best_match, &re)) {
-
+
if (verbose >=3)
printf("ignoring %s matching regex\n", temp_list->name);
regerror (err, &re, errbuf, MAX_INPUT_BUFFER);
die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), _("Could not compile regular expression"), errbuf);
}
-
+
for (me = mount_list; me; me = me->me_next) {
if (np_regex_match_mount_entry(me, &re)) {
fnd = TRUE;
crit_usedinodes_percent = NULL;
warn_freeinodes_percent = NULL;
crit_freeinodes_percent = NULL;
-
+
path_selected = FALSE;
group = NULL;
break;
@@ -875,7 +875,7 @@ INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greate
print_path (mypath);
return ERROR;
}
-
+
return OK;
}
printf (" %s\n", _("are grouped which means the freespace thresholds are applied to all disks together"));
printf (" %s\n", "check_disk -w 100M -c 50M -C -w 1000M -c 500M -p /foo -C -w 5% -c 3% -p /bar");
printf (" %s\n", _("Checks /foo for 1000M/500M and /bar for 5/3%. All remaining volumes use 100M/50M"));
+
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 276dad822cd2b87940087ecaa512eb36a878088c..f8dbb4dc8364735df4c6ab797ad006053c450a52 100644 (file)
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
addresses = malloc(sizeof(*addresses)*10);
else if (!(n_addresses % 10))
addresses = realloc(addresses,sizeof(*addresses) * (n_addresses + 10));
-
+
if (verbose)
puts(chld_out.line[i]);
/* Strip leading spaces */
for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++)
/* NOOP */;
-
+
strip(temp_buffer);
if (temp_buffer==NULL || strlen(temp_buffer)==0) {
die (STATE_CRITICAL,
printf ("%s\n", _("This plugin uses the nslookup program to obtain the IP address for the given host/domain query."));
printf ("%s\n", _("An optional DNS server to use may be specified."));
printf ("%s\n", _("If no DNS server is specified, the default server(s) specified in /etc/resolv.conf will be used."));
-
+
printf ("\n\n");
print_usage ();
-
+
printf (_(UT_HELP_VRSN));
-
+
printf (" -H, --hostname=HOST\n");
printf (" %s\n", _("The name or address you want to query"));
printf (" -s, --server=HOST\n");
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c
index a29407ce6d04f543faf20ebb9696fc3c4a30874b..372aaff8c8452676977867bccd10258046258d1a 100644 (file)
--- a/plugins/check_dummy.c
+++ b/plugins/check_dummy.c
printf (COPYRIGHT, copyright, email);
printf ("%s\n", _("This plugin will simply return the state corresponding to the numeric value"));
-
+
printf ("%s\n", _("of the <state> argument with optional text"));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 5a24ab455a0afb6622115a3a6e9c4c8d0ee27107..8617871a844d117dba206b5a524e87cfac3e9e87 100644 (file)
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
die (status, _("FPING %s - %s (loss=%.0f%% )|%s\n"),
state_text (status), server_name, loss ,
perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100));
-
+
}
else {
status = max_state (status, STATE_WARNING);
printf (COPYRIGHT, copyright, email);
printf ("%s\n", _("This plugin will use the fping command to ping the specified host for a fast check"));
-
+
printf ("%s\n", _("Note that it is necessary to set the suid flag on fping."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (" %s\n", _("number of ICMP packets to send (default: %d)"),PACKET_COUNT);
printf (_(UT_VERBOSE));
printf ("\n");
- printf (" %s\n", _("THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel time (ms)"));
- printf (" %s\n", _("which triggers a WARNING or CRITICAL state, and <pl> is the percentage of"));
- printf (" %s\n", _("packet loss to trigger an alarm state."));
+ printf (" %s\n", _("THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel time (ms)"));
+ printf (" %s\n", _("which triggers a WARNING or CRITICAL state, and <pl> is the percentage of"));
+ printf (" %s\n", _("packet loss to trigger an alarm state."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_game.c b/plugins/check_game.c
index aede055d978c343534510168abe3e779ffbcbcea..0e4120dda41516db54238c55af7cddc49c74d7f2 100644 (file)
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
-
+
if (process_arguments (argc, argv) == ERROR)
usage_va(_("Could not parse arguments"));
/* create the command line to execute */
asprintf (&command_line, "%s -raw %s -%s %s",
PATH_TO_QSTAT, QSTAT_DATA_DELIMITER, game_type, server_ip);
-
+
if (port)
asprintf (&command_line, "%s:%-d", command_line, port);
printf (_("This plugin tests game server connections with the specified host."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
-
+
printf (" %s\n", "-p");
printf (" %s\n", _("Optional port of which to connect"));
printf (" %s\n", "gf");
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
+ printf ("\n");
printf ("%s\n", _("Notes:"));
-
- printf ("%s\n", _("This plugin uses the 'qstat' command, the popular game server status query tool ."));
-
- printf ("%s\n", _("If you don't have the package installed, you will need to download it from"));
-
- printf ("%s\n", _("http://www.activesw.com/people/steve/qstat.html before you can use this plugin."));
+ printf (" %s\n", _("This plugin uses the 'qstat' command, the popular game server status query tool."));
+ printf (" %s\n", _("If you don't have the package installed, you will need to download it from"));
+ printf (" %s\n", _("http://www.activesw.com/people/steve/qstat.html before you can use this plugin."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index 6bcffae6a12d49f3505479862c66cb93917d4263..e20a76d9f2b9a6054d340096b7964d635bf18d7f 100644 (file)
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
printf ("%s\n", _("Net-snmp must be installed on the computer running the plugin."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (" %s", _("The SNMP community name "));
printf (_("(default=%s)"), DEFAULT_COMMUNITY);
+ printf ("\n");
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 82cd1d9c7ec703d5f6b3413ade492321000627ee..81071d756b554d7b3bcfa79ef6a56d2fa664e907 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
} else {
asprintf (&buf, "%sContent-Type: application/x-www-form-urlencoded\r\n", buf);
}
-
+
asprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
asprintf (&buf, "%s%s%s", buf, http_post_data, CRLF);
}
} /* end if (http_status >= 300) */
} /* end else (server_expect_yn) */
-
+
if (maximum_age >= 0) {
check_document_dates (header);
}
addr = malloc (MAX_IPV4_HOSTLENGTH + 1);
if (addr == NULL)
die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate addr\n"));
-
+
url = malloc (strcspn (pos, "\r\n"));
if (url == NULL)
die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate url\n"));
printf (" %s\n", _("When the certificate of 'www.verisign.com' is valid for more than 14 days,"));
printf (" %s\n", _("a STATE_OK is returned. When the certificate is still valid, but for less than"));
printf (" %s\n", _("14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when"));
- printf (" %s\n\n", _("the certificate is expired."));
+ printf (" %s\n", _("the certificate is expired."));
#endif
printf (_(UT_SUPPORT));
index c6ea28433a21f8d0e9852f566b6d6e5ade8f7eae..937f84c51c23bbe55300b274c6cadf8b1210854b 100644 (file)
printf (COPYRIGHT, copyright, email);
printf (_("This plugin checks a local hard drive with the (Linux specific) SMART interface [http://smartlinux.sourceforge.net/smart/index.php]."));
-
+
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
-
+
printf (" %s\n", "-d, --device=DEVICE");
printf (" %s\n", _("Select device DEVICE"));
printf (" %s\n", _("Note: if the device is selected with this option, _no_ other options are accepted"));
printf (" %s\n", "-0, --auto-off");
printf (" %s\n", _("Turn off automatic offline tests"));
printf (" %s\n", "-n, --nagios");
- printf (" %s\n\n", _("Output suitable for Nagios"));
+ printf (" %s\n", _("Output suitable for Nagios"));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 582f9cc1c88115d6ddbbb871cc1b84f6e5dce5df..74ca3b0ce3ac35e12a4366d251f04da4dc20dfa0 100644 (file)
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
printf (COPYRIGHT, copyright, email);
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (_(UT_VERBOSE));
- printf ("\n%s\n", _("Note:"));
- printf ("%s\n", _("If this plugin is called via 'check_ldaps', method 'STARTTLS' will be"));
- printf (_("implied (using default port %i) unless --port=636 is specified. In that case %s"), DEFAULT_PORT, "\n");
- printf ("%s\n", _("'SSL on connect' will be used no matter how the plugin was called."));
- printf ("%s\n", _("This detection is deprecated, please use 'check_ldap' with the '--starttls' or '--ssl' flags"));
- printf ("%s\n", _("to define the behaviour explicitly instead."));
+ printf ("\n%s\n", _("Notes:"));
+ printf (" %s\n", _("If this plugin is called via 'check_ldaps', method 'STARTTLS' will be"));
+ printf (_(" implied (using default port %i) unless --port=636 is specified. In that case %s"), DEFAULT_PORT, "\n");
+ printf (" %s\n", _("'SSL on connect' will be used no matter how the plugin was called."));
+ printf (" %s\n", _("This detection is deprecated, please use 'check_ldap' with the '--starttls' or '--ssl' flags"));
+ printf (" %s\n", _("to define the behaviour explicitly instead."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_load.c b/plugins/check_load.c
index a60858fa7a4e3ac5b863041d69381ee08601f4e1..f4faa31b6f512a51ee4e292c5bdf2fc70cc29b9c 100644 (file)
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
printf (_("This plugin tests the current system load average."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c
index 158bb8f94377f2c57f132bfaf3ab8ce4373c5251..cf77f8bfe0cba87e57ac77a722b11750c0b7315a 100644 (file)
--- a/plugins/check_mrtg.c
+++ b/plugins/check_mrtg.c
printf ("%s\n", _("two variables recorded in an MRTG log file."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
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 ("\n");
+ 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 ("\n");
+ 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", _("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 (" %s\n", "http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html");
printf (_(UT_SUPPORT));
}
index 97627aa8dbf7275121e7e5b518b651af35ce766f..5ba5cdc082bbd5d3e2089339de6f0e90f27bbc0a 100644 (file)
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
printf (" %s\n", "-c, --critical");
printf (" %s\n", _("Critical threshold pair <incoming>,<outgoing>"));
+ printf ("\n");
printf ("%s\n", _("Notes:"));
printf (" %s\n", _("- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from"));
printf (" %s\n", " http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html");
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index ad15a77c96c47824a6883e2490a23fd13c90fb24..ea2e30d29dd5171b65e90e6f6dccb7eb6de3baa7 100644 (file)
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
printf ("%s\n", _("This program tests connections to a mysql server"));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (" %s\n", _("Exit with WARNING status if slave server is more than INTEGER seconds behind master"));
printf (" %s\n", "-c, --critical");
printf (" %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"));
+
+ printf ("\n");
printf (" %s\n", _("There are no required arguments. By default, the local database with"));
- printf (_("a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
+ printf (_(" a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
printf (_(UT_SUPPORT));
}
index a168306600c2710d0abfad9ade72c1b7f83f8533..8c6a96c6473ba9b90ec67b3350ae63bccc8b316d 100644 (file)
printf (" ==> %s <==\n", _("IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!!"));
printf ("\n");
-
- printf ("%s\n", _("A query is required. The result from the query should be numeric."));
- printf ("%s\n", _("For extra security, create a user with minimal access."));
+ printf (" %s\n", _("A query is required. The result from the query should be numeric."));
+ printf (" %s\n", _("For extra security, create a user with minimal access."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index b3088a1deeee7ad63d708c855c3526fe2bf357bc..1f8df33e8980fa8fb6e9e4c514de56ade1a4d2f1 100644 (file)
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
printf ("%s\n", _("It also checks the process table for a process matching the command argument."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf ("\n");
printf ("%s\n", _("Examples:"));
printf (" %s\n", "check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios");
+
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 60d58fd09e33b58f2e265c259584c7889ea28b6a..681b842e4a655efa4d98687b58b34b6f25ff4725 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
return_code=STATE_OK;
temp_string = strdup (_("CPU Load"));
temp_string_perf = strdup (" ");
-
+
/* loop until one of the parameters is wrong or not present */
while (lvalue_list[0+offset]> (unsigned long)0 &&
lvalue_list[0+offset]<=(unsigned long)17280 &&
asprintf(&temp_string_perf,"%s%s",temp_string_perf,perfdata);
offset+=3; /* move across the array */
}
-
+
if (strlen(temp_string)>10) { /* we had at least one loop */
output_message = strdup (temp_string);
perfdata = temp_string_perf;
printf ("%s\n", _("Windows NT/2000/XP/2003 server."));
printf ("\n\n");
-
+
print_usage();
printf (_(UT_HELP_VRSN));
printf (" %s\n", _(" configuration files."));
printf (" %s\n", _("Some examples:"));
printf (" %s\n\n", _("check_nt -H 192.168.1.1 -p 1248 -v INSTANCES -l Process"));
- printf (_("Notes:"));
+
+ printf ("%s\n", _("Notes:"));
printf (" %s\n", _("- The NSClient service should be running on the server to get any information"));
- printf (" %s\n", "(http://nsclient.ready2run.nl).");
+ printf (" %s\n", "(http://nsclient.ready2run.nl).");
printf (" %s\n", _("- Critical thresholds should be lower than warning thresholds"));
printf (" %s\n", _("- Default port 1248 is sometimes in use by other services. The error"));
- printf (" %s\n", _("output when this happens contains \"Cannot map xxxxx to protocol number\"."));
- printf (" %s\n", _("One fix for this is to change the port to something else on check_nt "));
- printf (" %s\n", _("and on the client service it\'s connecting to."));
+ printf (" %s\n", _("output when this happens contains \"Cannot map xxxxx to protocol number\"."));
+ printf (" %s\n", _("One fix for this is to change the port to something else on check_nt "));
+ printf (" %s\n", _("and on the client service it\'s connecting to."));
+
+ printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 28a8f89956db0c947e2d16ad4ae69db64cbbd8b0..ec8cd13d5b184b6161584210c805e8293fd713ff 100644 (file)
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
printf (_(UT_SUPPORT));
- printf("\n");
printf ("%s\n", _("WARNING: check_ntp is deprecated. Please use check_ntp_peer or"));
printf ("%s\n\n", _("check_ntp_time istead."));
}
index 536883d546ca6c5c8f4ce3fe9d80eee0dc298463..f6c33d61ff141773d0de756aab1c824f2626f78e 100644 (file)
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
asprintf(&result_line, "%s %s,", result_line, _("Server not synchronized"));
else if(li_alarm)
asprintf(&result_line, "%s %s,", result_line, _("Server has the LI_ALARM bit set"));
-
+
if(offset_result == STATE_UNKNOWN){
asprintf(&result_line, "%s %s", result_line, _("Offset unknown"));
asprintf(&perfdata_line, "");
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index a1a3f35a390ae04e6826905698e35fd24b6fe428..3c8d5b9647b294e5f3329b047337015bd8211684 100644 (file)
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
result=STATE_OK;
else
result=STATE_WARNING;
-
+
close(sd);
my_tcp_connect (server_address, server_port, &sd);
send_buffer = strdup ("S13\r\n");
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
temp_buffer=strtok(recv_buffer,"\r\n");
-
+
asprintf (&output_message,_("Directory Services Database is %s (DS version %s)"),(result==STATE_OK)?"open":"closed",temp_buffer);
/* check to see if logins are enabled */
return result;
max_packet_receive_buffers=atoi(recv_buffer);
-
+
percent_used_packet_receive_buffers=(unsigned long)(((double)used_packet_receive_buffers/(double)max_packet_receive_buffers)*100.0);
if (vars_to_check==UPRB) {
else if (check_warning_value==TRUE && percent_used_packet_receive_buffers >= warning_value)
result=STATE_WARNING;
}
-
+
asprintf (&output_message,_("%lu of %lu (%lu%%) packet receive buffers used"),used_packet_receive_buffers,max_packet_receive_buffers,percent_used_packet_receive_buffers);
/* check SAP table entries */
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
if (result!=STATE_OK)
return result;
-
+
sap_entries=atoi(recv_buffer);
-
+
if (check_critical_value==TRUE && sap_entries >= critical_value)
result=STATE_CRITICAL;
else if (check_warning_value==TRUE && sap_entries >= warning_value)
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
if (result!=STATE_OK)
return result;
-
+
open_files=atoi(recv_buffer);
-
+
if (check_critical_value==TRUE && open_files >= critical_value)
result=STATE_CRITICAL;
else if (check_warning_value==TRUE && open_files >= warning_value)
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
if (result!=STATE_OK)
return result;
-
+
abended_threads=atoi(recv_buffer);
-
+
if (check_critical_value==TRUE && abended_threads >= critical_value)
result=STATE_CRITICAL;
else if (check_warning_value==TRUE && abended_threads >= warning_value)
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
if (result!=STATE_OK)
return result;
-
+
max_service_processes=atoi(recv_buffer);
-
+
close(sd);
my_tcp_connect (server_address, server_port, &sd);
result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
if (result!=STATE_OK)
return result;
-
+
current_service_processes=atoi(recv_buffer);
-
+
if (check_critical_value==TRUE && current_service_processes >= critical_value)
result=STATE_CRITICAL;
else if (check_warning_value==TRUE && current_service_processes >= warning_value)
printf (" %s\n", _(" (available from http://www.engr.wisc.edu/~drews/mrtg/)"));
printf (" %s\n", _("- Values for critical thresholds should be lower than warning thresholds"));
printf (" %s\n", _(" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, "));
- printf (" %s\n", _(" TCB, LRUS and LRUM.\n"));
+ printf (" %s\n", _(" TCB, LRUS and LRUM."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c
index 33003d97a1ede9d932a3d4f21438502f047624bb..6c3675bf7de65234ac4b47d9ede4d94fcc33468a 100644 (file)
--- a/plugins/check_overcr.c
+++ b/plugins/check_overcr.c
printf (_(UT_VERBOSE));
printf ("\n");
printf ("%s\n", _("Notes:"));
-
- printf ("%s\n", _("For the available options, the critical threshold value should always be"));
- printf ("%s\n\n", _("higher than the warning threshold value, EXCEPT with the uptime variable"));
+
+ printf (" %s\n", _("For the available options, the critical threshold value should always be"));
+ printf (" %s\n\n", _("higher than the warning threshold value, EXCEPT with the uptime variable"));
printf ("%s\n", _("This plugin requres that Eric Molitors' Over-CR collector daemon be"));
printf ("%s\n", _("running on the remote server."));
- printf ("%s\n", " Over-CR can be downloaded from http://www.molitor.org/overcr");
+ printf ("%s\n", _("Over-CR can be downloaded from http://www.molitor.org/overcr"));
printf ("%s\n", _("This plugin was tested with version 0.99.53 of the Over-CR collector"));
printf (_(UT_SUPPORT));
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 0563322858a5a7d77e421f4a3c9a1efe0b5cd01c..c721b07c84e3d162707f5811fdaba1a081337c50 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
printf (" %s\n", _("specified database, and then disconnects. If no database is specified, it"));
printf (" %s\n", _("connects to the template1 database, which is present in every functioning"));
printf (" %s\n\n", _("PostgreSQL DBMS."));
+
printf (" %s\n", _("The plugin will connect to a local postmaster if no host is specified. To"));
printf (" %s\n", _("connect to a remote host, be sure that the remote postmaster accepts TCP/IP"));
printf (" %s\n\n", _("connections (start the postmaster with the -i option)."));
+
printf (" %s\n", _("Typically, the nagios user (unless the --logname option is used) should be"));
printf (" %s\n", _("able to connect to the database without a password. The plugin can also send"));
printf (" %s\n", _("a password, but no effort is made to obsure or encrypt the password."));
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 214e23b01dfdce8ffd74475418f0113683fa6aa0..ac43a0c459d25afa78622c64f1f38760c0faf401 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
+ printf ("\n");
printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel"));
printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the"));
printf ("%s\n", _("percentage of packet loss to trigger an alarm state."));
- printf ("\n\n");
-
+ printf ("\n");
printf ("%s\n", _("This plugin uses the ping command to probe the specified host for packet loss"));
printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output"));
printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in"));
printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/"));
- printf ("\n\n");
-
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index d56d45711c8f7614491b03c9f026d235a1e88c8b..816da1b7af5d61fb9a2a7fe5e07ad65124410fe3 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
printf ("%s\n", _("of processes. Search filters can be applied to limit the processes to check."));
printf ("\n\n");
-
+
print_usage ();
printf ("%s\n", _("Required Arguments:"));
printf (" %s\n", "check_procs -w 50000 -c 100000 --metric=VSZ");
printf (" %s\n\n", _("Alert if vsz of any processes over 50K or 100K"));
printf (" %s\n", "check_procs -w 10 -c 20 --metric=CPU");
- printf (" %s\n\n", _("Alert if cpu of any processes over 10%% or 20%%"));
+ printf (" %s\n", _("Alert if cpu of any processes over 10%% or 20%%"));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index ed93787311b54c597fbc97467762e777aa28c704..2afe3c8897aecfe6e496144780c47311b4300fe8 100644 (file)
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
printf (_(UT_TIMEOUT), timeout_interval);
- printf ("%s\n", _("This plugin tests a radius server to see if it is accepting connections."));
+ printf ("\n");
+ printf ("%s\n", _("This plugin tests a radius server to see if it is accepting connections."));
printf ("%s\n", _("The server to test must be specified in the invocation, as well as a user"));
printf ("%s\n", _("name and password. A configuration file may also be present. The format of"));
printf ("%s\n", _("the configuration file is described in the radiusclient library sources."));
diff --git a/plugins/check_real.c b/plugins/check_real.c
index 03fef82cc57de646585e1d034d146205fd262067..68a6c1e284c44c7aa29783b95718d2cb1985e229 100644 (file)
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
printf (_(UT_VERBOSE));
+ printf ("\n");
printf ("%s\n", _("This plugin will attempt to open an RTSP connection with the host."));
printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return"));
printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,"));
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 0406ae43001b97428771313ccae1ac97a60c8eaa..b9435651707f42f4e8acf5a247e01fb772b8b769 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
printf (_(UT_VERBOSE));
- printf ("%s\n", _("This plugin uses the 'snmpget' command included with the NET-SNMP package."));
+ printf ("\n");
+ printf ("%s\n", _("This plugin uses the 'snmpget' command included with the NET-SNMP package."));
printf ("%s\n", _("if you don't have the package installed, you will need to download it from"));
printf ("%s\n", _("http://net-snmp.sourceforge.net before you can use this plugin."));
- printf ("%s\n", _("- Multiple OIDs may be indicated by a comma- or space-delimited list (lists with"));
- printf ("%s\n", _(" internal spaces must be quoted) [max 8 OIDs]"));
-
- printf ("%s\n", _("- Ranges are inclusive and are indicated with colons. When specified as"));
- printf ("%s\n", _(" 'min:max' a STATE_OK will be returned if the result is within the indicated"));
- printf ("%s\n", _(" range or is equal to the upper or lower bound. A non-OK state will be"));
- printf ("%s\n", _(" returned if the result is outside the specified range."));
-
- printf ("%s\n", _("- If specified in the order 'max:min' a non-OK state will be returned if the"));
- printf ("%s\n", _(" result is within the (inclusive) range."));
-
- printf ("%s\n", _("- Upper or lower bounds may be omitted to skip checking the respective limit."));
- printf ("%s\n", _("- Bare integers are interpreted as upper limits."));
- printf ("%s\n", _("- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'"));
- printf ("%s\n", _("- Note that only one string and one regex may be checked at present"));
- printf ("%s\n", _("- All evaluation methods other than PR, STR, and SUBSTR expect that the value"));
- printf ("%s\n", _(" returned from the SNMP query is an unsigned integer."));
+ printf ("\n");
+ printf ("%s\n", _("Notes:"));
+ printf (" %s\n", _("- Multiple OIDs may be indicated by a comma- or space-delimited list (lists with"));
+ printf (" %s\n", _("internal spaces must be quoted) [max 8 OIDs]"));
+
+ printf (" %s\n", _("- Ranges are inclusive and are indicated with colons. When specified as"));
+ printf (" %s\n", _("'min:max' a STATE_OK will be returned if the result is within the indicated"));
+ printf (" %s\n", _("range or is equal to the upper or lower bound. A non-OK state will be"));
+ printf (" %s\n", _("returned if the result is outside the specified range."));
+
+ printf (" %s\n", _("- If specified in the order 'max:min' a non-OK state will be returned if the"));
+ printf (" %s\n", _("result is within the (inclusive) range."));
+
+ printf (" %s\n", _("- Upper or lower bounds may be omitted to skip checking the respective limit."));
+ printf (" %s\n", _("- Bare integers are interpreted as upper limits."));
+ printf (" %s\n", _("- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'"));
+ printf (" %s\n", _("- Note that only one string and one regex may be checked at present"));
+ printf (" %s\n", _("- All evaluation methods other than PR, STR, and SUBSTR expect that the value"));
+ printf (" %s\n", _("returned from the SNMP query is an unsigned integer."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index c8b143c50b48103c6022e0a3457332524e7bf082..1c627ac73238afda4c2b4bdb2a285e386d2ab3a2 100644 (file)
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
printf ("%s\n", _("Check swap space on local machine."));
printf ("\n\n");
-
+
print_usage ();
printf (_(UT_HELP_VRSN));
printf (" %s\n", "-a, --allswaps");
printf (" %s\n", _("Conduct comparisons for all swap partitions, one by one"));
printf (_(UT_VERBOSE));
+
printf ("\n");
printf ("%s\n", _("Notes:"));
- printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n"));
+ printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s."));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 73702f5976b43eb0ead45ee201a488e8f0d1b9b0..666485ee449a70caca8197416a0f964b4f731eee 100644 (file)
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
printf ("Copyright (c) 2004 Arnaud Quette <arnaud.quette@mgeups.com>\n");
printf (COPYRIGHT, copyright, email);
- printf ("%s\n", _("This plugin tests the UPS service on the specified host.Network UPS Tools "));
+ printf ("%s\n", _("This plugin tests the UPS service on the specified host. Network UPS Tools"));
printf ("%s\n", _("from www.networkupstools.org must be running for thisplugin to work."));
printf ("\n\n");
/* printf (_(UT_VERBOSE)); */
printf ("\n");
- printf ("%s\n", _("Notes:"));
-
printf ("%s\n", _("This plugin attempts to determine the status of a UPS (Uninterruptible Power"));
printf ("%s\n", _("Supply) on a local or remote host. If the UPS is online or calibrating, the"));
printf ("%s\n", _("plugin will return an OK state. If the battery is on it will return a WARNING"));
printf ("%s\n", _("state.If the UPS is off or has a low battery the plugin will return a CRITICAL"));
- printf ("%s\n\n", _("state."));
+ printf ("%s\n", _("state."));
- printf ("%s\n", _("You may also specify a variable to check [such as temperature, utility voltage,"));
- printf ("%s\n", _("battery load, etc.] as well as warning and critical thresholds for the value of"));
- printf ("%s\n", _("that variable. If the remote host has multiple UPS that are being monitored you"));
- printf ("%s\n", _("will have to use the [ups] option to specify which UPS to check."));
+ printf ("\n");
+ printf ("%s\n", _("Notes:"));
+ printf (" %s\n", _("You may also specify a variable to check (such as temperature, utility voltage,"));
+ printf (" %s\n", _("battery load, etc.) as well as warning and critical thresholds for the value"));
+ printf (" %s\n", _("of that variable. If the remote host has multiple UPS that are being monitored"));
+ printf (" %s\n", _("you will have to use the --ups option to specify which UPS to check."));
- printf ("%s\n", _("This plugin requires that the UPSD daemon distributed with Russel Kroll's"));
- printf ("%s\n", _("Smart UPS Tools be installed on the remote host. If you do not have the"));
- printf ("%s\n", _("package installed on your system, you can download it from http://www.networkupstools.org"));
+ printf ("\n");
+ printf (" %s\n", _("This plugin requires that the UPSD daemon distributed with Russel Kroll's"));
+ printf (" %s\n", _("Smart UPS Tools be installed on the remote host. If you do not have the"));
+ printf (" %s\n", _("package installed on your system, you can download it from"));
+ printf (" %s\n", _("http://www.networkupstools.org"));
printf (_(UT_SUPPORT));
}
diff --git a/plugins/utils.h b/plugins/utils.h
index bb99ee16499f95ae9484a8596c143d4ceed9460c..def89705c7c1e4424b0d1315c603cfcf8ec4c80f 100644 (file)
--- a/plugins/utils.h
+++ b/plugins/utils.h
-t, --timeout=INTEGER\n\
Seconds before connection times out (default: %d)\n"
+#define UT_THRESHOLDS_NOTES "\
+ See:\n\
+ http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n\
+ for THRESHOLD format and examples.\n"
+
#define UT_SUPPORT "\n\
Send email to nagios-users@lists.sourceforge.net if you have questions\n\
regarding use of this software. To submit patches or suggest improvements,\n\
-send email to nagiosplug-devel@lists.sourceforge.net\n"
+send email to nagiosplug-devel@lists.sourceforge.net\n\n"
#define UT_NOWARRANTY "\n\
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\