2017-08-11 13:58:39 +02:00
# Xymon
1. [Overview ](#overview )
2. [Role Variables ](#role-variables )
2020-11-03 17:41:37 +01:00
* [Plugins Specific Variables ](#plugins-variables )
2017-08-11 13:58:39 +02:00
* [OS Specific Variables ](#os-specific-variables )
3. [Example Playbook ](#example-playbook )
4. [Configuration ](#configuration )
2017-09-04 17:24:40 +02:00
4. [Plugins ](#plugins )
6. [Development ](#development )
7. [License ](#license )
8. [Author Information ](#author-information )
2017-08-11 13:58:39 +02:00
## Overview
Manage Xymon (client) installation and configuration.
## Role Variables
2020-11-03 15:17:08 +01:00
* **xymon_cli__manage** : If `xymon-client` should be managed with this role [default : `true` ].
* **xymon_cli__pkg_state** : State of new `xymon-client` package(s) [default : `present` ].
* **xymon_cli__default_conf_path** : Configuration file for `xymon-client` [default : `/etc/default/xymon-client` ].
* **xymon_cli__default_conf_tpl** : Template used to generate the previous config file [default : `etc/default/xymon-client.j2` ].
* **xymon_cli__hostname** : Allow to override default value of CLIENTHOSTNAME var [default : `{{ ansible_fqdn }}` ].
* **xymon_cli__user_groups** : List of 'xymon' user's groups [default : `xymon` ].
* **xymon_cli__service_manage** : If `xymon-client` service should be managed with this role [default : `true` ].
* **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__srv_list** : The list of Xymon servers (you must give an hostname, IP,… reachable from any clients) [defaults : `monitoring.{{ ansible_domain }}` ].
* **xymon_cli__plug_manage** : If this role should manage plugins configuration [default : `true` ].
2020-02-25 17:05:33 +01:00
### Plugins Variables
2020-11-03 17:41:37 +01:00
* **xymon_cli__plug_combined_packages** : Combine all packages vars related to plugins (only enabled plugins).
2020-11-03 13:31:35 +01:00
* **xymon_cli__plug_combined_clientlaunch** : Combine clientlaunch files for all plugins.
2020-02-25 17:05:33 +01:00
#### APT
Variables for the APT plugin from hobbit-plugins. The plugin check for
outstanding updates.
2020-11-03 15:17:08 +01:00
* **xymon_cli__plug_apt_state** : The state of plugin `apt` [default : `true` ].
* **xymon_cli__plug_apt_package** : The packages to install to provide `apt` plugin [default : `[ 'libtimedate-perl' ]` ].
* **xymon_cli__plug_apt_path** : Configuration file for the `apt` plugin [default : `/etc/xymon/clientlaunch.d/apt.cfg` ].
* **xymon_cli__plug_apt_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/apt.cfg.j2` ].
* **xymon_cli__plug_apt_interval** : Time between each run of the `apt` plugin [default : `5m` ].
* **xymon_cli__plug_apt_default_whitelist** : Default list of allowed packages not installed from repositories [default : `[]` ].
* **xymon_cli__plug_apt_whitelist** : All hosts list of allowed packages not installed from repositories [default : `[]` ].
* **xymon_cli__plug_apt_group_whitelist** : Group list of allowed packages not installed from repositories [default : `[]` ].
* **xymon_cli__plug_apt_host_whitelist** : Host list of allowed packages not installed from repositories [default : `[]` ].
2020-02-25 17:05:33 +01:00
#### IPMI
Variables for the IPMI plugin from hobbit-plugins. The plugin read IPMI
sensors and event log.
2019-05-24 09:16:07 +02:00
* **xymon_cli__plug_ipmi_state** : The state of plugin `ipmi` [default : `false` ].
* **xymon_cli__plug_ipmi_state** : The packages to install to provide `ipmi` plugin [default : `[ 'ipmitool' ]` ].
* **xymon_cli__plug_ipmi_path** : Configuration file for the `ipmi` plugin [default : `/etc/xymon/clientlaunch.d/ipmi.cfg` ].
* **xymon_cli__plug_ipmi_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/ipmi.cfg.j2` ].
* **xymon_cli__plug_ipmi_interval** : Time between each run of the `ipmi` plugin [default : `5m` ].
2020-02-25 17:05:33 +01:00
2023-04-26 14:20:22 +02:00
#### Kern
Variables for the kern plugin from hobbit-plugins. The plugin check for running
outdated running kernel and need for reboot.
* **xymon_cli__plug_kern_state** : The state of plugin `kern` [default : `true` ].
* **xymon_cli__plug_kern_package** : The packages to install to provide `kern` plugin [default : `[ 'binutils', 'libfile-slurp-perl', 'libsort-naturally-perl' ]` ].
* **xymon_cli__plug_kern_path** : Configuration file for the `kern` plugin [default : `/etc/xymon/clientlaunch.d/kern.cfg` ].
* **xymon_cli__plug_kern_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/kern.cfg.j2` ].
* **xymon_cli__plug_kern_interval** : Time between each run of the `kern` plugin [default : `5m` ].
2020-02-25 17:05:33 +01:00
#### Libs
Variables for the Libs plugin from hobbit-plugins. The plugin check for running
processes with upgraded libraries.
2020-11-03 15:17:08 +01:00
* **xymon_cli__plug_libs_state** : The state of plugin `libs` [default : `true` ].
2023-04-26 14:47:00 +02:00
* **xymon_cli__plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'lsof', 'sudo', 'libyaml-tiny-perl' ]` ].
2020-11-03 15:17:08 +01:00
* **xymon_cli__plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg` ].
* **xymon_cli__plug_libs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/libs.cfg.j2` ].
* **xymon_cli__plug_libs_interval** : Time between each run of the `libs` plugin [default : `5m` ].
* **xymon_cli__plug_libs_default_whitelist** : Default whitelist of processes that should not be monitored with `libs` plugin.
* **xymon_cli__plug_libs_whitelist** : All hosts whitelist of processes that should not be monitored with `libs` plugin.
* **xymon_cli__plug_libs_group_whitelist** : Group whitelist of processes that should not be monitored with `libs` plugin.
* **xymon_cli__plug_libs_host_whitelist** : Host whitelist of processes that should not be monitored with `libs` plugin.
2020-02-25 17:05:33 +01:00
2020-11-02 18:04:12 +01:00
#### Net
Require hobbit-plugins > 20200525.
Variables for the Megaraid plugin from hobbit-plugins. The plugin check
hardware raid status with Megacli tools [from hwraid.le-vert ](url hwraid ).
You will need to install `megaclisas-status` by your own to get this plugin
running correctly. Please take a look to the [Readme ](megaraid plugin doc ) of
the project for more informations.
* **xymon_cli__plug_megaraid_state** : The state of plugin `megaraid` [default : `false` ].
* **xymon_cli__plug_megaraid_package** : The packages to install to provide `megaraid` plugin [default : `[ 'libipc-run-perl' ]` ].
* **xymon_cli__plug_megaraid_path** : Configuration file for the `megaraid` plugin [default : `/etc/xymon/clientlaunch.d/megaraid.cfg` ].
* **xymon_cli__plug_megaraid_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/megaraid.cfg.j2` ].
* **xymon_cli__plug_megaraid_interval** : Time between each run of the `megaraid` plugin [default : `5m` ].
2020-02-25 17:05:33 +01:00
#### Mq
Variables for the Mq plugin from hobbit-plugins. The plugin check Postfix's
mail queue.
2020-11-03 15:17:08 +01:00
* **xymon_cli__plug_mq_state** : The state of plugin `mq` [default : `true` ].
* **xymon_cli__plug_mq_package** : The packages to install to provide `mq` plugin [default : `[ 'libtimedate-perl' ]` ].
* **xymon_cli__plug_mq_path** : Configuration file for the `mq` plugin [default : `/etc/xymon/clientlaunch.d/mq.cfg` ].
* **xymon_cli__plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2` ].
* **xymon_cli__plug_mq_interval** : Time between each run of the `mq` plugin [default : `5m` ].
2020-02-25 17:05:33 +01:00
2020-10-29 17:52:19 +01:00
#### Net
2020-11-02 14:13:56 +01:00
Require hobbit-plugins > 20190129.
2020-10-29 17:52:19 +01:00
Variables for the Net plugin from hobbit-plugins. The plugin check network
interface states. Check the [Readme ](net plugin doc ) of the project for more
informations.
* **xymon_cli__plug_net_state** : The state of plugin `net` [default : `false` ].
* **xymon_cli__plug_net_package** : The packages to install to provide `net` plugin [default : `[ 'ethtool', 'iproute2', 'libfile-slurp-perl', 'libfile-which-perl', 'libipc-run-perl', 'libyaml-tiny-perl' ]` ].
* **xymon_cli__plug_net_path** : Configuration file for the `net` plugin [default : `/etc/xymon/clientlaunch.d/net.cfg` ].
* **xymon_cli__plug_net_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/net.cfg.j2` ].
* **xymon_cli__plug_net_interval** : Time between each run of the `net` plugin [default : `5m` ].
2020-10-30 12:41:24 +01:00
* **xymon_cli__plug_net_conf_path**: Configuration file for the `net` script (probe silently exit if not present) [default : `/etc/xymon/net.yaml` ].
* **xymon_cli__plug_net_conf_tpl**: Template used to generate the previous config file [default : `etc/xymon/net.yaml.j2` ].
You really should consider writing your own template for `net` script,
specific to your host(s) network configuration and override
**xymon_cli__plug_net_conf_tpl** variable.
2020-10-29 17:52:19 +01:00
2020-02-25 17:05:33 +01:00
#### Netstats
2020-12-22 13:13:31 +01:00
Variables for the Netstats plugin from hobbit-plugins. The plugin check
2020-02-25 17:05:33 +01:00
network interface states.
2019-05-24 09:49:54 +02:00
* **xymon_cli__plug_netstats_state** : The state of plugin `netstats` [default : `false` ].
* **xymon_cli__plug_netstats_path** : Configuration file for the `netstats` plugin [default : `/etc/xymon/clientlaunch.d/netstats.cfg` ].
* **xymon_cli__plug_netstats_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/netstats.cfg.j2` ].
* **xymon_cli__plug_netstats_interval** : Time between each run of the `netstats` plugin [default : `5m` ].
2020-02-25 17:05:33 +01:00
2020-12-22 13:13:31 +01:00
#### Ntpq
Variables for the Ntpq plugin from hobbit-plugins. The plugin check
the ntpd daemon synchronization status (needs manual ntp installation).
* **xymon_cli__plug_ntpq_state** : The state of plugin `ntpq` [default : `false` ].
* **xymon_cli__plug_ntpq_path** : Configuration file for the `ntpq` plugin [default : `/etc/xymon/clientlaunch.d/ntpq.cfg` ].
* **xymon_cli__plug_ntpq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/ntpq.cfg.j2` ].
* **xymon_cli__plug_ntpq_interval** : Time between each run of the `ntpq` plugin [default : `5m` ].
2020-06-09 13:57:50 +02:00
#### SGE
Variables for sge plugin from [ipr-cnrs.scripts][sge plugin source].
The plugin check health status for SGE queues and display informations about
SGE jobs and host.
* **xymon_cli__plug_sge_state** : The state of plugin `sge` [default : `False` ].
* **xymon_cli__plug_sge_script_path** : Path to the `sge` script [default : `'/usr/lib/xymon/client/ext/sge'` ].
* **xymon_cli__plug_sge_script_tpl** : Template used to generate the previous script [default : `'usr/lib/xymon/client/ext/sge.j2'` ].
* **xymon_cli__plug_sge_script_url** : Use a remote file to get the previous script instead of a template [default : `''` ].
* **xymon_cli__plug_sge_path** : Configuration file for the `sge` plugin [default : `'/etc/xymon/clientlaunch.d/sge.cfg'` ].
* **xymon_cli__plug_sge_tpl** : Template used to generate the previous config file [default : `'etc/xymon/clientlaunch.d/sge.cfg.j2'` ].
* **xymon_cli__plug_sge_interval** : Time between each run of the `sge` plugin [default : `'10m'` ]
2020-02-25 17:05:33 +01:00
#### Smartoverall
Variables for Smartoverall plugin from [ipr-cnrs.scripts][smartoverall plugin source].
The plugin will try to display health status of each disks (with SMART support)
but it can't check that a recent test was successfully done.
This plugin is mostly useful for disks unknown from smartmontools's database.
For more features, see the next Smart plugin.
2020-02-25 15:22:37 +01:00
* **xymon_cli__plug_smartoverall_state** : The state of plugin `smartoverall` [default : `False` ].
* **xymon_cli__plug_smartoverall_package** : The packages to install to provide `smartoverall` plugin [default : `[ 'smartmontools' ]` ].
* **xymon_cli__plug_smartoverall_script_path** : Path to the `smartoverall` script [default : `'/usr/lib/xymon/client/ext/smartoverall'` ].
* **xymon_cli__plug_smartoverall_script_tpl** : Template used to generate the previous script [default : `'usr/lib/xymon/client/ext/smartoverall.j2'` ].
2020-03-05 15:23:29 +01:00
* **xymon_cli__plug_smartoverall_script_url** : Use a remote file to get the previous script instead of a template [default : `''` ].
2020-02-25 15:22:37 +01:00
* **xymon_cli__plug_smartoverall_path** : Configuration file for the `smartoverall` plugin [default : `'/etc/xymon/clientlaunch.d/smartoverall.cfg'` ].
* **xymon_cli__plug_smartoverall_tpl** : Template used to generate the previous config file [default : `'etc/xymon/clientlaunch.d/smartoverall.cfg.j2'` ].
* **xymon_cli__plug_smartoverall_interval** : Time between each run of the `smartoverall` plugin [default : `'10m'` ]
2020-02-25 17:05:33 +01:00
#### Smart
Variables for Smart plugin from [skazi0 xymon-plugins][smart plugin source].
The plugin check health status for each disks, compare current values with the
one's recommended by the vendor and check a recent (< 24h ) test was done .
2020-02-18 14:24:31 +01:00
* **xymon_cli__plug_smart_state** : The state of plugin `smart` [default : `False` ].
* **xymon_cli__plug_smart_package** : The packages to install to provide `smart` plugin [default : `[ 'smartmontools' ]` ].
* **xymon_cli__plug_smart_script_path** : Path to the `smart` script [default : `'/usr/lib/xymon/client/ext/smart'` ].
* **xymon_cli__plug_smart_script_tpl** : Template used to generate the previous script [default : `'usr/lib/xymon/client/ext/smart.j2'` ].
2020-03-05 15:23:29 +01:00
* **xymon_cli__plug_smart_script_url** : Use a remote file to get the previous script instead of a template [default : `''` ].
2020-02-18 14:24:31 +01:00
* **xymon_cli__plug_smart_path** : Configuration file for the `smart` plugin [default : `'/etc/xymon/clientlaunch.d/smart.cfg'` ].
* **xymon_cli__plug_smart_tpl** : Template used to generate the previous config file [default : `'etc/xymon/clientlaunch.d/smart.cfg.j2'` ].
* **xymon_cli__plug_smart_interval** : Time between each run of the `smart` plugin [default : `'10m'` ]
2020-02-25 17:05:33 +01:00
2020-10-28 11:05:51 +01:00
#### Temp
2020-11-03 17:41:37 +01:00
Variables for the temp plugin from hobbit-plugins. Simple temperature monitor.
2020-10-28 11:05:51 +01:00
* **xymon_cli__plug_temp_state** : The state of plugin `temp` [default : `False` ].
2023-04-27 13:52:15 +02:00
* **xymon_cli__plug_temp_package** : The packages to install to provide `temp` plugin [default : `[ 'libfile-which-perl', 'libyaml-tiny-perl', 'smartmontools', 'libxml-twig-perl' ]` ].
2020-10-28 11:05:51 +01:00
* **xymon_cli__plug_temp_path** : Configuration file for the `temp` plugin [default : `'/etc/xymon/clientlaunch.d/temp.cfg'` ].
* **xymon_cli__plug_temp_tpl** : Template used to generate the previous config file [default : `'etc/xymon/clientlaunch.d/temp.cfg.j2'` ].
* **xymon_cli__plug_temp_interval** : Time between each run of the `temp` plugin [default : `'5m'` ]
2020-10-28 18:30:58 +01:00
##### Nvidia support
2020-11-03 17:41:37 +01:00
The temp plugin can also checks NVidia GPU temperature. In order to get those
2020-11-03 17:48:21 +01:00
informations, you need to install `nvidia-smi` package by your own or define
**xymon_cli__plug_temp_extra_package** var :
2020-10-28 18:30:58 +01:00
``` yml
2020-11-03 17:48:21 +01:00
xymon_cli__plug_temp_extra_package: [ 'nvidia-smi' ]
2020-10-28 18:30:58 +01:00
```
2020-02-25 17:05:33 +01:00
#### ZFS
Variables for ZFS plugin from [Xymonton][zfs plugin source]. The plugin check
health (global and for pools), capacity and snapshot status.
2018-06-22 16:04:32 +02:00
* **xymon_cli__plug_zfs_state** : The state of plugin `zfs` [default : `false` ].
* **xymon_cli__plug_zfs_script_path** : Path to the ZFS script [default : `/usr/lib/xymon/client/ext/zfs` ].
* **xymon_cli__plug_zfs_script_tpl** : Template used to generate the previous script [default : `usr/lib/xymon/client/ext/zfs.j2` ].
* **xymon_cli__plug_zfs_path** : Configuration file for the `zfs` plugin [default : `/etc/xymon/clientlaunch.d/zfs.cfg` ].
* **xymon_cli__plug_zfs_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/zfs.cfg.j2` ].
2019-05-24 09:16:07 +02:00
* **xymon_cli__plug_zfs_interval** : Time between each run of the `zfs` plugin [default : `5m` ].
2017-08-11 13:58:39 +02:00
2020-10-28 18:30:58 +01:00
#### Automatically enable some probes
It can be useful to automatically enable some probes according to the type of
servers :
* Enable temp probe on hardware hosts (also useful for Smartoverall and Smart):
``` yml
xymon_cli__plug_temp_state: '{{ True
if (ansible_virtualization_role == "host")
else False }}'
```
2017-08-11 13:58:39 +02:00
### OS Specific Variables
Please see default value by Operating System file in [vars][vars directory] directory.
2020-11-03 15:17:08 +01:00
* **xymon_cli__pkg_list** : The list of packages to install to provide `xymon-client` .
2020-11-03 17:41:37 +01:00
* **xymon_cli__plug_pkg_list** : The list of packages to install to provide extra plugins to Xymon client.
2017-08-11 13:58:39 +02:00
## Example Playbook
* Use defaults vars :
``` yml
- hosts: serverXYZ
roles:
- role: ipr-cnrs.xymon
```
## Configuration
This role will :
* Install needed packages to provide `xymon-client` .
2017-08-11 14:33:31 +02:00
* Manage `xymon-client` configuration and service.
2017-09-04 16:15:42 +02:00
* Add 'xymon' user to new groups.
2017-08-11 13:58:39 +02:00
2017-09-04 17:24:40 +02:00
## Plugins
Some plugins and options can be managed with this role :
2018-03-02 15:15:11 +01:00
* apt : Check state of packages and repositories.
2023-04-26 14:20:22 +02:00
* kern : Check for outdated running kernel and need for reboot.
2017-09-04 17:42:53 +02:00
* libs : Check for running processes with upgraded libraries.
2017-09-04 17:24:40 +02:00
* mq : Check mail queue.
2018-06-22 16:04:32 +02:00
* zfs : Check ZFS pools status.
2017-09-04 17:24:40 +02:00
2017-08-11 13:58:39 +02:00
## 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…
But feel free to send issue/PR here :)
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][xymon source] :)
## License
[WTFPL][wtfpl website]
## Author Information
Jérémy Gardais
* Source : [on IPR's Gogs][xymon source]
* [IPR][ipr website] (Institut de Physique de Rennes)
[vars directory]: ./vars
[gogs to github hook]: https://stackoverflow.com/a/21998477
2023-11-03 16:08:32 +01:00
[xymon source]: https://git.ipr.univ-rennes.fr/cellinfo/ansible.xymon
2017-08-11 13:58:39 +02:00
[xymon github]: https://github.com/ipr-cnrs/xymon
[wtfpl website]: http://www.wtfpl.net/about/
[ipr website]: https://ipr.univ-rennes1.fr/
2020-02-25 17:05:33 +01:00
2020-11-02 18:04:12 +01:00
[url hwraid]: https://hwraid.le-vert.net/wiki/DebianPackages
[megaraid plugin doc]: https://salsa.debian.org/debian/hobbit-plugins#megaraid-check-state-of-lsi-megaraid-sas-controllers
2020-10-29 17:52:19 +01:00
[net plugin doc]: https://salsa.debian.org/debian/hobbit-plugins#net-check-network-interface-states
2023-11-03 16:08:32 +01:00
[sge plugin source]: https://git.ipr.univ-rennes.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/sge.sh
[smartoverall plugin source]: https://git.ipr.univ-rennes.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/smartoverall
2020-02-25 17:05:33 +01:00
[smart plugin source]: https://github.com/skazi0/xymon-plugins
[zfs plugin source]: https://wiki.xymonton.org/doku.php/monitors:bb-zfs