diff options
Diffstat (limited to 'plugins/check_nt.c')
| -rw-r--r-- | plugins/check_nt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 52bbd1c5..fefbfb7a 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | /***************************************************************************** | 1 | /***************************************************************************** |
| 2 | * | 2 | * |
| 3 | * Nagios check_nt plugin | 3 | * Monitoring check_nt plugin |
| 4 | * | 4 | * |
| 5 | * License: GPL | 5 | * License: GPL |
| 6 | * Copyright (c) 2000-2002 Yves Rubin (rubiyz@yahoo.com) | 6 | * Copyright (c) 2000-2002 Yves Rubin (rubiyz@yahoo.com) |
| 7 | * Copyright (c) 2003-2007 Nagios Plugins Development Team | 7 | * Copyright (c) 2003-2007 Monitoring Plugins Development Team |
| 8 | * | 8 | * |
| 9 | * Description: | 9 | * Description: |
| 10 | * | 10 | * |
| @@ -34,7 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | const char *progname = "check_nt"; | 35 | const char *progname = "check_nt"; |
| 36 | const char *copyright = "2000-2007"; | 36 | const char *copyright = "2000-2007"; |
| 37 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; | 37 | const char *email = "devel@monitoring-plugins.org"; |
| 38 | 38 | ||
| 39 | #include "common.h" | 39 | #include "common.h" |
| 40 | #include "netutils.h" | 40 | #include "netutils.h" |
| @@ -203,7 +203,7 @@ int main(int argc, char **argv){ | |||
| 203 | updays = uptime / 86400; | 203 | updays = uptime / 86400; |
| 204 | uphours = (uptime % 86400) / 3600; | 204 | uphours = (uptime % 86400) / 3600; |
| 205 | upminutes = ((uptime % 86400) % 3600) / 60; | 205 | upminutes = ((uptime % 86400) % 3600) / 60; |
| 206 | xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes); | 206 | xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)|uptime=%lu"), updays, uphours, upminutes, uptime); |
| 207 | if (check_critical_value==TRUE && uptime <= critical_value) | 207 | if (check_critical_value==TRUE && uptime <= critical_value) |
| 208 | return_code=STATE_CRITICAL; | 208 | return_code=STATE_CRITICAL; |
| 209 | else if (check_warning_value==TRUE && uptime <= warning_value) | 209 | else if (check_warning_value==TRUE && uptime <= warning_value) |
| @@ -293,10 +293,10 @@ int main(int argc, char **argv){ | |||
| 293 | 293 | ||
| 294 | /* Divisor should be 1048567, not 3044515, as we are measuring "Commit Charge" here, | 294 | /* Divisor should be 1048567, not 3044515, as we are measuring "Commit Charge" here, |
| 295 | which equals RAM + Pagefiles. */ | 295 | which equals RAM + Pagefiles. */ |
| 296 | xasprintf(&output_message,_("Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)"), | 296 | xasprintf(&output_message,_("Memory usage: total:%.2f MB - used: %.2f MB (%.0f%%) - free: %.2f MB (%.0f%%)"), |
| 297 | mem_commitLimit / 1048567, mem_commitByte / 1048567, percent_used_space, | 297 | mem_commitLimit / 1048567, mem_commitByte / 1048567, percent_used_space, |
| 298 | (mem_commitLimit - mem_commitByte) / 1048567, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100); | 298 | (mem_commitLimit - mem_commitByte) / 1048567, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100); |
| 299 | xasprintf(&perfdata,_("'Memory usage'=%.2fMb;%.2f;%.2f;0.00;%.2f"), mem_commitByte / 1048567, | 299 | xasprintf(&perfdata,_("'Memory usage'=%.2fMB;%.2f;%.2f;0.00;%.2f"), mem_commitByte / 1048567, |
| 300 | warning_used_space / 1048567, critical_used_space / 1048567, mem_commitLimit / 1048567); | 300 | warning_used_space / 1048567, critical_used_space / 1048567, mem_commitLimit / 1048567); |
| 301 | 301 | ||
| 302 | return_code=STATE_OK; | 302 | return_code=STATE_OK; |
| @@ -750,7 +750,7 @@ void print_help(void) | |||
| 750 | printf (" %s\n", _("The purpose of this is to be run from command line to determine what instances")); | 750 | printf (" %s\n", _("The purpose of this is to be run from command line to determine what instances")); |
| 751 | printf (" %s\n", _(" are available for monitoring without having to log onto the Windows server")); | 751 | printf (" %s\n", _(" are available for monitoring without having to log onto the Windows server")); |
| 752 | printf (" %s\n", _(" to run Perfmon directly.")); | 752 | printf (" %s\n", _(" to run Perfmon directly.")); |
| 753 | printf (" %s\n", _("It can also be used in scripts that automatically create Nagios service")); | 753 | printf (" %s\n", _("It can also be used in scripts that automatically create the monitoring service")); |
| 754 | printf (" %s\n", _(" configuration files.")); | 754 | printf (" %s\n", _(" configuration files.")); |
| 755 | printf (" %s\n", _("Some examples:")); | 755 | printf (" %s\n", _("Some examples:")); |
| 756 | printf (" %s\n\n", _("check_nt -H 192.168.1.1 -p 1248 -v INSTANCES -l Process")); | 756 | printf (" %s\n\n", _("check_nt -H 192.168.1.1 -p 1248 -v INSTANCES -l Process")); |
