Add net probe management
This commit is contained in:
parent
37587a0853
commit
dacdd47d9f
|
@ -1,3 +1,8 @@
|
|||
## v1.X.Y
|
||||
|
||||
### Enhancements
|
||||
* Add net probe management.
|
||||
|
||||
## v1.5.1
|
||||
|
||||
### Enhancements
|
||||
|
|
13
README.md
13
README.md
|
@ -83,6 +83,18 @@ mail queue.
|
|||
* **xymon_plug_mq_tpl** : Template used to generate the previous config file [default : `etc/xymon/clientlaunch.d/mq.cfg.j2`].
|
||||
* **xymon_plug_mq_interval** : Time between each run of the `mq` plugin [default : `5m`].
|
||||
|
||||
#### Net
|
||||
|
||||
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`].
|
||||
|
||||
#### Netstats
|
||||
|
||||
Variables for the Net/Netstats plugin from hobbit-plugins. The plugin check
|
||||
|
@ -240,6 +252,7 @@ Jérémy Gardais
|
|||
[wtfpl website]: http://www.wtfpl.net/about/
|
||||
[ipr website]: https://ipr.univ-rennes1.fr/
|
||||
|
||||
[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
|
||||
[smartoverall plugin source]: https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/smartoverall
|
||||
[smart plugin source]: https://github.com/skazi0/xymon-plugins
|
||||
|
|
|
@ -105,6 +105,13 @@ xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg'
|
|||
xymon_plug_mq_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2'
|
||||
xymon_plug_mq_interval: '5m'
|
||||
## ]]]
|
||||
## Plugin net [[[
|
||||
xymon_cli__plug_net_state: false
|
||||
xymon_cli__plug_net_package: [ 'ethtool', 'iproute2', 'libfile-slurp-perl', 'libfile-which-perl', 'libipc-run-perl', 'libyaml-tiny-perl' ]
|
||||
xymon_cli__plug_net_path: '/etc/xymon/clientlaunch.d/net.cfg'
|
||||
xymon_cli__plug_net_tpl: 'etc/xymon/clientlaunch.d/net.cfg.j2'
|
||||
xymon_cli__plug_net_interval: '5m'
|
||||
## ]]]
|
||||
## Plugin netstats [[[
|
||||
xymon_cli__plug_netstats_state: false
|
||||
xymon_cli__plug_netstats_package: [ 'libfile-which-perl', 'libfile-slurp-perl', 'libipc-run-perl', 'libyaml-tiny-perl', 'iproute2', 'ethtool' ]
|
||||
|
|
|
@ -172,6 +172,31 @@
|
|||
xymon_plug_manage|bool)
|
||||
notify: restart xymon-client service
|
||||
|
||||
# Manage net plugin [[[1
|
||||
- name: PLUGIN net packages
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
state: 'present'
|
||||
with_items:
|
||||
- '{{ xymon_cli__plug_net_package | to_nice_json }}'
|
||||
register: net_plug_result
|
||||
until: net_plug_result is success
|
||||
when: (xymon_cli_manage|bool and
|
||||
xymon_plug_manage|bool and
|
||||
xymon_cli__plug_net_state|bool)
|
||||
notify: restart xymon-client service
|
||||
|
||||
- name: PLUGIN net
|
||||
template:
|
||||
src: '{{ xymon_cli__plug_net_tpl }}'
|
||||
dest: '{{ xymon_cli__plug_net_path }}'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: (xymon_cli_manage|bool and
|
||||
xymon_plug_manage|bool)
|
||||
notify: restart xymon-client service
|
||||
|
||||
# Manage netstats plugin [[[1
|
||||
- name: PLUGIN netstats packages
|
||||
package:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[net]
|
||||
# {{ ansible_managed }}
|
||||
## From ipr-cnrs.xymon role
|
||||
{{ '#DISABLED' if xymon_cli__plug_net_state else 'DISABLED' }}
|
||||
ENVFILE /etc/xymon/xymonclient.cfg
|
||||
CMD $XYMONCLIENTHOME/ext/net
|
||||
LOGFILE /var/log/xymon/xymonclient.log
|
||||
INTERVAL {{ xymon_cli__plug_net_interval }}
|
Loading…
Reference in New Issue