Add megaraid probe management

This commit is contained in:
Jeremy Gardais 2020-11-02 18:04:12 +01:00
parent 052d5a3b3a
commit 1c0157dd68
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
5 changed files with 61 additions and 0 deletions

View File

@ -1,6 +1,7 @@
## v1.5.2 ## v1.5.2
### Enhancements ### Enhancements
* Add megaraid probe management.
* Add net probe management. * Add net probe management.
* Add configuration file for `net` script (/etc/xymon/net.yaml) and * Add configuration file for `net` script (/etc/xymon/net.yaml) and
possibility to set your own template. Check [net documentation](net plugin doc). possibility to set your own template. Check [net documentation](net plugin doc).

View File

@ -72,6 +72,22 @@ processes with upgraded libraries.
* **xymon_plug_libs_group_whitelist**: Group whitelist of processes that should not be monitored with `libs` plugin. * **xymon_plug_libs_group_whitelist**: Group whitelist of processes that should not be monitored with `libs` plugin.
* **xymon_plug_libs_host_whitelist**: Host whitelist of processes that should not be monitored with `libs` plugin. * **xymon_plug_libs_host_whitelist**: Host whitelist of processes that should not be monitored with `libs` plugin.
#### 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`].
#### Mq #### Mq
Variables for the Mq plugin from hobbit-plugins. The plugin check Postfix's Variables for the Mq plugin from hobbit-plugins. The plugin check Postfix's
@ -259,6 +275,8 @@ Jérémy Gardais
[wtfpl website]: http://www.wtfpl.net/about/ [wtfpl website]: http://www.wtfpl.net/about/
[ipr website]: https://ipr.univ-rennes1.fr/ [ipr website]: https://ipr.univ-rennes1.fr/
[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
[net plugin doc]: https://salsa.debian.org/debian/hobbit-plugins#net-check-network-interface-states [net plugin doc]: https://salsa.debian.org/debian/hobbit-plugins#net-check-network-interface-states
[sge plugin source]: https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/sge.sh [sge plugin source]: https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/sge.sh
[smartoverall plugin source]: https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/smartoverall [smartoverall plugin source]: https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/smartoverall

View File

@ -98,6 +98,14 @@ xymon_plug_libs_group_whitelist: {}
xymon_plug_libs_host_whitelist: {} xymon_plug_libs_host_whitelist: {}
# ]]] # ]]]
## Plugin Megaraid [[[
xymon_cli__plug_megaraid_state: false
xymon_cli__plug_megaraid_package: [ 'libipc-run-perl' ]
xymon_cli__plug_megaraid_path: '/etc/xymon/clientlaunch.d/megaraid.cfg'
xymon_cli__plug_megaraid_tpl: 'etc/xymon/clientlaunch.d/megaraid.cfg.j2'
xymon_cli__plug_megaraid_interval: '5m'
#
## ]]]
## Plugin mq [[[ ## Plugin mq [[[
xymon_plug_mq_state: true xymon_plug_mq_state: true
xymon_plug_mq_package: ['libtimedate-perl'] xymon_plug_mq_package: ['libtimedate-perl']

View File

@ -147,6 +147,31 @@
xymon_plug_manage|bool) xymon_plug_manage|bool)
notify: restart xymon-client service notify: restart xymon-client service
# Manage megaraid plugin [[[1
- name: PLUGIN megaraid packages
package:
name: '{{ item }}'
state: 'present'
with_items:
- '{{ xymon_cli__plug_megaraid_package | to_nice_json }}'
register: megaraid_plug_result
until: megaraid_plug_result is success
when: (xymon_cli_manage|bool and
xymon_plug_manage|bool and
xymon_cli__plug_megaraid_state|bool)
notify: restart xymon-client service
- name: PLUGIN megaraid
template:
src: '{{ xymon_cli__plug_megaraid_tpl }}'
dest: '{{ xymon_cli__plug_megaraid_path }}'
owner: root
group: root
mode: 0644
when: (xymon_cli_manage|bool and
xymon_plug_manage|bool)
notify: restart xymon-client service
# Manage mq plugin [[[1 # Manage mq plugin [[[1
- name: PLUGIN mq packages - name: PLUGIN mq packages
package: package:

View File

@ -0,0 +1,9 @@
# Requires megaclisas-status package from https://hwraid.le-vert.net/wiki/DebianPackages
[megaraid]
# {{ ansible_managed }}
## From ipr-cnrs.xymon role
{{ '#DISABLED' if xymon_cli__plug_megaraid_state else 'DISABLED' }}
ENVFILE /etc/xymon/xymonclient.cfg
CMD /usr/bin/xynagios --test=megaraid -- sudo megaclisas-status --nagios
LOGFILE /var/log/xymon/xymonclient.log
INTERVAL 5m