Module: check_mk
Branch: master
Commit: e7837026995ac805ec0b52302eb5fb2ae62884ab
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7837026995ac8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 30 19:20:13 2010 +0200
Updated internal doku
---
LIESMICH.zutun | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index fdd2c41..06e0e9c 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -117,7 +117,7 @@ werden soll.
Perfdatenformat per Default auf 'pnp'
-Aggregation per Default auf mehrzeilige Ausgabe
+aggregation_output_format: Aggregation per Default auf mehrzeilige Ausgabe
Direct rrd updates ganz entfernen.
@@ -125,7 +125,7 @@ Inventurchecks: severity per Default auf 1 stellen.
snmp_communities: dictionary nicht mehr verwenden, aus Doku raus, Defaultwert
leere Liste, aus Code raus, Hinweis im ChangeLog. Evtl einen Test mit
-Abbruch, wenn immer noch type ist dict.
+Abbruch, wenn immer noch type ist dict. Gleiches für bulkwalk_hosts
[""] deprecaten, aus der Doku raus und durch ALL_SERVICES ersetzen
Module: check_mk
Branch: master
Commit: a661e2e24c7b10c17aa9a26e52452f50b54b574f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a661e2e24c7b10…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 29 14:17:00 2010 +0200
Updated internal doku
---
LIESMICH.zutun | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index 587ebf2..fdd2c41 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -525,3 +525,11 @@ nicht ähnlich wie Gruppieren? Allerdings wäre es dann gut,
wenn man die Aggregationen irgendwo separat editieren kann
und in der View nur noch drauf verweisen. Sonst muss
man soviel Copy&Paste zwischen den Views machen...
+
+Idee: Checks, die eigentlich keine Perfdaten liefern, könnten
+über eine Konfiguration künstlich perfdaten bekommen, ala
+status=0, status=1 etc. Das könnte man über eine Regel
+konfigurierbar machen:
+fake_perfdata = [ ... ]
+
+Idee: Inventurcheck könnte gleich die Checkergebnisse berechnen
Module: check_mk
Branch: master
Commit: d8516abc6edfb3f16da8cb765691dc20aa797dd8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d8516abc6edfb3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 29 19:23:24 2010 +0200
nfsmounts: fix output of used space
---
ChangeLog | 1 +
checkman/nfsmounts | 40 +++++++++++++++++++---------------------
checks/nfsmounts | 6 ++++--
3 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 64eb7ac..567f5b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* hp_proliant_psu: Fixed multiple PSU detection on one system (Thanks to Andreas Döhler)
* megaraid_pdisks: Fixed coding error
* cisco_fan: fixed check bug in case of critical state
+ * nfsmounts: fix output (free and used was swapped), make output identical to df
Livestatus:
* Prohibit { and } in regular expressions. This avoids a segmentation
diff --git a/checkman/nfsmounts b/checkman/nfsmounts
index 0f87c98..561d307 100644
--- a/checkman/nfsmounts
+++ b/checkman/nfsmounts
@@ -4,37 +4,35 @@ author: Mathias Kettner <mk(a)mathias-kettner.de>
license: GPL
distribution: check_mk
description:
- This check probes the availability of NFS mounts. The
- Linux agent sends the status of all NFS mounts, if the
- command line utility {maxwait} is available (it is
- is used to avoid hanging if the NFS server is not
- responding). The probe is done by trying a {stat -f}
- (system call {statfs(2)}) on the mount point. If that
- lasts longer then 2 seconds, then the server is considered
+ This check probes the availability of NFS mounts. The Linux agent sends the
+ status of all NFS mounts, if the command line utility {maxwait} is available
+ (it is is used to avoid hanging if the NFS server is not responding). The
+ probe is done by trying a {stat -f} (system call {statfs(2)}) on the mount
+ point. If that lasts longer then 2 seconds, then the server is considered
to be not responding.
- When you install the Linux agent manually, please
- do not forget to also install {waitmax} into {/usr/bin}.
- That file is shipped together with the agent. When
- {waitmax} is missing, the agent will silently omit
- the section {nfsmounts}.
+ When you install the Linux agent manually, please do not forget to also
+ install {waitmax} into {/usr/bin}. That file is shipped together with
+ the agent. When {waitmax} is missing, the agent will silently omit the
+ section {nfsmounts}.
- If the NFS mount is "stale", then {stat -f} returns immediately
- but with a size of {-1}. The check detects that and results
- in a warning state.
+ If the NFS mount is "stale", then {stat -f} returns immediately but with
+ a size of {-1}. The check detects that and results in a warning state.
+
+ Please note, that though this check outputs the current usage of the remote
+ filesystem, no levels can be defined for the used space and no performance
+ data is output. Please do a check for used space directly on the NFS server.
item:
The mount point.
perfdata:
- This check does not provide performance data. The disk
- usage is assumedly measured on the file server itself.
- Duplicating that data on all clients would unneccessarily
- create redundant RRDs.
+ This check does not provide performance data. The disk usage is assumedly
+ measured on the file server itself. Duplicating that data on all clients
+ would unneccessarily create redundant RRDs.
inventory:
- All NFS mounts are found automatically. This is not
+ All NFS mounts are found automatically. This is done
by scanning {/proc/mounts}. The file {/etc/fstab}
is irrelevant.
-
diff --git a/checks/nfsmounts b/checks/nfsmounts
index 97fd749..ed73e04 100644
--- a/checks/nfsmounts
+++ b/checks/nfsmounts
@@ -41,9 +41,11 @@ def check_nfsmounts(item, params, info):
gb = 1024 * 1024 * 1024.0
size_gb = (size_blocks * blocksize) / gb
- used_gb = (free_blocks * blocksize) / gb
+ free_gb = (free_blocks * blocksize) / gb
+ used_gb = size_gb - free_gb
+ used_perc = 100.0 * used_gb / size_gb
if line[1] == 'ok':
- return (0, "OK - server responding (%.2f GB / %.2f GB used)" % (used_gb, size_gb))
+ return (0, "OK - %.1f%% used (%.1f of %.1f GB)" % (used_perc, used_gb, size_gb))
else:
return (2, "CRITICAL - server not responding")
return (3, "UNKNOWN - not mounted")
Module: check_mk
Branch: master
Commit: 2a992e1dd5b7fa84e35cd14e571271602043a78c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a992e1dd5b7fa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 28 20:29:42 2010 +0200
ps inventory: make %u optional on GRAB_USER
---
ChangeLog | 2 +-
LIESMICH.zutun | 3 +++
checkman/ps | 6 ++++--
checks/ps | 2 --
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b2d9a24..703bab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,7 +12,7 @@
* logwatch: Fixed typo in 'too many unacknowledged logs' error message
* ps: fix bug: inventory with fixed user name now correctly puts
that user name into the resulting check - not None.
- * ps: inventory with GRAB_USER: require service description to contain
+ * ps: inventory with GRAB_USER: service description may contain
%u. That will be replaced with the user name and thus makes the
service description unique.
* win_dhcp_pools: better handle invalid agent output
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index 3c11e35..cf4dadb 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -12,6 +12,9 @@ konsisten mit den übrigen werden sein.
--------------------------------------------------------------------------------
BUGS beheben ab 1.1.9i1
--------------------------------------------------------------------------------
+Wenn zwei Checks mit dem gleichen Namen existieren bei einem Host
+soll mit einem Fehler abgebrochen werden.
+
win_dhcp_pools sendet:
[['MIBCounts:'],
['Discovers', '=', '193.'],
diff --git a/checkman/ps b/checkman/ps
index 01fd674..8a28fee 100644
--- a/checkman/ps
+++ b/checkman/ps
@@ -55,8 +55,10 @@ inventory:
Specifying {GRAB_USER} makes the created check expect the process to run
as the same user as during inventory: the user name will be hardcoded into
- the check. In that case you need to put {%u} into the service description,
- which will be replace by the actual user name during inventory.
+ the check. In that case if you put {%u} into the service description,
+ that will be replaced by the actual user name during inventory. You need
+ that if your rule might match for more than one user - your would create
+ duplicate services with the same description otherwise.
The {warning and critical levels} are simply copied to the created
checks.
diff --git a/checks/ps b/checks/ps
index bb7a163..946e2bf 100644
--- a/checks/ps
+++ b/checks/ps
@@ -80,8 +80,6 @@ def inventory_ps(check_name, info):
if userspec == GRAB_USER:
i_userspec = l_user[0]
- if '%u' not in servicedesc:
- raise MKGeneralException("Invalid entry in inventory_processes: if you use GRAB_USER, you need to put %%u into the service description. Your description is '%s'" % servicedesc)
i_servicedesc = servicedesc.replace("%u", l_user[0])
else:
i_userspec = userspec
Module: check_mk
Branch: master
Commit: 97c8c01ddb7f907cb5c2e2a99d5d67a7f1d5cdde
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97c8c01ddb7f90…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 27 11:03:39 2010 +0200
Fixed small coding error in megaraid_pdisks
---
ChangeLog | 4 ++--
checks/megaraid_pdisks | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a771acb..b2d9a24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,8 +16,8 @@
%u. That will be replaced with the user name and thus makes the
service description unique.
* win_dhcp_pools: better handle invalid agent output
- * hp_proliant_psu: Fixed multiple PSU detection on one system (Thanks to
- Andreas Döhler)
+ * hp_proliant_psu: Fixed multiple PSU detection on one system (Thanks to Andreas Döhler)
+ * megaraid_pdisks: Fixed coding error
Livestatus:
* Prohibit { and } in regular expressions. This avoids a segmentation
diff --git a/checks/megaraid_pdisks b/checks/megaraid_pdisks
index d327fca..4e2b0db 100644
--- a/checks/megaraid_pdisks
+++ b/checks/megaraid_pdisks
@@ -51,6 +51,7 @@ def check_megaraid_pdisks(item, target_state, info):
# item is "$ENCLOSURE/$SLOT"
# param is the target state
for line in info:
+ found = None
if line[0] == "Enclosure":
enclosure = int(line[-1])
elif line[0] == "Slot":