diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ae5e89..798fc62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Features * Add the possibility to manage 'xymon' user's groups. * Manage `mq` plugin and state. +* Manage `libs` plugin and state. ## v1.0 diff --git a/README.md b/README.md index b2b6583..532939c 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ Manage Xymon (client) installation and configuration. * **xymon_plug_mq_state** : The state of plugin `mq` [default : `true`]. * **xymon_plug_mq_path** : Configuration file for the `mq` plugin [default : `/etc/xymon/clientlaunch.d/mq.cfg`]. * **xymon_plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`]. +* **xymon_plug_libs_state** : The state of plugin `libs` [default : `true`]. +* **xymon_plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`]. +* **xymon_plug_libs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/libs.cfg.j2`]. ### OS Specific Variables @@ -57,6 +60,7 @@ This role will : ## Plugins Some plugins and options can be managed with this role : +* libs : Check for running processes with upgraded libraries. * mq : Check mail queue. ## Development diff --git a/defaults/main.yml b/defaults/main.yml index b5f52d0..e581e77 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,3 +25,6 @@ xymon_plug_manage: true xymon_plug_mq_state: true xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' +xymon_plug_libs_state: true +xymon_plug_libs_path: '/etc/xymon/clientlaunch.d/libs.cfg' +xymon_plug_libs_tpl: 'etc/xymon/clientlaunch.d/libs.cfg.j2' diff --git a/tasks/main.yml b/tasks/main.yml index 6ca1861..beb097f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -53,4 +53,14 @@ mode: 0644 when: xymon_plug_manage notify: restart xymon-client service + +- name: PLUGIN libs + template: + src: '{{ xymon_plug_libs_tpl }}' + dest: '{{ xymon_plug_libs_path }}' + owner: root + group: root + mode: 0644 + when: xymon_plug_manage + notify: restart xymon-client service # }}} diff --git a/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 b/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 new file mode 100644 index 0000000..3ee7289 --- /dev/null +++ b/templates/etc/xymon/clientlaunch.d/libs.cfg.j2 @@ -0,0 +1,6 @@ +[libs] + {{ '#DISABLED' if xymon_plug_libs_state else 'DISABLED' }} + ENVFILE /etc/xymon/xymonclient.cfg + CMD $XYMONCLIENTHOME/ext/libs + LOGFILE /var/log/xymon/xymonclient.log + INTERVAL 5m diff --git a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 index ef437d3..c818df7 100644 --- a/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 +++ b/templates/etc/xymon/clientlaunch.d/mq.cfg.j2 @@ -1,5 +1,5 @@ [mq] - "{{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }}" + {{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }} ENVFILE /etc/xymon/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/mq LOGFILE /var/log/xymon/xymonclient.log