Store Nagios custom plugins in /etc by default
This commit is contained in:
parent
5bc88ae0f0
commit
66f5ae27c9
|
@ -5,3 +5,4 @@ nagios_nrpe_ldap_passwd: LDAP_PASSWD
|
||||||
nagios_nrpe_pgsql_passwd: PGSQL_PASSWD
|
nagios_nrpe_pgsql_passwd: PGSQL_PASSWD
|
||||||
nagios_nrpe_mysql_passwd: MYSQL_PASSWD
|
nagios_nrpe_mysql_passwd: MYSQL_PASSWD
|
||||||
nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}"
|
nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}"
|
||||||
|
nagios_plugins_directory: "/etc/nagios/plugins"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
dest: /etc/nagios/nrpe.d/evolix.cfg
|
dest: /etc/nagios/nrpe.d/evolix.cfg
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
|
|
||||||
- name: Nagios config is secured
|
- name: Nagios config is secure
|
||||||
file:
|
file:
|
||||||
dest: /etc/nagios/
|
dest: /etc/nagios/
|
||||||
mode: 0750
|
mode: 0750
|
||||||
|
@ -27,18 +27,19 @@
|
||||||
|
|
||||||
# TODO deal with /usr mounted as read-only
|
# TODO deal with /usr mounted as read-only
|
||||||
|
|
||||||
- name: Nagios plugins are installed
|
- name: Nagios plugins directory is secure
|
||||||
copy:
|
|
||||||
src: plugins/
|
|
||||||
dest: /usr/local/lib/nagios/plugins/
|
|
||||||
mode: 0755
|
|
||||||
notify: restart nagios-nrpe-server
|
|
||||||
|
|
||||||
- name: Nagios lib is secured
|
|
||||||
file:
|
file:
|
||||||
dest: /usr/local/lib/nagios/
|
dest: "{{ nagios_plugins_directory }}/"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
group: nagios
|
group: nagios
|
||||||
recurse: yes
|
recurse: yes
|
||||||
state: directory
|
state: directory
|
||||||
notify: restart nagios-nrpe-server
|
notify: restart nagios-nrpe-server
|
||||||
|
|
||||||
|
- name: Nagios plugins are installed
|
||||||
|
copy:
|
||||||
|
src: plugins/
|
||||||
|
dest: "{{ nagios_plugins_directory }}/"
|
||||||
|
group: nagios
|
||||||
|
mode: 0755
|
||||||
|
notify: restart nagios-nrpe-server
|
||||||
|
|
|
@ -47,17 +47,17 @@ command[check_ssl]=/usr/lib/nagios/plugins/check_http -f follow -I 127.0.0.1 -S
|
||||||
command[check_elasticsearch]=/usr/lib/nagios/plugins/check_http -H localhost -u /_cluster/health -p 9200 -r '"status":"red",' --invert-regex
|
command[check_elasticsearch]=/usr/lib/nagios/plugins/check_http -H localhost -u /_cluster/health -p 9200 -r '"status":"red",' --invert-regex
|
||||||
|
|
||||||
# Local checks (not packaged)
|
# Local checks (not packaged)
|
||||||
command[check_mem]=/usr/local/lib/nagios/plugins/check_mem -f -C -w 20 -c 10
|
command[check_mem]={{ nagios_plugins_directory }}/check_mem -f -C -w 20 -c 10
|
||||||
command[check_amavis]=/usr/local/lib/nagios/plugins/check_amavis --server 127.0.0.1 --from {{ nagios_nrpe_amavis_from }} --to postmaster@localhost --port 10024
|
command[check_amavis]={{ nagios_plugins_directory }}/check_amavis --server 127.0.0.1 --from {{ nagios_nrpe_amavis_from }} --to postmaster@localhost --port 10024
|
||||||
command[check_spamd]=/usr/local/lib/nagios/plugins/check_spamd -H 127.0.0.1
|
command[check_spamd]={{ nagios_plugins_directory }}/check_spamd -H 127.0.0.1
|
||||||
command[check_nfsclient]=sudo -u www-data /usr/local/lib/nagios/plugins/check_nfsclient
|
command[check_nfsclient]=sudo -u www-data {{ nagios_plugins_directory }}/check_nfsclient
|
||||||
command[check_evobackup]=/usr/local/lib/nagios/plugins/check_evobackup
|
command[check_evobackup]={{ nagios_plugins_directory }}/check_evobackup
|
||||||
command[check_process]=/usr/local/lib/nagios/plugins/check_process
|
command[check_process]={{ nagios_plugins_directory }}/check_process
|
||||||
command[check_drbd]=/usr/local/lib/nagios/plugins/check_drbd -d All -c StandAlone
|
command[check_drbd]={{ nagios_plugins_directory }}/check_drbd -d All -c StandAlone
|
||||||
command[check_mongodb_connect]=/usr/local/lib/nagios/plugins/check_mongodb -H localhost -P27017 -A connect
|
command[check_mongodb_connect]={{ nagios_plugins_directory }}/check_mongodb -H localhost -P27017 -A connect
|
||||||
command[check_glusterfs]=/usr/local/lib/nagios/plugins/check_glusterfs -v all -n 0
|
command[check_glusterfs]={{ nagios_plugins_directory }}/check_glusterfs -v all -n 0
|
||||||
command[check_supervisord_status]=/usr/local/lib/nagios/plugins/check_supervisord
|
command[check_supervisord_status]={{ nagios_plugins_directory }}/check_supervisord
|
||||||
|
|
||||||
# Check HTTP "many". Use this to check many websites (http, https, ports, sockets and SSL certificates).
|
# Check HTTP "many". Use this to check many websites (http, https, ports, sockets and SSL certificates).
|
||||||
# Beware! All checks must not take more than 10s!
|
# Beware! All checks must not take more than 10s!
|
||||||
#command[check_https]=/usr/local/lib/nagios/plugins/check_http_many
|
#command[check_https]={{ nagios_plugins_directory }}/check_http_many
|
||||||
|
|
Loading…
Reference in a new issue