Hello,
I wrote a local check to read Linux updates (apt, yum, zypper, dnf). I would like to use a multi-line output like https://checkmk.com/cms_localchecks.html#Multi-line%20outputs
The script generates the following output as an example:
P Linux-Updates updates=2;5;10|sec_updates=2;1;3|Sources=2|Locks=0;3;5 2 Updates (kernel-uek-4.14.35-1902.10.8.el7uek.x86_64 kernel-uek-4.14.35-1902.8.4.el7uek.x86_64) \n2 Security Updates \n0 packets are locked \n2 used Paket-Sources
The local agent with this check generate in local-section following output:
<<<local>>>
...
P Linux-Updates updates=3;5;10|sec_updates=2;1;3|Sources=4|Locks=0;3;5 3 Updates (plugins: kernel-uek-4.14.35-1902.10.8.el7uek.x86_64 kernel-uek-4.14.35-1902.8.4.el7uek.x86_64) \n2 Security Updates \n0 packets are locked \n4 used Paket-Sources
P Linux-Updates updates=3;5;10|sec_updates=2;1;3|Sources=4|Locks=0;3;5 3 Updates (plugins: kernel-uek-4.14.35-1902.10.8.el7uek.x86_64 kernel-uek-4.14.35-1902.8.4.el7uek.x86_64) \n2 Security Updates \n0 packets are locked \n4 used Paket-Sources`
on the check-mk-server:
cmk -nv --debug --checks=local hostname
Check_MK version 1.6.0p7
+ FETCHING DATA
[agent] Execute data source
[piggyback] Execute data source
....
Linux-Updates WARN - 3 Updates (plugins: kernel-uek-4.14.35-1902.10.8.el7uek.x86_64 kernel-uek-4.14.35-1902.8.4.el7uek.x86_64)
OK - [agent] Version: 1.6.0p7, OS: linux, [piggyback] Successfully processed from source '...', execution time 6.9 sec | execution_time=6.943 user_time=0.100 system_time=0.000 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=6.844
Why does checkmk ignore the output behind “\n”?
Edit: I use checkmk 1.6.0p7 Enterprise ; Agent versions are 1.6.0p7
best regards Tux
