Module: check_mk
Branch: master
Commit: 3983764dac61f3c9addd11f53950dc52561d676e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3983764dac61f3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 14:20:37 2014 +0200
Updated bug entries #2156
---
.bugs/2156 | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/.bugs/2156 b/.bugs/2156
new file mode 100644
index 0000000..d71fe4b
--- /dev/null
+++ b/.bugs/2156
@@ -0,0 +1,16 @@
+Title: Do always create contact groups, even if no host/service is contained
+Component: core
+State: open
+Date: 2014-05-26 14:18:35
+Targetversion: future
+Class: bug
+
+The rule based notifications allow the selection of a contact group as
+a rule's contact selection. If you create contact groups with WATO that do
+not contain any host or service then these groups will not be created with
+the Nagios core - and thus the notification will not be sent out. The
+Micro Core is not affected as it seems.
+
+Beware: an unpatched Nagios might not consider this as a valid configuration.
+If that is the case then we need a global config option. We then set this
+option to True for OMD installations and patch Nagios in OMD.
Module: check_mk
Branch: master
Commit: d69fe4eecc08c43067edae5d95d7baa017812dea
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d69fe4eecc08c4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon May 26 12:45:56 2014 +0200
improved werk description
---
.werks/925 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.werks/925 b/.werks/925
index 4bca5de..1d94880 100644
--- a/.werks/925
+++ b/.werks/925
@@ -1,4 +1,4 @@
-Title: ps: improved/fixed calculation of CPU utilization
+Title: ps: improved/fixed calculation of CPU utilization (linux)
Level: 2
Component: checks
Version: 1.2.5i3
@@ -22,3 +22,6 @@ With the <tt>cputime</tt> we are able to determine the correct value.
To utilize this new calculation method, you need to update the check_mk_agent on the target host.
The ps check itself is able to handle both formats, <tt>pcpu</tt> and <tt>cputime</tt>.
+<br>
+Note: This bug only applied to hosts using the linux check_mk_agent
+
Module: check_mk
Branch: master
Commit: ca2dcbb41c3b87bf28fc76f982b9b1da1af28261
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ca2dcbb41c3b87…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon May 26 12:40:09 2014 +0200
ps: improved/fixed calculation of CPU utilization
Previously, the CPU utilization value was taken from the output <tt>pcpu</tt> from
the ps command. This value didn't reflect the exact utilization since the last check
because its definition is
<pre>
CPU usage is currently expressed as the percentage of time spent running
during the entire lifetime of a process. This is not ideal, and it does not
conform to the standards that ps otherwise conforms to. CPU usage is
unlikely to add up to exactly 100%.
</pre>
The evaluation of the <tt>pcpu</tt> field has been removed and got replaced
by the field <tt>cputime</tt>, which reflects the number of cpu seconds since program start.
With the <tt>cputime</tt> we are able to determine the correct value.
To utilize this new calculation method, you need to update the check_mk_agent on the target host.
The ps check itself is able to handle both formats, <tt>pcpu</tt> and <tt>cputime</tt>.
---
.werks/925 | 24 ++++++++++++++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 3 +--
checks/ps | 25 ++++++++++++++++++++-----
4 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/.werks/925 b/.werks/925
new file mode 100644
index 0000000..4bca5de
--- /dev/null
+++ b/.werks/925
@@ -0,0 +1,24 @@
+Title: ps: improved/fixed calculation of CPU utilization
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1401100287
+Class: feature
+
+Previously, the CPU utilization value was taken from the output <tt>pcpu</tt> from
+the ps command. This value didn't reflect the exact utilization since the last check
+because its definition is <br>
+<pre>
+CPU usage is currently expressed as the percentage of time spent running
+during the entire lifetime of a process. This is not ideal, and it does not
+conform to the standards that ps otherwise conforms to. CPU usage is
+unlikely to add up to exactly 100%.
+</pre>
+
+The evaluation of the <tt>pcpu</tt> field has been removed and got replaced
+by the field <tt>cputime</tt>, which reflects the number of cpu seconds since program start.
+With the <tt>cputime</tt> we are able to determine the correct value.
+
+To utilize this new calculation method, you need to update the check_mk_agent on the target host.
+The ps check itself is able to handle both formats, <tt>pcpu</tt> and <tt>cputime</tt>.
+
diff --git a/ChangeLog b/ChangeLog
index ff51c64..f4aff67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
NOTE: Please refer to the migration notes!
* 0920 blade_bays: now also detects if blade server is switched off
* 0977 check_traceroute: new active check for checking presence and absence of routes...
+ * 0925 ps: improved/fixed calculation of CPU utilization...
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 1c9400a..59e9c76 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -171,8 +171,7 @@ grep ^/dev < /proc/mounts
# processes including username, without kernel processes
echo '<<<ps>>>'
-ps ax -o user,vsz,rss,pcpu,command --columns 10000 | sed -e 1d -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4) /'
-
+ps ax -o user,vsz,rss,cputime,pid,command --columns 10000 | sed -e 1d -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\1,\2,\3,\4,\5) /'
# Memory usage
echo '<<<mem>>>'
diff --git a/checks/ps b/checks/ps
index 01bbe5b..1c6f2be 100644
--- a/checks/ps
+++ b/checks/ps
@@ -76,13 +76,14 @@ ANY_USER = None
GRAB_USER = False
def ps_parse_info(info):
- result = []
+ ps_result = []
lines = iter(info)
wmic_info = {}
use_wmic_info = True
cpu_cores = 1
+
try:
- is_wmic = False
+ is_wmic = False
while True:
line = lines.next()
if line[-1] == '[wmic process]':
@@ -101,7 +102,7 @@ def ps_parse_info(info):
# We need to determine the number of cpu_cores without the wmic_info
if line[2].lower() == "system idle process":
cpu_cores = int(line[1][1:-1].split(",")[9])
- result.append(line)
+ ps_result.append(line)
else:
row = dict(zip(wmic_headers, line))
wmic_info[(row["node"], row["Name"], row["ProcessId"])] = row
@@ -119,7 +120,7 @@ def ps_parse_info(info):
return value
info = []
seen_pids = set([]) # Remove duplicate entries
- for line in result:
+ for line in ps_result:
psinfo = get_ps_info(line[0], line[1])
# Get number of CPU cores from system idle process
if psinfo:
@@ -372,7 +373,21 @@ def check_procs(item, params, info, with_perfdata):
percent_cpu += user_perc + kernel_perc
handle_count += handle_c
else:
- percent_cpu += savefloat(addinfo[3])
+ if ":" in addinfo[3]:
+ if "-" in addinfo[3]:
+ tokens = addinfo[3].split("-")
+ days = int(tokens[0])
+ addinfo[3] = tokens[1]
+ else:
+ days = 0
+ pid = addinfo[4]
+ hours, minutes, seconds = map(int, addinfo[3].split(":"))
+ total_seconds = 86400 * days + 3600 * hours + 60 * minutes + seconds
+ timedif, cputime = get_counter("ps_stat.pcpu.%s" % pid, now, total_seconds)
+ pcpu = cputime * 100
+ else:
+ pcpu = savefloat(addinfo[3])
+ percent_cpu += pcpu
extended_perfdata = True
if "cpulevels" in params:
Module: check_mk
Branch: master
Commit: 285d9aaf0cd3a67fc8ddd3742e947b1c525ea001
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=285d9aaf0cd3a6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 11:47:39 2014 +0200
RBN: Do not match service events if only host events are configured
---
modules/notify.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/notify.py b/modules/notify.py
index 9823f1d..4e397e3 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -767,7 +767,7 @@ def rbn_match_servicelevel(rule, context):
def rbn_match_host_event(rule, context):
if "match_host_event" in rule:
if context["WHAT"] != "HOST":
- if "match_host_event" not in rule:
+ if "match_service_event" not in rule:
return "This is a service notification, but the rule just matches host events"
else:
return # Let this be handled by match_service_event
Module: check_mk
Branch: master
Commit: 5938e2ed61caf902e6a8a23973328900aa2b7c84
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5938e2ed61caf9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 11:47:48 2014 +0200
Improve help text of service levels
---
mkeventd/web/plugins/wato/mkeventd.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/mkeventd/web/plugins/wato/mkeventd.py b/mkeventd/web/plugins/wato/mkeventd.py
index a591994..ad724a0 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1994,9 +1994,17 @@ register_rule(
match = 'all',
)
-sl_help = _("This rule set is useful if you send your monitoring notifications "
- "into the Event Console. A service level set by this rule will be "
- "used as the service level of the resulting event in the Event Console.")
+sl_help = _("A service level is a number that describes the business impact of a host or "
+ "service. This level can be used in rules for notifications, as a filter in "
+ "views or as a criteria in rules for the Event Console. A higher service level "
+ "is assumed to be more business critical. This ruleset allows to assign service "
+ "levels to hosts and/or services. Note: if you assign a service level to "
+ "a host with the ruleset <i>Service Level of hosts</i>, then this level is "
+ "inherited to all services that do <b>not</b> have explicitely assigned a service "
+ "with the ruleset <i>Service Level of services</i>. Assigning no service level "
+ "is equal to defining a level of 0.<br><br>The list of available service "
+ "levels is configured via a <a href='%s'>global option.</a>" %
+ "wato.py?varname=mkeventd_service_levels&mode=edit_configvar")
register_rule(
"grouping",
Module: check_mk
Branch: master
Commit: 9c565575c075959347fbf9df6039bd9bcae8da18
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c565575c07595…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 10:43:30 2014 +0200
Updated Werk 978
---
.werks/978 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.werks/978 b/.werks/978
index cf1034a..988a146 100644
--- a/.werks/978
+++ b/.werks/978
@@ -24,3 +24,14 @@ RP:mkdir -p /var/lib/check_mk_agent/job
RP:chown foo.foo /var/lib/check_mk_agent/job
C-:
+If you update the Check_MK Agent with RPMs/DEB from the new agent bakery or by
+an RPM/DEB created from the source code with <tt>make rpm</tt> or <tt>make deb</tt>
+then the permissions of <tt>/var/lib/check_mk_agent/job</tt> are automatically
+fixed.
+
+If you have installed the agent manually then please make sure that the permissions
+of the job directory are set properly:
+
+C+:
+RP:chmod 755 /var/lib/check_mk_agent/job
+C-:
Module: check_mk
Branch: master
Commit: a2ef8d00c53ec9cbd05c4ae2f09b50761130e7ce
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a2ef8d00c53ec9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon May 26 10:38:16 2014 +0200
Fix security issue with mk-job on Linux
By use of symlinks or hardlinks normal users could inject files to be read
with root permissions. This was due to the fact that <tt>/var/lib/check_mk_agent/job</tt>
was installed with the permissions <tt>1777</tt>, just as <tt>/tmp</tt>. That way
a normal user could have placed a symlink to a file there that is only readable
by <tt>root</tt>. The content of that file would then appear in the agent output.
This has been fixed by not longer using <tt>/var/lib/check_mk_agent/job</tt> directly,
but by creating a separate subdirectory below that for each user. This is done by
a new version of <tt>/usr/bin/mk-job</tt>, so please make sure that if you update
the agent that you also update <tt>mk-job</tt>.
Also you now have to create job subdirectories for non-<tt>root</tt> jobs manually.
If you have a job running as user <tt>foo</tt>, then do:
C+:
RP:mkdir -p /var/lib/check_mk_agent/job
RP:chown foo.foo /var/lib/check_mk_agent/job
C-:
---
.werks/978 | 26 ++++++++++++++++++++++++++
ChangeLog | 2 ++
agents/check_mk_agent.linux | 16 +++++++++++++---
agents/mk-job | 10 ++++++++--
check_mk.spec | 2 +-
5 files changed, 50 insertions(+), 6 deletions(-)
diff --git a/.werks/978 b/.werks/978
new file mode 100644
index 0000000..cf1034a
--- /dev/null
+++ b/.werks/978
@@ -0,0 +1,26 @@
+Title: Fix security issue with mk-job on Linux
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1401093260
+Class: incomp
+
+By use of symlinks or hardlinks normal users could inject files to be read
+with root permissions. This was due to the fact that <tt>/var/lib/check_mk_agent/job</tt>
+was installed with the permissions <tt>1777</tt>, just as <tt>/tmp</tt>. That way
+a normal user could have placed a symlink to a file there that is only readable
+by <tt>root</tt>. The content of that file would then appear in the agent output.
+
+This has been fixed by not longer using <tt>/var/lib/check_mk_agent/job</tt> directly,
+but by creating a separate subdirectory below that for each user. This is done by
+a new version of <tt>/usr/bin/mk-job</tt>, so please make sure that if you update
+the agent that you also update <tt>mk-job</tt>.
+
+Also you now have to create job subdirectories for non-<tt>root</tt> jobs manually.
+If you have a job running as user <tt>foo</tt>, then do:
+
+C+:
+RP:mkdir -p /var/lib/check_mk_agent/job
+RP:chown foo.foo /var/lib/check_mk_agent/job
+C-:
+
diff --git a/ChangeLog b/ChangeLog
index 0c9d45e..6ede67a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,8 @@
NOTE: Please refer to the migration notes!
* 0920 blade_bays: now also detects if blade server is switched off
* 0977 check_traceroute: new active check for checking presence and absence of routes...
+ * 0978 Fix security issue with mk-job on Linux...
+ NOTE: Please refer to the migration notes!
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 1c9400a..15e416c 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -495,10 +495,20 @@ then
done
fi
-# Get statistics about monitored jobs
-if cd /var/lib/check_mk_agent/job; then
+# Get statistics about monitored jobs. Below the job directory there
+# is a sub directory per user that ran a job. That directory must be
+# owned by the user so that a symlink or hardlink attack for reading
+# arbitrary files can be avoided.
+if pushd /var/lib/check_mk_agent/job >/dev/null; then
echo '<<<job>>>'
- head -n -0 -v *
+ for username in *
+ do
+ if [ -d "$username" ] && cd "$username" ; then
+ su "$username" -c "head -n -0 -v *"
+ cd ..
+ fi
+ done
+ popd > /dev/null
fi
# Gather thermal information provided e.g. by acpi
diff --git a/agents/mk-job b/agents/mk-job
index e1df542..04da0c8 100755
--- a/agents/mk-job
+++ b/agents/mk-job
@@ -39,12 +39,18 @@ if [ $# -lt 2 ]; then
exit 1
fi
-OUTPUT_PATH=/var/lib/check_mk_agent/job
+MYSELF=$(id -nu)
+OUTPUT_PATH=/var/lib/check_mk_agent/job/$MYSELF
IDENT=$1
shift
if [ ! -d "$OUTPUT_PATH" ]; then
- mkdir -p "$OUTPUT_PATH"
+ if [ "$MYSELF" = root ] ; then
+ mkdir -p "$OUTPUT_PATH"
+ else
+ echo "ERROR: Missing output directory $OUTPUT_PATH for non-root user '$MYSELF'." >&2
+ exit 1
+ fi
fi
if ! type $1 >/dev/null 2>&1; then
diff --git a/check_mk.spec b/check_mk.spec
index 3d7a93f..ffcf34c 100644
--- a/check_mk.spec
+++ b/check_mk.spec
@@ -197,7 +197,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/lib/check_mk_agent/local
%dir /usr/lib/check_mk_agent/plugins
%dir /var/lib/check_mk_agent
-%dir %attr(1777,-,-)/var/lib/check_mk_agent/job
+%dir /var/lib/check_mk_agent/job
%files agent-scriptless
%config(noreplace) /etc/xinetd.d/check_mk
New check for the Archive Dir of Libelle Business Shadow
Message-ID: <537f9943.kNFqqsHZBNqkp075%bs(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 9da5c66efa84642b8f3c96e0ba452739dda809f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9da5c66efa8464…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri May 23 20:47:58 2014 +0200
libelle_business_shadow.archive_dir: New check for the Archive Dir of Libelle Business Shadow
checks the total / used capacity
---
.werks/960 | 8 +++
ChangeLog | 1 +
checkman/libelle_business_shadow.archive_dir | 35 +++++++++++++
checks/libelle_business_shadow | 53 ++++++++++++++++++++
...heck_mk-libelle_business_shadow.archive_dir.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
6 files changed, 99 insertions(+)
diff --git a/.werks/960 b/.werks/960
new file mode 100644
index 0000000..5d98021
--- /dev/null
+++ b/.werks/960
@@ -0,0 +1,8 @@
+Title: libelle_business_shadow.archive_dir: New check for the Archive Dir of Libelle Business Shadow
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1400870806
+Class: feature
+
+checks the total / used capacity
diff --git a/ChangeLog b/ChangeLog
index 455137b..6a84d1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,7 @@
* 0920 blade_bays: now also detects if blade server is switched off
* 0977 check_traceroute: new active check for checking presence and absence of routes...
* 0959 libelle_business_shadow.info, libelle_business_shadow.process, libelle_business_shadow.status: New Checks for Libelle Business Shadow
+ * 0960 libelle_business_shadow.archive_dir: New check for the Archive Dir of Libelle Business Shadow...
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/libelle_business_shadow.archive_dir b/checkman/libelle_business_shadow.archive_dir
new file mode 100644
index 0000000..7764840
--- /dev/null
+++ b/checkman/libelle_business_shadow.archive_dir
@@ -0,0 +1,35 @@
+title: Libelle Business Shadow: Total / Used Space in Archive Dir
+agents: linux, aix, solaris, hpux
+catalog: app/libelle
+license: GPL
+distribution: check_mk
+description:
+ Checks the total / used capacity in the Archive Dir of Libelle Business
+ Shadow.
+
+ Returns {WARN} or {CRIT} if usage is above given levels.
+
+ It uses the check logic of the {df} check, so for configuration
+ parameters and examples please refer to the man page of {df}.
+
+item:
+ "Archive Dir" for now is the only item.
+
+perfdata:
+ Three values: The first value is the used space in the Archive Dir in MB.
+ Also the minimum (0 MB), maximum (total size) and the warning and critical
+ levels in MB are provided.
+ The second is the change of the usage in MB per range since the last check
+ (e.g. in MB per 24 hours) and the 3rd is the averaged change (so called
+ trend), also in MB per range. Please note, that performance data for
+ trends is enabled per default. You can globally disable that in {main.mk}
+ with {filesystem_default_levels["trend_perfdata"] = False}.
+
+inventory:
+ Finds exactly one check on every node.
+
+[parameters]
+parameters (dict): See man page of {df}.
+
+[configuration]
+filesystem_default_levels: And other, see man page of {df}.
diff --git a/checks/libelle_business_shadow b/checks/libelle_business_shadow
index ebc3a8e..dba0a9e 100644
--- a/checks/libelle_business_shadow
+++ b/checks/libelle_business_shadow
@@ -230,6 +230,21 @@
#.
+def check_libelle_business_shadow_to_mb(size):
+ if size.endswith("MB"):
+ size = int(float(size.replace("MB", "")))
+ elif size.endswith("GB"):
+ size = int(float(size.replace("GB", ""))) * 1024
+ elif size.endswith("TB"):
+ size = int(float(size.replace("TB", ""))) * 1024 * 1024
+ elif size.endswith("PB"):
+ size = int(float(size.replace("PB", ""))) * 1024 * 1024 * 1024
+ elif size.endswith("EB"):
+ size = int(float(size.replace("EB", ""))) * 1024 * 1024 * 1024 * 1024
+ else:
+ size = int(float(size))
+ return size
+
# parses agent output into a dict
def check_libelle_business_shadow_parse(info):
parsed = {}
@@ -246,6 +261,10 @@ def check_libelle_business_shadow_parse(info):
line[0].startswith("trdarchiver ") ):
parsed["process"] = re.sub(" +$", "", line[0])
parsed["process_status"] = re.sub("^[0-9]+ +", "", line[3])
+ elif len(line) > 1 and line[0].startswith("Archive-Dir total "):
+ parsed["arch_total_mb"] = check_libelle_business_shadow_to_mb(re.sub(" ", "", line[1]))
+ elif len(line) > 1 and line[0].startswith("Archive-Dir free "):
+ parsed["arch_free_mb"] = check_libelle_business_shadow_to_mb(re.sub(" ", "", line[1]))
return parsed
# .--info----------------------------------------------------------------.
@@ -355,3 +374,37 @@ check_info["libelle_business_shadow.process"] = {
}
#.
+# .--archive dir---------------------------------------------------------.
+# | _ _ _ _ |
+# | __ _ _ __ ___| |__ (_)_ _____ __| (_)_ __ |
+# | / _` | '__/ __| '_ \| \ \ / / _ \ / _` | | '__| |
+# | | (_| | | | (__| | | | |\ V / __/ | (_| | | | |
+# | \__,_|_| \___|_| |_|_| \_/ \___| \__,_|_|_| |
+# | |
+# '----------------------------------------------------------------------'
+
+def inventory_libelle_business_shadow_archive_dir(info):
+ parsed = check_libelle_business_shadow_parse(info)
+ if "arch_total_mb" in parsed.keys() and "arch_free_mb" in parsed.keys():
+ return [ ("Archive Dir", {}) ]
+ else:
+ return []
+
+def check_libelle_business_shadow_archive_dir(item, params, info):
+ parsed = check_libelle_business_shadow_parse(info)
+ fslist = []
+ fslist.append((item, parsed["arch_total_mb"], parsed["arch_free_mb"]))
+
+ return df_check_filesystem_list(item, params, fslist)
+
+
+check_info["libelle_business_shadow.archive_dir"] = {
+ "check_function" : check_libelle_business_shadow_archive_dir,
+ "inventory_function" : inventory_libelle_business_shadow_archive_dir,
+ "service_description" : "Libelle Business Shadow %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "includes" : [ "df.include" ],
+}
+
+#.
diff --git a/pnp-templates/check_mk-libelle_business_shadow.archive_dir.php b/pnp-templates/check_mk-libelle_business_shadow.archive_dir.php
new file mode 120000
index 0000000..aac1010
--- /dev/null
+++ b/pnp-templates/check_mk-libelle_business_shadow.archive_dir.php
@@ -0,0 +1 @@
+check_mk-hitachi_hnas_volume.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index eb758ae..eb8885a 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -118,6 +118,7 @@ perfometers["check_mk-emcvnx_raidgroups.capacity"] = perfometer_check_mk_df
perfometers["check_mk-emcvnx_raidgroups.capacity_contiguous"] = perfometer_check_mk_df
perfometers["check_mk-ibm_svc_mdiskgrp"] = perfometer_check_mk_df
perfometers["check_mk-fast_lta_silent_cubes.capacity"] = perfometer_check_mk_df
+perfometers["check_mk-libelle_business_shadow.archive_dir"] = perfometer_check_mk_df
def perfometer_esx_vsphere_datastores(row, check_command, perf_data):
used_mb = perf_data[0][1]