add nagios playbook and roles
This commit is contained in:
parent
943a7b2d48
commit
3988a23ae2
|
@ -0,0 +1,11 @@
|
|||
allowed_hosts=nagios.verdnatura.es
|
||||
|
||||
command[check_disk_root]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
|
||||
command[check_disk_var]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /var
|
||||
command[check_disk_usr]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /usr
|
||||
command[check_disk_home]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /home
|
||||
command[check_disk_tmp]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /tmp
|
||||
command[check_dummy]=/usr/lib/nagios/plugins/check_dummy 0
|
||||
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 40% -c 20%
|
||||
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w 3.5,3.25,3 -c 4.5,4.25,4
|
||||
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 400 -c 500
|
|
@ -0,0 +1,5 @@
|
|||
# restart nagios-nrpe service to apply changes
|
||||
- name: restart nagios-nrpe
|
||||
service:
|
||||
name: "{{ nagios_nrpe_daemon }}"
|
||||
state: restarted
|
|
@ -0,0 +1,35 @@
|
|||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# Install and configure NAGIOS-NRPE
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# paso1
|
||||
# install packages for nagios-nrpe
|
||||
- name: install packages for nagios-nrpe (nagios-nrpe-server nagios-nrpe-plugin)
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- nagios-nrpe-server
|
||||
- nagios-nrpe-plugin
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# paso2
|
||||
# copy file 90-vn.cfg to /etc/nagios/nrpe.d/
|
||||
- name: copy file 90-vn.cfg to /etc/nagios/nrpe.d/
|
||||
copy:
|
||||
src: 90-vn.cfg
|
||||
dest: /etc/nagios/nrpe.d/90-vn.cfg
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
backup: yes
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# paso3
|
||||
# create file 99-local.cfg to /etc/nagios/nrpe.d/
|
||||
- name: create 99-local.cfg to /etc/nagios/nrpe.d/
|
||||
file:
|
||||
path: "{{ 99_local_path }}"
|
||||
state: touch
|
||||
mode: '0644'
|
||||
notify: restart nagios-nrpe
|
||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
@ -0,0 +1,3 @@
|
|||
# vars file
|
||||
99_local_path: /etc/nagios/nrpe.d/99-local.cfg
|
||||
nagios_nrpe_daemon: nagios-nrpe-server
|
Loading…
Reference in New Issue