diff --git a/CHANGELOG.md b/CHANGELOG.md index 72f79ab..99e6e9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.X.Y + +### Enhancements +* Add temp probe configuration. + ## v1.5.0 ### Enhancements diff --git a/README.md b/README.md index 0929b6a..e56db2a 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,16 @@ one's recommended by the vendor and check a recent (<24h) test was done. * **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'`] +#### Temp + +Variables for the Mq plugin from hobbit-plugins. Simple temperature monitor. + +* **xymon_cli__plug_temp_state** : The state of plugin `temp` [default : `False`]. +* **xymon_cli__plug_temp_package** : The packages to install to provide `temp` plugin [default : `[ 'libfile-which-perl', 'libyaml-tiny-perl', 'hddtemp', 'smartmontools', 'libxml-twig-perl' ]`]. +* **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'`] + #### ZFS Variables for ZFS plugin from [Xymonton][zfs plugin source]. The plugin check diff --git a/defaults/main.yml b/defaults/main.yml index 4bf05e5..648aded 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -148,6 +148,15 @@ xymon_cli__plug_smart_path: '/etc/xymon/clientlaunch.d/smart.cfg' xymon_cli__plug_smart_tpl: 'etc/xymon/clientlaunch.d/smart.cfg.j2' xymon_cli__plug_smart_interval: '10m' + # ]]] +## Plugin temp [[[ +### Enable by default on hardware host +xymon_cli__plug_temp_state: False +xymon_cli__plug_temp_package: [ 'libfile-which-perl', 'libyaml-tiny-perl', 'hddtemp', 'smartmontools', 'libxml-twig-perl' ] +xymon_cli__plug_temp_path: '/etc/xymon/clientlaunch.d/temp.cfg' +xymon_cli__plug_temp_tpl: 'etc/xymon/clientlaunch.d/temp.cfg.j2' +xymon_cli__plug_temp_interval: '5m' + # ]]] ## Plugin zfs [[[ xymon_cli__plug_zfs_state: false diff --git a/tasks/main.yml b/tasks/main.yml index 3319be4..b9bec2a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -331,6 +331,31 @@ xymon_cli__plug_smart_script_url|length > 0 ) notify: restart xymon-client service +# Manage temp plugin [[[1 +- name: PLUGIN temp packages + package: + name: '{{ item }}' + state: 'present' + with_items: + - '{{ xymon_cli__plug_temp_package | to_nice_json }}' + register: temp_plug_result + until: temp_plug_result is success + when: (xymon_cli_manage|bool and + xymon_plug_manage|bool and + xymon_cli__plug_temp_state|bool) + notify: restart xymon-client service + +- name: PLUGIN temp + template: + src: '{{ xymon_cli__plug_temp_tpl }}' + dest: '{{ xymon_cli__plug_temp_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 - name: PLUGIN zfs config file template: diff --git a/templates/etc/xymon/clientlaunch.d/temp.cfg.j2 b/templates/etc/xymon/clientlaunch.d/temp.cfg.j2 new file mode 100644 index 0000000..d4a3e55 --- /dev/null +++ b/templates/etc/xymon/clientlaunch.d/temp.cfg.j2 @@ -0,0 +1,8 @@ +[temp] + # {{ ansible_managed }} + ## From ipr-cnrs.xymon role + {{ '#DISABLED' if xymon_cli__plug_temp_state else 'DISABLED' }} + ENVFILE /etc/xymon/xymonclient.cfg + CMD $XYMONCLIENTHOME/ext/temp + LOGFILE /var/log/xymon/xymonclient.log + INTERVAL {{ xymon_cli__plug_temp_interval }}