Manage mq plugin.

This commit is contained in:
Jeremy Gardais 2017-09-04 17:24:40 +02:00
parent 3741af19bc
commit e1de38fa96
5 changed files with 36 additions and 3 deletions

View File

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

View File

@ -5,9 +5,10 @@
* [OS Specific Variables](#os-specific-variables) * [OS Specific Variables](#os-specific-variables)
3. [Example Playbook](#example-playbook) 3. [Example Playbook](#example-playbook)
4. [Configuration](#configuration) 4. [Configuration](#configuration)
5. [Development](#development) 4. [Plugins](#plugins)
6. [License](#license) 6. [Development](#development)
7. [Author Information](#author-information) 7. [License](#license)
8. [Author Information](#author-information)
## Overview ## Overview
@ -25,6 +26,9 @@ Manage Xymon (client) installation and configuration.
* **xymon_cli_service_name**: `xymon-client` service name [default: `xymon-client`]. * **xymon_cli_service_name**: `xymon-client` service name [default: `xymon-client`].
* **xymon_cli_service_enabled**: Set `xymon-client` service available at startup [default: `true`]. * **xymon_cli_service_enabled**: Set `xymon-client` service available at startup [default: `true`].
* **xymon_srv_list**: The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults: `monitoring.{{ ansible_domain }}`]. * **xymon_srv_list**: The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults: `monitoring.{{ ansible_domain }}`].
* **xymon_plug_manage**: [default: `true`].
* **xymon_plug_mq_path**: [default: `/etc/xymon/clientlaunch.d/mq.cfg`].
* **xymon_plug_mq_tpl**: [default: `etc/xymon/clientlaunch.d/mq.cfg.j2`].
### OS Specific Variables ### OS Specific Variables
@ -49,6 +53,11 @@ This role will:
* Manage `xymon-client` configuration and service. * Manage `xymon-client` configuration and service.
* Add 'xymon' user to new groups. * Add 'xymon' user to new groups.
## Plugins
Some plugins and options can be managed with this role:
* mq: Check mail queue.
## Development ## Development
This source code comes from our [Gogs instance][xymon source] and the [Github repo][xymon github] exist just to be able to send the role to Ansible Galaxy… This source code comes from our [Gogs instance][xymon source] and the [Github repo][xymon github] exist just to be able to send the role to Ansible Galaxy…

View File

@ -19,3 +19,8 @@ xymon_cli_service_enabled: true
# server # server
xymon_srv_list: "monitoring.{{ ansible_domain }}" xymon_srv_list: "monitoring.{{ ansible_domain }}"
# plugins
xymon_plug_manage: true
xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg'
xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2'

View File

@ -42,3 +42,15 @@
enabled: '{{ xymon_cli_service_enabled }}' enabled: '{{ xymon_cli_service_enabled }}'
when: xymon_cli_service_manage when: xymon_cli_service_manage
# }}} # }}}
# plugins {{{
- name: PLUGIN mq
template:
src: '{{ xymon_plug_mq_tpl }}'
dest: '{{ xymon_plug_mq_path }}'
owner: root
group: root
mode: 0644
when: xymon_plug_manage
notify: restart xymon-client service
# }}}

View File

@ -0,0 +1,6 @@
[mq]
DISABLED
ENVFILE /etc/xymon/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/mq
LOGFILE /var/log/xymon/xymonclient.log
INTERVAL 5m