From 34bd96db4b61c9c80e41d0a91ddb51ef9dbb08c3 Mon Sep 17 00:00:00 2001 From: Thomas Eckert Date: Wed, 20 Nov 2019 15:47:25 +0100 Subject: [PATCH] add `--msgcache`-parameter to support passive clients (__xymon_client) Fix a typo along the way, too. --- cdist/conf/type/__xymon_client/man.rst | 13 +++++++++++-- cdist/conf/type/__xymon_client/manifest | 9 +++++++-- cdist/conf/type/__xymon_client/parameter/boolean | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 cdist/conf/type/__xymon_client/parameter/boolean diff --git a/cdist/conf/type/__xymon_client/man.rst b/cdist/conf/type/__xymon_client/man.rst index 6660b0ef..05d085dc 100644 --- a/cdist/conf/type/__xymon_client/man.rst +++ b/cdist/conf/type/__xymon_client/man.rst @@ -27,21 +27,30 @@ servers to. While DNS-names are ok it is discouraged, defaults to 127.0.0.1. +BOOLEAN PARAMETERS +------------------ +msgcache + Enable xymon `msgcache`. Note: XYMONSERVER has to be `127.0.0.1` for using + `msgcache` (see `msgcache (8)` of the xymon documentation for details). + EXAMPLES -------- .. code-block:: sh - # minmal, report to 127.0.0.1 + # minimal, report to 127.0.0.1 __xymon_client # specify server: __xymon_client --servers "192.168.1.1" + # activate `msgcache` for passive client: + __xymon_client --msgcache + SEE ALSO -------- -:strong:`cdist__xymon_server`\ (7), :strong:`xymon`\ (7) +:strong:`cdist__xymon_server`\ (7), :strong:`xymon`\ (7), :strong:`msgcache`\ (8) AUTHORS diff --git a/cdist/conf/type/__xymon_client/manifest b/cdist/conf/type/__xymon_client/manifest index 92ad079e..88293a12 100755 --- a/cdist/conf/type/__xymon_client/manifest +++ b/cdist/conf/type/__xymon_client/manifest @@ -34,13 +34,18 @@ esac __package xymon-client --state "$state" +if [ -f "$__object/parameter/msgcache" ]; then + require="__package/xymon-client" __line /etc/xymon/clientlaunch.cfg \ + --regex DISABLED --state absent +fi + require="__package/xymon-client" __key_value CLIENTHOSTNAME \ - --file /etc/default/xymon-client \ + --file /etc/default/xymon-client \ --value "'$__target_hostname'" \ --delimiter '=' \ --state "$state" require="__package/xymon-client" __key_value XYMONSERVERS \ - --file /etc/default/xymon-client \ + --file /etc/default/xymon-client \ --value "'$servers'" \ --delimiter '=' \ --state "$state" diff --git a/cdist/conf/type/__xymon_client/parameter/boolean b/cdist/conf/type/__xymon_client/parameter/boolean new file mode 100644 index 00000000..0dd7839d --- /dev/null +++ b/cdist/conf/type/__xymon_client/parameter/boolean @@ -0,0 +1 @@ +msgcache