Module: check_mk
Branch: master
Commit: 79210c0cccd50f91698bb4b606508958b0616ba3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=79210c0cccd50f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 8 14:02:35 2010 +0100
Fixed <<<cpu>>> output on SPARC machines with openSUSE
Thanks to Michael Kromer
---
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1f3fcb7..92f23df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -101,6 +101,7 @@
* check_mk.only_from: new check for monitoring the IP address access restriction of the
agent. The current Linux and Windows agents provide this information.
* snmp_info check: Recoded not to use snmp_info_single anymore
+ * Linux Agent: Fixed <<<cpu>>> output on SPARC machines with openSUSE
Multisite:
* The custom open/close states of custom links are now stored for each
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 1837e7d..4b1ae52 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -117,7 +117,7 @@ egrep -v '^Swap:|^Mem:|total:' < /proc/meminfo
# Load und Anzahl Prozesse
echo '<<<cpu>>>'
-echo "$(cat /proc/loadavg) $(grep ^processor < /proc/cpuinfo | wc -l)"
+echo "$(cat /proc/loadavg) $(grep -E '^CPU|^processor' < /proc/cpuinfo | wc -l)"
# Uptime
echo '<<<uptime>>>'
Module: check_mk
Branch: master
Commit: 2f83a26d47653b932cd2568580b7232af8864af2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f83a26d47653b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 8 14:51:41 2010 +0100
df_netapp/df_netapp32: Made check inventory resistant against empty size values
df_netapp32: Added better detection for possible 32bit counter wrap
---
ChangeLog | 2 ++
checks/df_netapp | 2 +-
checks/df_netapp32 | 16 +++++++++++++++-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 92f23df..6da71c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,8 @@
agent. The current Linux and Windows agents provide this information.
* snmp_info check: Recoded not to use snmp_info_single anymore
* Linux Agent: Fixed <<<cpu>>> output on SPARC machines with openSUSE
+ * df_netapp/df_netapp32: Made check inventory resistant against empty size values
+ * df_netapp32: Added better detection for possible 32bit counter wrap
Multisite:
* The custom open/close states of custom links are now stored for each
diff --git a/checks/df_netapp b/checks/df_netapp
index 4d077f7..201a413 100644
--- a/checks/df_netapp
+++ b/checks/df_netapp
@@ -61,7 +61,7 @@ def check_df_netapp(volume, params, info):
def inventory_df_netapp(checkname, info):
inventory = []
for volume, size_kb, used_kb in info:
- if int(size_kb) > 0: # Exclude filesystems with zero size (some snapshots)
+ if saveint(size_kb) > 0: # Exclude filesystems with zero size (some snapshots)
inventory.append( (volume, "%.1fG" % (float(size_kb)/1024/1024), inventory_df_check_params) )
return inventory
diff --git a/checks/df_netapp32 b/checks/df_netapp32
index 934a5d1..1a6ef8c 100644
--- a/checks/df_netapp32
+++ b/checks/df_netapp32
@@ -24,6 +24,17 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Example output of wrapped counter:
+#
+#[['aggr1', '2038760', '1502030284']]
+# dfFileSys 1.3.6.1.4.1.789.1.5.4.1.2
+# dfKBytesTotal 1.3.6.1.4.1.789.1.5.4.1.3
+# The total capacity in KBytes for the referenced file system.
+# dfKBytesUsed 1.3.6.1.4.1.789.1.5.4.1.4
+# The total disk space in KBytes that is in use on the referenced file system.
+
+# .1.3.6.1.4.1.789.1.5.4.1.3.1 2038760
+# .1.3.6.1.4.1.789.1.5.4.1.4.1 1502030284
def check_df_netapp32(volume, params, info):
# info columns: NAME SIZE USED
@@ -46,6 +57,9 @@ def check_df_netapp32(volume, params, info):
elif size_kb < 0 or used_kb < 0:
return (3, "UNKNOWN - negative size or usage (32 bit SNMP counter wrap!)")
+ elif size_kb * 10 < used_kb:
+ return (3, "UNKNOWN - used disk space is much bigger than total space (32 bit SNMP counter wrap!) - use df_netapp check instead")
+
warn_mb, crit_mb, levelstext = get_filesystem_levels(g_hostname, volume, size_gb, params)
used_perc = int(round(float(used_kb) / float(size_kb) * 100))
@@ -61,7 +75,7 @@ def check_df_netapp32(volume, params, info):
def inventory_df_netapp32(checkname, info):
inventory = []
for volume, size_kb, used_kb in info:
- if int(size_kb) > 0: # Exclude filesystems with zero size (some snapshots)
+ if saveint(size_kb) > 0: # Exclude filesystems with zero size (some snapshots)
inventory.append( (volume, "%.1fG" % (float(size_kb)/1024/1024), inventory_df_check_params) )
return inventory
Module: check_mk
Branch: master
Commit: d0c5371074d56d667e3fda4716df84c19ad73b20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0c5371074d56d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 8 14:13:52 2010 +0100
Updated internal doc
---
LIESMICH.zutun | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index c84b5d7..1cc6471 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -113,6 +113,11 @@ getrennte Checks für Memory and Pagefile.
-------------------------------------------------------------------------------
ab 1.1.9i1:
--------------------------------------------------------------------------------
+
+SNMP Version pro Host erkennen und speichern. Man könnte als erstes mit v2
+versuchen und wenn das nicht geht auf v1 umschalten. Falls das nicht geht, dann
+kann man eben kein SNMP machen.
+
PNP4Nagios-Popups automatisch einbauen, mit eigenen intelligenten
Icons.