[monitoring-plugins] check_nt: add UPTIME to perfdata [sf#3434647]

Sam Kottler git at monitoring-plugins.org
Fri Apr 4 08:50:07 CEST 2014


    Module: monitoring-plugins
    Branch: master
    Commit: a271ad24f4e7ef5c5ef8d3ca208e7a3b66a37cda
    Author: Jan Wagner <waja at cyconet.org>
 Committer: Sam Kottler <shk at linux.com>
      Date: Fri Apr  4 12:42:59 2014 +0600
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=a271ad2

check_nt: add UPTIME to perfdata [sf#3434647]

---

 THANKS.in          | 1 +
 plugins/check_nt.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/THANKS.in b/THANKS.in
index be13a9d..0600051 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -307,3 +307,4 @@ Stéphane Bortzmeyer
 Luca Corti
 Jethro Carr
 Evgeni Golov
+Oskar Liljeblad
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 1aa7ab5..cacf665 100644
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
@@ -203,7 +203,7 @@ int main(int argc, char **argv){
 		updays = uptime / 86400;
 		uphours = (uptime % 86400) / 3600;
 		upminutes = ((uptime % 86400) % 3600) / 60;
-		xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes);
+		xasprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)|uptime=%lu"), updays, uphours, upminutes, uptime);
 		if (check_critical_value==TRUE && uptime <= critical_value)
 			return_code=STATE_CRITICAL;
 		else if (check_warning_value==TRUE && uptime <= warning_value)



More information about the Commits mailing list