Commit 4d30cdb1 authored by Paschalis Korosoglou's avatar Paschalis Korosoglou
Browse files

Adds nagios nrpe integration as role

parent 02f82c59
---
nrpe_conf_path: /etc/nrpe.d
\ No newline at end of file
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5%
\ No newline at end of file
---
- name: Install nagios needed nrpe packages
tags: monitoring
yum: name={{ item }} state=latest
with_items:
- nrpe
- nagios-plugins
- nagios-plugins-disk
- name: Copy nrpe configuration file on host
tags: monitoring
copy: src=ar-dev-api.cfg
dest={{ nrpe_conf_path }}/ar-dev-api.cfg backup=yes
owner=root group=root mode=0644
notify: restart nrpe
- name: Modify nrpe configuration itself
tags: monitoring
lineinfile: dest=/etc/nagios/nrpe.cfg
regexp="^allowed_hosts="
line="allowed_hosts={{ nrpe_allowed_hosts }}"
state=present
backup=yes
notify: restart nrpe
- name: Start and enable nrpe service
tags: monitoring
service: name=nrpe state=started enabled=yes
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment