2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Ensure that the isti local nagios plugins directory exists
|
2019-02-17 13:49:13 +01:00
|
|
|
file: dest={{ nagios_local_plugdir }} owner=root group=root state=directory
|
2015-05-28 11:32:57 +02:00
|
|
|
tags:
|
|
|
|
- nrpe
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Install the postgresql backup nagios check
|
2019-02-17 13:49:13 +01:00
|
|
|
copy: src=check_postgresql_backup dest={{ nagios_local_plugdir }}/check_postgresql_backup owner=root group=root mode=0555
|
2015-05-28 11:32:57 +02:00
|
|
|
tags:
|
|
|
|
- nrpe
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Install the packages needed to check postgres via nagios
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present
|
2015-05-28 11:32:57 +02:00
|
|
|
with_items:
|
|
|
|
- check-postgres
|
|
|
|
tags:
|
|
|
|
- nrpe
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Install the sudoers file needed by some nagios checks
|
|
|
|
template: src=postgresql-sudoers.j2 dest=/etc/sudoers.d/postgresql owner=root group=root mode=440
|
|
|
|
tags:
|
|
|
|
- nrpe
|
|
|
|
- nagios
|
|
|
|
|
|
|
|
- name: Install the nrpe configuration for check_postgres
|
|
|
|
template: src=postgresql-nrpe.cfg.j2 dest=/etc/nagios/nrpe.d/postgresql-nrpe.cfg owner=root group=root mode=444
|
|
|
|
notify:
|
|
|
|
- Reload NRPE server
|
|
|
|
tags:
|
|
|
|
- nrpe
|
|
|
|
- nagios
|
|
|
|
|