summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8de4d5)
raw | patch | inline | side by side (parent: a8de4d5)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Fri, 28 Nov 2003 14:18:22 +0000 (14:18 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Fri, 28 Nov 2003 14:18:22 +0000 (14:18 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@779 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_procs.c | patch | blob | history |
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index a868fcf9ef76b26d544dc5d9508dc23a4a9bcc2e..d4792107d6c70878914c5827fa7ed1ba2348b2da 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
if (metric != METRIC_PROCS) {
if (i == STATE_WARNING) {
warn++;
if (metric != METRIC_PROCS) {
if (i == STATE_WARNING) {
warn++;
+ asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
+ result = max_state (result, i);
}
if (i == STATE_CRITICAL) {
crit++;
}
if (i == STATE_CRITICAL) {
crit++;
+ asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
+ result = max_state (result, i);
}
}
- asprintf (&fails, "%s%s%s", fails, (strcmp(fails,"") ? ", " : ""), procprog);
- result = max_state (result, i);
}
}
/* This should not happen */
}
}
/* This should not happen */
else
usage (_("Critical Process Count must be an integer!\n\n"));
break;
else
usage (_("Critical Process Count must be an integer!\n\n"));
break;
- case 'w': /* warning time threshold */
+ case 'w': /* warning threshold */
if (is_integer (optarg))
wmax = atoi (optarg);
else if (sscanf (optarg, ":%d", &wmax) == 1)
if (is_integer (optarg))
wmax = atoi (optarg);
else if (sscanf (optarg, ":%d", &wmax) == 1)
else if (sscanf (optarg, "%d:", &wmin) == 1)
break;
else
else if (sscanf (optarg, "%d:", &wmin) == 1)
break;
else
- usage (_("%s: Warning Process Count must be an integer!\n\n"));
+ usage (_("Warning Process Count must be an integer!\n\n"));
break;
case 'p': /* process id */
if (sscanf (optarg, "%d%[^0-9]", &ppid, tmp) == 1) {
break;
case 'p': /* process id */
if (sscanf (optarg, "%d%[^0-9]", &ppid, tmp) == 1) {
Warning alert if > 10 processes with command arguments containing \n\
'/usr/local/bin/perl' and owned by root\n\n\
check_procs -w 50000 -c 100000 --metric=VSZ\n\
Warning alert if > 10 processes with command arguments containing \n\
'/usr/local/bin/perl' and owned by root\n\n\
check_procs -w 50000 -c 100000 --metric=VSZ\n\
- Alert if vsz of any processes over 50K or 100K\n\n"));
+ Alert if vsz of any processes over 50K or 100K\n\
+ check_procs -w 10 -c 20 --metric=CPU\n\
+ Alert if cpu of any processes over 10% or 20%\n\n"));
printf (_(UT_SUPPORT));
}
printf (_(UT_SUPPORT));
}