diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b94c44..2ef4757 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ No backward compatibility with old variable naming! Update your configuration! * Add megaraid probe management. * Add net probe management. +* Add ntpq probe management. * Add configuration file for `net` script (/etc/xymon/net.yaml) and possibility to set your own template. Check [net documentation](net plugin doc). * Remove unecessary netstats dependencies (due to a previous misunderstanding) diff --git a/README.md b/README.md index 9ac0182..5bd58b4 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ specific to your host(s) network configuration and override #### Netstats -Variables for the Net/Netstats plugin from hobbit-plugins. The plugin check +Variables for the Netstats plugin from hobbit-plugins. The plugin check network interface states. * **xymon_cli__plug_netstats_state** : The state of plugin `netstats` [default : `false`]. @@ -132,6 +132,16 @@ network interface states. * **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`]. +#### 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`]. + #### SGE Variables for sge plugin from [ipr-cnrs.scripts][sge plugin source]. diff --git a/defaults/main.yml b/defaults/main.yml index 0e389ee..5d3b9a4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -131,6 +131,13 @@ 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 ntpq [[[ +xymon_cli__plug_ntpq_state: true +xymon_cli__plug_ntpq_path: '/etc/xymon/clientlaunch.d/ntpq.cfg' +xymon_cli__plug_ntpq_tpl: 'etc/xymon/clientlaunch.d/ntpq.cfg.j2' +xymon_cli__plug_ntpq_interval: '5m' + ## ]]] ## Plugin SGE [[[ ### From https://git.ipr.univ-rennes1.fr/cellinfo/scripts/src/master/xymon/plugins/client/ext/sge.sh @@ -234,6 +241,9 @@ xymon_cli__plug_combined_clientlaunch: - name: netstats path: '{{ xymon_cli__plug_netstats_path }}' template: '{{ xymon_cli__plug_netstats_tpl }}' + - name: ntpq + path: '{{ xymon_cli__plug_ntpq_path }}' + template: '{{ xymon_cli__plug_ntpq_tpl }}' - name: sge path: '{{ xymon_cli__plug_sge_path }}' template: '{{ xymon_cli__plug_sge_tpl }}' diff --git a/templates/etc/xymon/clientlaunch.d/ntpq.cfg.j2 b/templates/etc/xymon/clientlaunch.d/ntpq.cfg.j2 new file mode 100644 index 0000000..98fd744 --- /dev/null +++ b/templates/etc/xymon/clientlaunch.d/ntpq.cfg.j2 @@ -0,0 +1,8 @@ +[ntpq] + # {{ ansible_managed }} + ## From ipr-cnrs.xymon role + {{ '#DISABLED' if xymon_cli__plug_ntpq_state else 'DISABLED' }} + ENVFILE /etc/xymon/xymonclient.cfg + CMD $XYMONCLIENTHOME/ext/ntpq + LOGFILE /var/log/xymon/xymonclient.log + INTERVAL {{ xymon_cli__plug_ntpq_interval }}