Module: check_mk
Branch: master
Commit: c183585e93f4281730e0fcabb62b3eba2fb08fbd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c183585e93f428…
Author: Sven Rueà <sr(a)mathias-kettner.de>
Date: Wed Oct 26 15:11:37 2016 +0200
4035 FIX df_zos: Fixed ignoring last filesystem after new discovery
Filesystemcheck df_zos was ignoring the last filesystem, because not all versions
of z/OS will end with a zero line after the df command. This was fixed with adding
the pattern line fix at the end of the agent output.
Pleae do a new discovery to check, if there is a filesystem is missing.
---
.werks/4035 | 14 ++++++++++++++
ChangeLog | 1 +
agents/z_os/README.convert | 6 ++++--
agents/z_os/check_mk_agent | 2 +-
agents/z_os/check_mk_agent_wrapper | 2 +-
checks/df_zos | 7 ++++---
6 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/.werks/4035 b/.werks/4035
new file mode 100644
index 0000000..7cfa3c0
--- /dev/null
+++ b/.werks/4035
@@ -0,0 +1,14 @@
+Title: df_zos: Fixed ignoring last filesystem after new discovery
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i2
+Date: 1477487290
+
+Filesystemcheck df_zos was ignoring the last filesystem, because not all versions
+of z/OS will end with a zero line after the df command. This was fixed with adding
+the pattern line fix at the end of the agent output.
+
+Pleae do a new discovery to check, if there is a filesystem is missing.
diff --git a/ChangeLog b/ChangeLog
index 15e5f0c..8c07565 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,7 @@
* 3961 FIX: fixed error sections handling if parse function is available
* 3831 FIX: ucd_cpu_util: no longer reports an UNKNOWN error when the counter data
wasn't updated...
* 3985 FIX: mrpe: fixed broken long output when using the CMC...
+ * 4035 FIX: df_zos: Fixed ignoring last filesystem after new discovery...
Multisite:
* 3959 Two new filters for the comment view: author and comment text field
diff --git a/agents/z_os/README.convert b/agents/z_os/README.convert
index 8d88b84..310dde6 100644
--- a/agents/z_os/README.convert
+++ b/agents/z_os/README.convert
@@ -1,5 +1,7 @@
Lesbar:
-iconv -f ibm-1047 -t utf-8 FILENAME | tr "\205" "\12" | tr -d
"\302"
+- Agent: iconv -f ibm-1047 -t utf-8 check_mk_agent | tr "\205" "\12"
| tr -d "\302" > check_mk_agent.zOS
+- Wrapper: iconv -f ibm-1047 -t utf-8 check_mk_agent_wrapper | tr "\205"
"\12" | tr -d "\302" > check_mk_agent.wrapper
z/OS:
-iconv -f utf-8 -t ibm-1047 FILENAME | tr "\12" "\205" | tr -d
"\302"
+- Agent: iconv -f utf-8 -t ibm-1047 check_mk_agent.zOS | tr "\12"
"\205" | tr -d "\302" > check_mk_agent
+- Wrapper: iconv -f utf-8 -t ibm-1047 check_mk_agent.wrapper | tr "\12"
"\205" | tr -d "\302" > check_mk_agent_wrapper
diff --git a/agents/z_os/check_mk_agent b/agents/z_os/check_mk_agent
index cc8f920..3189456 100644
--- a/agents/z_os/check_mk_agent
+++ b/agents/z_os/check_mk_agent
@@ -1 +1 @@
-{
§
@ònP`%¢
£@N§¥%%
§£@mÅÄÃmÁÄÄmÅÙÙÕÖò~ñ%
§£@×ÁãÈ~a%%
§£@ÔÒmÓÉÄÉÙ~a€¢aa
mm
£%
§£@ÔÒmÃÖÕÆÄÉÙ~a
£a
m%{@Ô
@¢€
k@š@¢£
@
¢@
@€%×ÁãÈ~[×ÁãÈza€¢a%%{@Á@
§
€£
¢@@×ÓäÇÉÕâÄÉÙ@Š@¢š@
@
§
€£
@@£
%{@€€£@
@£@£
@€£€£@@£
@
£K@×€¢@
@£
@Š%{@¢
£¢@@€¢£@€£€£@
¢@Š£@}LLL}@@}nnn}%×ÓäÇÉÕâÄÉÙ~[ÔÒmÓÉÄÉÙa€¢%%{@Á@
§
€£
¢@@ÓÖÃÁÓÄÉÙ@Š@š@
§
€£
@@£
%{@€£€£@¢
£
@£@£
@¢
£@LLLnnnK@×
¢
%{@
@£@
@€
££@@
£¢@€£@@
¢K%ÓÖÃÁÓÄÉÙ~[ÔÒmÓÉÄÉÙa%%{@Á@
¢@@â×ÖÖÓÄÉÙ@Š@¢š@
@£@£
@
£%{@€£€£@@£
š@
@£@€££
@M¢
@
Š]%â×ÖÖÓÄÉÙ~[ÔÒmÃÖÕÆÄÉÙa¢%%
@LLL
mnnn%
@å
¢z@ñKòKø%
@Á
£Öâz@©aÖâ%
@×€¢Ä
£šz@[×ÓäÇÉÕâÄÉÙ%
@ÓÄ
£šz@[ÓÖÃÁÓÄÉÙ%
@âÄ
£šz@[â×ÖÖÓÄÉÙ%
@Á
£Ä
£šz@[ÔÒmÃÖÕÆÄÉÙ%%~[MŠ]%%%{@×
¢¢
¢%
@LLL¢nnn%
@¢@`
@`@€¢
k¥¢©k¥¢©öôk€k@O@¢€@O@¢
@`
@ñ@`
@}¢a@\àM_@œ\à]@\àM_@œ\à]@\àM_@œ\à]@\àM_@œ\à]@\aMàñkàòkàókàô]@a}%%%{@ä£
%
@}LLL€£
nnn}%a€¢aa€£
%%%{@Æ
¢š¢£
¢%
@LLLm©¢nnn%@`¥×@O@¢
@ñ@O@¢
@}¢a_à¢\[a{{{{{{{{{{a}%%%{@×€¢%@@[×ÓäÇÉÕâÄÉÙ@òna
¥a€%£
%@@@@@¢£@@[M¢]%@@@@%@@@@@@@@@@`§@[¢£@œ@^@£
%@@@@@@@@@@@@Ka[¢£%@@@@@@@@%@@@@
%%%%{@Ó@
¢%
@}LLLnnn}%@@[ÓÖÃÁÓÄÉÙ@^@£
%@@@@@¢£@@[M¢]@^@%@@@@@@@@@@`@[¢£@`@`§@[¢£@œ@^@£
%@@@@@@@@@@@@Ka[¢£%@@@@@@@@%@@@@
%%
\ No newline at end of file
+{
§
@ònP`%¢
£@N§¥%%
§£@mÅÄÃmÁÄÄmÅÙÙÕÖò~ñ%
§£@×ÁãÈ~a%%
§£@ÔÒmÓÉÄÉÙ~a€¢aa
mm
£%
§£@ÔÒmÃÖÕÆÄÉÙ~a
£a
m%{@Ô
@¢€
k@š@¢£
@
¢@
@€%×ÁãÈ~[×ÁãÈza€¢a%%{@Á@
§
€£
¢@@×ÓäÇÉÕâÄÉÙ@Š@¢š@
@
§
€£
@@£
%{@€€£@
@£@£
@€£€£@@£
@
£K@×€¢@
@£
@Š%{@¢
£¢@@€¢£@€£€£@
¢@Š£@}LLL}@@}nnn}%×ÓäÇÉÕâÄÉÙ~[ÔÒmÓÉÄÉÙa€¢%%{@Á@
§
€£
¢@@ÓÖÃÁÓÄÉÙ@Š@š@
§
€£
@@£
%{@€£€£@¢
£
@£@£
@¢
£@LLLnnnK@×
¢
%{@
@£@
@€
££@@
£¢@€£@@
¢K%ÓÖÃÁÓÄÉÙ~[ÔÒmÓÉÄÉÙa%%{@Á@
¢@@â×ÖÖÓÄÉÙ@Š@¢š@
@£@£
@
£%{@€£€£@@£
š@
@£@€££
@M¢
@
Š]%â×ÖÖÓÄÉÙ~[ÔÒmÃÖÕÆÄÉÙa¢%%
@}LLL
mnnn}%
@}å
¢z@ñKòKø}%
@}Á
£Öâz@©aÖâ}%
@×€¢Ä
£šz@[×ÓäÇÉÕâÄÉÙ%
@ÓÄ
£šz@[ÓÖÃÁÓÄÉÙ%
@âÄ
£šz@[â×ÖÖÓÄÉÙ%
@Á
£Ä
£šz@[ÔÒmÃÖÕÆÄÉÙ%%~[MŠ]%%%{@×
¢¢
¢%
@}LLL¢nnn}%
@}¢@`
@`@€¢
k¥¢©k¥¢©öôk€k}@O@¢€@O@¢
@`
@ñ@`
@}¢a@\àM_@œ\à]@\àM_@œ\à]@\àM_@œ\à]@\àM_@œ\à]@\aMàñkàòkàókàô]@a}%%%{@ä£
%
@}LLL€£
nnn}%a€¢aa€£
%%%{@Æ
¢š¢£
¢%
@}LLLm©¢nnn}%@`¥×@O@¢
@ñ@O@¢
@}¢a_à¢\[a{{{{{{{{{{a}%
@}{{{{{{{{{{}%%%{@×€¢%@@[×ÓäÇÉÕâÄÉÙ@òna
¥a€%£
%@@@@@¢£@@[M¢]%@@@@%@@@@@@@@@@`§@[¢£@œ@^@£
%@@@@@@@@@@@@Ka[¢£%@@@@@@@@%@@@@
%%%%{@Ó@
¢%
@}LLLnnn}%@@[ÓÖÃÁÓÄÉÙ@^@£
%@@@@@¢£@@[M¢]@^@%@@@@@@@@@@`@[¢£@`@`§@[¢£@œ@^@£
%@@@@@@@@@@@@Ka[¢£%@@@@@@@@%@@@@
%%
\ No newline at end of file
diff --git a/agents/z_os/check_mk_agent_wrapper b/agents/z_os/check_mk_agent_wrapper
index b39eb51..ba57ed0 100644
--- a/agents/z_os/check_mk_agent_wrapper
+++ b/agents/z_os/check_mk_agent_wrapper
@@ -1 +1 @@
-{Zaa¢@@@@@@@@@@@@{
§
@ònP`{
§£
§£@mÅÄÃmÁÄÄmÅÙÙÕÖò~ñ
§£@×ÁãÈ~a¢
£@`@
€
£@[M
@[ð]aK@Ka
mm
£@O@¥@`ÉÂÔñðô÷@`£äãÆø@O@£@@@@@@@@@@
\ No newline at end of file
+{Zaa¢%{
§
@ònP`%{
§£%
§£@mÅÄÃmÁÄÄmÅÙÙÕÖò~ñ%
§£@×ÁãÈ~a%¢
£@`@
€
£%@[M
@[ð]a%K@Ka
mm
£@O@¥@`ÉÔñðô÷@`£äãÆø@O@£%
\ No newline at end of file
diff --git a/checks/df_zos b/checks/df_zos
index 5e4732d..b0f36c5 100644
--- a/checks/df_zos
+++ b/checks/df_zos
@@ -51,9 +51,10 @@ def parse_df_zos(info):
for line in info:
if line[0].startswith('#####'):
# Add item for filesystem
- parsed.setdefault(fs, {})
- parsed[fs].setdefault('size', usage)
- parsed[fs].setdefault('options', options)
+ if fs and usage and options:
+ parsed.setdefault(fs, {})
+ parsed[fs].setdefault('size', usage)
+ parsed[fs].setdefault('options', options)
fs = None
usage = []