Module: check_mk
Branch: master
Commit: 7adf2422cbb0f032e577087ac4ec9f0086caae1b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7adf2422cbb0f0…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Jan 25 15:13:05 2018 +0100
5497 statgrab_net: collect net stats for local zones if dlstat exists
Previously, only the net stats of the global zone were delivered by the
check_mk_agent of solaris. Now the net stats of local zones are delivered
as well if dlstat is available.
Change-Id: Ic9ea035921ca68be9a45aefc842ea67296ebed02
---
.werks/5497 | 12 ++++++++++++
agents/check_mk_agent.solaris | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/5497 b/.werks/5497
new file mode 100644
index 0000000..d524906
--- /dev/null
+++ b/.werks/5497
@@ -0,0 +1,12 @@
+Title: statgrab_net: collect net stats for local zones if dlstat exists
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1517496765
+Class: feature
+
+Previously, only the net stats of the global zone were delivered by the
+check_mk_agent of solaris. Now the net stats of local zones are delivered
+as well if dlstat is available.
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 937826e..a829bbc 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -250,8 +250,8 @@ then
statgrab_vars="const. cpu. disk. general. mem. page. swap. user."
statgrab_sections="cpu disk page"
- # Only collect net stats in global zone.
- if [ "$zonename" == "global" ]
+ # Collect net stats in the global zone and in local zones if dlstat is present.
+ if [ "$zonename" == "global" ] || type dlstat &>/dev/null
then
statgrab_vars="$statgrab_vars net."
statgrab_sections="$statgrab_sections net"