Manage `libs` plugin and state.

This commit is contained in:
Jeremy Gardais 2017-09-04 17:42:53 +02:00
parent fe1b22390f
commit 7f471b284f
6 changed files with 25 additions and 1 deletions

View File

@ -4,6 +4,7 @@
### Features ### Features
* Add the possibility to manage 'xymon' user's groups. * Add the possibility to manage 'xymon' user's groups.
* Manage `mq` plugin and state. * Manage `mq` plugin and state.
* Manage `libs` plugin and state.
## v1.0 ## v1.0

View File

@ -30,6 +30,9 @@ Manage Xymon (client) installation and configuration.
* **xymon_plug_mq_state**: The state of plugin `mq` [default: `true`]. * **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_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_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 ### OS Specific Variables
@ -57,6 +60,7 @@ This role will:
## Plugins ## Plugins
Some plugins and options can be managed with this role: Some plugins and options can be managed with this role:
* libs: Check for running processes with upgraded libraries.
* mq: Check mail queue. * mq: Check mail queue.
## Development ## Development

View File

@ -25,3 +25,6 @@ xymon_plug_manage: true
xymon_plug_mq_state: true xymon_plug_mq_state: true
xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg'
xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2' 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'

View File

@ -53,4 +53,14 @@
mode: 0644 mode: 0644
when: xymon_plug_manage when: xymon_plug_manage
notify: restart xymon-client service 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
# }}} # }}}

View File

@ -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

View File

@ -1,5 +1,5 @@
[mq] [mq]
"{{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }}" {{ '#DISABLED' if xymon_plug_mq_state else 'DISABLED' }}
ENVFILE /etc/xymon/xymonclient.cfg ENVFILE /etc/xymon/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/mq CMD $XYMONCLIENTHOME/ext/mq
LOGFILE /var/log/xymon/xymonclient.log LOGFILE /var/log/xymon/xymonclient.log