Module: check_mk
Branch: master
Commit: 10b365c7a0823f2f54129ff4c0d57a539a06a0d5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10b365c7a0823f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Mar 1 12:33:40 2013 +0100
FIX: hr_mem: fix max value in performance data (thanks to Michaël COQUARD)
Conflicts:
ChangeLog
---
ChangeLog | 2 ++
checks/hr_mem | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1c1900a..9e25b2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -67,6 +67,8 @@
* FIX: megaraid_bbu: deal with broken output ("Adpater")
* FIX: check_ldap: added missing host address (check didn't work at all)
* FIX: check_ldap: added missing version option -2, -3, -3 -T (TLS)
+ * FIX: mssql: Agent plugin now supports MSSQL Server 2012
+ * FIX: hr_mem: fix max value in performance data (thanks to Michaël COQUARD)
* Linux agent: limit netstat to 10 seconds
* ps: Allow %1, %2, .. instead of %s in process_inventory. That allows
reordering of matched groups
diff --git a/checks/hr_mem b/checks/hr_mem
index 028878b..f883f8e 100644
--- a/checks/hr_mem
+++ b/checks/hr_mem
@@ -74,8 +74,8 @@ def check_hr_mem(item, params, info):
warn, crit = params
if type(warn) == float:
- perfdata.append(('memused', str(totalused_mb)+'MB',
int(warn/100.0 * totalmem_mb),
- int(crit/100.0 * totalmem_mb), 0, totalvirt_mb))
+ perfdata.append(('memused', str(totalused_mb)+'MB',
int(warn/100.0 * totalram_mb),
+ int(crit/100.0 * totalram_mb), 0, totalvirt_mb))
if totalused_perc >= crit:
return (2, 'CRIT - %s, critical at %.1f%%' % (infotext, crit),
perfdata)
elif totalused_perc >= warn:
@@ -83,7 +83,7 @@ def check_hr_mem(item, params, info):
else:
return (0, 'OK - %s' % infotext, perfdata)
else:
- perfdata.append(('memused', str(totalused_mb)+'MB', warn,
crit, 0, totalvirt_mb))
+ perfdata.append(('memused', str(totalused_mb)+'MB', warn,
crit, 0, totalram_mb))
if totalused_mb >= crit:
return (2, 'CRIT - %s, critical at %.2f GB' % (infotext, crit /
1024.0), perfdata)
elif totalused_mb >= warn: