Add netstats plugin managment
This commit is contained in:
parent
1838de0c27
commit
d46011763f
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
* Add variables to manage plugin interval.
|
* Add variables to manage plugin interval.
|
||||||
|
* Add netstats plugin managment.
|
||||||
|
|
||||||
## v1.3.3
|
## v1.3.3
|
||||||
|
|
||||||
|
|
15
README.md
15
README.md
|
@ -41,11 +41,6 @@ Manage Xymon (client) installation and configuration.
|
||||||
* **xymon_cli__plug_ipmi_path** : Configuration file for the `ipmi` plugin [default : `/etc/xymon/clientlaunch.d/ipmi.cfg`].
|
* **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_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`].
|
* **xymon_cli__plug_ipmi_interval** : Time between each run of the `ipmi` plugin [default : `5m`].
|
||||||
* **xymon_plug_mq_state** : The state of plugin `mq` [default : `true`].
|
|
||||||
* **xymon_plug_mq_package** : The packages to install to provide `mq` plugin [default : `[ 'libtimedate-perl' ]`].
|
|
||||||
* **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_interval** : Time between each run of the `mq` plugin [default : `5m`].
|
|
||||||
* **xymon_plug_libs_state** : The state of plugin `libs` [default : `true`].
|
* **xymon_plug_libs_state** : The state of plugin `libs` [default : `true`].
|
||||||
* **xymon_plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl' ]`].
|
* **xymon_plug_libs_package** : The packages to install to provide `libs` plugin [default : `[ 'binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl' ]`].
|
||||||
* **xymon_plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`].
|
* **xymon_plug_libs_path** : Configuration file for the `libs` plugin [default : `/etc/xymon/clientlaunch.d/libs.cfg`].
|
||||||
|
@ -55,6 +50,16 @@ Manage Xymon (client) installation and configuration.
|
||||||
* **xymon_plug_libs_whitelist** : All hosts whitelist of processes that should not be monitored with `libs` plugin.
|
* **xymon_plug_libs_whitelist** : All hosts 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_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.
|
||||||
|
* **xymon_plug_mq_state** : The state of plugin `mq` [default : `true`].
|
||||||
|
* **xymon_plug_mq_package** : The packages to install to provide `mq` plugin [default : `[ 'libtimedate-perl' ]`].
|
||||||
|
* **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_interval** : Time between each run of the `mq` plugin [default : `5m`].
|
||||||
|
* **xymon_cli__plug_netstats_state** : The state of plugin `netstats` [default : `false`].
|
||||||
|
* **xymon_cli__plug_netstats_state** : The packages to install to provide `netstats` plugin [default : `[ 'libfile-which-perl', 'libfile-slurp-perl', 'libipc-run-perl', 'libyaml-tiny-perl', 'iproute2', 'ethtool' ]`].
|
||||||
|
* **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`].
|
||||||
* **xymon_cli__plug_zfs_state** : The state of plugin `zfs` [default : `false`].
|
* **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_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_script_tpl** : Template used to generate the previous script [default : `usr/lib/xymon/client/ext/zfs.j2`].
|
||||||
|
|
|
@ -99,6 +99,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_tpl: 'etc/xymon/clientlaunch.d/mq.cfg.j2'
|
||||||
xymon_plug_mq_interval: '5m'
|
xymon_plug_mq_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' ]
|
||||||
|
xymon_cli__plug_netstats_path: '/etc/xymon/clientlaunch.d/netstats.cfg'
|
||||||
|
xymon_cli__plug_netstats_tpl: 'etc/xymon/clientlaunch.d/netstats.cfg.j2'
|
||||||
|
xymon_cli__plug_netstats_interval: '5m'
|
||||||
|
## ]]]
|
||||||
## Plugin zfs [[[
|
## Plugin zfs [[[
|
||||||
xymon_cli__plug_zfs_state: false
|
xymon_cli__plug_zfs_state: false
|
||||||
xymon_cli__plug_zfs_script_path: '/usr/lib/xymon/client/ext/zfs'
|
xymon_cli__plug_zfs_script_path: '/usr/lib/xymon/client/ext/zfs'
|
||||||
|
|
|
@ -85,30 +85,6 @@
|
||||||
xymon_plug_manage|bool)
|
xymon_plug_manage|bool)
|
||||||
notify: restart xymon-client service
|
notify: restart xymon-client service
|
||||||
|
|
||||||
# Manage mq plugin [[[1
|
|
||||||
- name: PLUGIN mq packages
|
|
||||||
package:
|
|
||||||
name: '{{ item }}'
|
|
||||||
state: '{{ "present" if xymon_plug_mq_state else "absent" }}'
|
|
||||||
with_items:
|
|
||||||
- '{{ xymon_plug_mq_package | to_nice_json }}'
|
|
||||||
register: mq_plug_result
|
|
||||||
until: mq_plug_result is success
|
|
||||||
when: (xymon_cli_manage|bool and
|
|
||||||
xymon_plug_manage|bool)
|
|
||||||
notify: restart xymon-client service
|
|
||||||
|
|
||||||
- name: PLUGIN mq
|
|
||||||
template:
|
|
||||||
src: '{{ xymon_plug_mq_tpl }}'
|
|
||||||
dest: '{{ xymon_plug_mq_path }}'
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
when: (xymon_cli_manage|bool and
|
|
||||||
xymon_plug_manage|bool)
|
|
||||||
notify: restart xymon-client service
|
|
||||||
|
|
||||||
# Manage ipmi plugin [[[1
|
# Manage ipmi plugin [[[1
|
||||||
- name: PLUGIN ipmi packages
|
- name: PLUGIN ipmi packages
|
||||||
package:
|
package:
|
||||||
|
@ -168,6 +144,55 @@
|
||||||
xymon_plug_manage|bool)
|
xymon_plug_manage|bool)
|
||||||
notify: restart xymon-client service
|
notify: restart xymon-client service
|
||||||
|
|
||||||
|
# Manage mq plugin [[[1
|
||||||
|
- name: PLUGIN mq packages
|
||||||
|
package:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: '{{ "present" if xymon_plug_mq_state else "absent" }}'
|
||||||
|
with_items:
|
||||||
|
- '{{ xymon_plug_mq_package | to_nice_json }}'
|
||||||
|
register: mq_plug_result
|
||||||
|
until: mq_plug_result is success
|
||||||
|
when: (xymon_cli_manage|bool and
|
||||||
|
xymon_plug_manage|bool)
|
||||||
|
notify: restart xymon-client service
|
||||||
|
|
||||||
|
- name: PLUGIN mq
|
||||||
|
template:
|
||||||
|
src: '{{ xymon_plug_mq_tpl }}'
|
||||||
|
dest: '{{ xymon_plug_mq_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:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: 'present'
|
||||||
|
with_items:
|
||||||
|
- '{{ xymon_cli__plug_netstats_package | to_nice_json }}'
|
||||||
|
register: netstats_plug_result
|
||||||
|
until: netstats_plug_result is success
|
||||||
|
when: (xymon_cli_manage|bool and
|
||||||
|
xymon_plug_manage|bool and
|
||||||
|
xymon_cli__plug_netstats_state|bool)
|
||||||
|
notify: restart xymon-client service
|
||||||
|
|
||||||
|
- name: PLUGIN netstats config
|
||||||
|
template:
|
||||||
|
src: '{{ xymon_cli__plug_netstats_tpl }}'
|
||||||
|
dest: '{{ xymon_cli__plug_netstats_path }}'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: (xymon_cli_manage|bool and
|
||||||
|
xymon_plug_manage|bool)
|
||||||
|
notify: restart xymon-client service
|
||||||
|
|
||||||
# Manage zfs plugin [[[1
|
# Manage zfs plugin [[[1
|
||||||
- name: PLUGIN zfs config file
|
- name: PLUGIN zfs config file
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[netstats]
|
||||||
|
{{ '#DISABLED' if xymon_cli__plug_netstats_state else 'DISABLED' }}
|
||||||
|
ENVFILE /etc/xymon/xymonclient.cfg
|
||||||
|
CMD $XYMONCLIENTHOME/ext/netstats
|
||||||
|
LOGFILE /var/log/xymon/xymonclient.log
|
||||||
|
INTERVAL {{ xymon_cli__plug_netstats_interval }}
|
Loading…
Reference in New Issue