aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2003-02-18 22:10:55 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2003-02-18 22:10:55 +0000
commit1ae5554699c9dd0e64c69ca2668fd76a92bc51ae (patch)
treea6300cfbe634cefbf3aa356dac5ff6e5a4cf6b8a /plugins
parent11cf4b7014258a5bcc45a7c95d9acfe8bb97ad8b (diff)
downloadmonitoring-plugins-1ae5554699c9dd0e64c69ca2668fd76a92bc51ae.tar.gz
Fixed the output messages (Bug 688729 - Jayjay)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@340 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_load.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 896e356b..7d60d234 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -54,6 +54,8 @@ void print_help (void);
float wload1 = -1, wload5 = -1, wload15 = -1;
float cload1 = -1, cload5 = -1, cload15 = -1;
+char *status_line = "";
+
int
main (int argc, char **argv)
{
@@ -130,16 +132,16 @@ main (int argc, char **argv)
#endif
return STATE_UNKNOWN;
}
- printf ("load average: %.2f, %.2f, %.2f", la1, la5, la15);
+ asprintf(&status_line, "load average: %.2f, %.2f, %.2f", la1, la5, la15);
if ((la1 >= cload1) || (la5 >= cload5) || (la15 >= cload15)) {
- printf (" CRITICAL\n");
+ printf("CRITICAL - %s\n", status_line);
return STATE_CRITICAL;
}
if ((la1 >= wload1) || (la5 >= wload5) || (la15 >= wload15)) {
- printf (" WARNING\n");
+ printf ("WARNING - %s\n", status_line);
return STATE_WARNING;
}
- printf ("\n");
+ printf ("OK - %s\n", status_line);
return STATE_OK;
}