added the ipmi monitoring to xymon

iBug 2360 - monitorer ipmi dans xymon pour les machines non virtuelles qui le supportent

- from now on, xymon role can enable/disable ipmi monitoring
This commit is contained in:
Guillaume Raffy 2018-07-13 12:45:20 +02:00
parent c497486325
commit a430015cce
3 changed files with 34 additions and 0 deletions

View File

@ -60,6 +60,12 @@ xymon_plug_mq_package: ['libtimedate-perl']
xymon_plug_mq_path: '/etc/xymon/clientlaunch.d/mq.cfg' 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'
## ]]] ## ]]]
## Plugin ipmi [[[
xymon_cli__plug_ipmi_state: false
xymon_cli__plug_ipmi_package: ['ipmitool']
xymon_cli__plug_ipmi_path: '/etc/xymon/clientlaunch.d/ipmi.cfg'
xymon_cli__plug_ipmi_tpl: 'etc/xymon/clientlaunch.d/ipmi.cfg.j2'
## ]]]
## Plugin libs [[[ ## Plugin libs [[[
xymon_plug_libs_state: true xymon_plug_libs_state: true
xymon_plug_libs_package: ['binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl'] xymon_plug_libs_package: ['binutils', 'lsof', 'libyaml-tiny-perl', 'libsort-naturally-perl']

View File

@ -92,6 +92,28 @@
xymon_plug_manage|bool) xymon_plug_manage|bool)
notify: restart xymon-client service notify: restart xymon-client service
# Manage ipmi plugin [[[1
- name: PLUGIN ipmi packages
package:
name: '{{ item }}'
state: '{{ "present" if xymon_cli__plug_ipmi_state else "absent" }}'
with_items:
- '{{ xymon_cli__plug_ipmi_package }}'
when: (xymon_cli_manage|bool and
xymon_plug_manage|bool)
notify: restart xymon-client service
- name: PLUGIN ipmi
template:
src: '{{ xymon_cli__plug_ipmi_tpl }}'
dest: '{{ xymon_cli__plug_ipmi_path }}'
owner: root
group: root
mode: 0644
when: (xymon_cli_manage|bool and
xymon_plug_manage|bool)
notify: restart xymon-client service
# Manage libs plugin [[[1 # Manage libs plugin [[[1
- name: PLUGIN libs packages - name: PLUGIN libs packages
package: package:

View File

@ -0,0 +1,6 @@
[ipmi]
{{ '#DISABLED' if xymon_cli__plug_ipmi_state else 'DISABLED' }}
ENVFILE /etc/xymon/xymonclient.cfg
CMD /usr/bin/sudo -E -u root $XYMONCLIENTHOME/ext/ipmi
LOGFILE /var/log/xymon/xymonclient.log
INTERVAL 5m