Change a variable that was specific to our environment, and set a default.
This commit is contained in:
parent
7fbcd92023
commit
6303c7c270
|
@ -4,10 +4,11 @@ monitoring_group_name: 'change_this_on_your_playbook'
|
|||
|
||||
nagios_plugdir: /usr/lib/nagios/plugins
|
||||
nagios_plugins_dir: '{{ nagios_plugdir }}'
|
||||
nagios_local_plugdir: '{{ nagios_plugins_dir }}/local'
|
||||
nagios_centos_plugins_dir: /usr/lib64/nagios/plugins
|
||||
nagios_common_lib: check_library.sh
|
||||
# Needed inside nrpe.cfg
|
||||
# It is already defined in isti-global.yml
|
||||
#
|
||||
#nagios_monitoring_server_ip:
|
||||
nagios_hw: False
|
||||
nagios_check_disk_w: 10
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
tags: [ 'dell', 'nagios' ]
|
||||
|
||||
- name: Install some standalone plugins
|
||||
copy: src={{ item }} dest={{ nagios_isti_plugdir }}/{{ item }} owner=root group=nagios mode=0750
|
||||
copy: src={{ item }} dest={{ nagios_local_plugdir }}/{{ item }} owner=root group=nagios mode=0750
|
||||
with_items: '{{ nagios_dell_standalone_checks }}'
|
||||
tags: [ 'dell', 'nagios' ]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
# We do not use the check_linux_raid plugin anymore. Now the check_raid one is much better.
|
||||
- name: Install some plugins that check hardware parts
|
||||
copy: src={{ item }} dest={{ nagios_isti_plugdir }}/{{ item }} owner=root group=nagios mode=0750
|
||||
copy: src={{ item }} dest={{ nagios_local_plugdir }}/{{ item }} owner=root group=nagios mode=0750
|
||||
with_items:
|
||||
- check_smart
|
||||
tags:
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
tags: [ 'nagios', 'nagios_plug_contrib' ]
|
||||
|
||||
- name: Create the directory where our local plugins are installed
|
||||
file: path={{ nagios_isti_plugdir }} state=directory
|
||||
file: path={{ nagios_local_plugdir }} state=directory
|
||||
tags: nagios
|
||||
|
||||
- name: Install the generic shell library used by some custom checks
|
||||
template: src=check_library.sh.j2 dest={{ nagios_isti_plugdir }}/check_library.sh owner=root group=root mode=0644
|
||||
template: src=check_library.sh.j2 dest={{ nagios_local_plugdir }}/check_library.sh owner=root group=root mode=0644
|
||||
tags: nagios
|
||||
|
||||
- name: Install plugins that can be useful on all the installed servers
|
||||
copy: src={{ item }} dest={{ nagios_isti_plugdir }}/{{ item }} owner=root group=nagios mode=0755
|
||||
copy: src={{ item }} dest={{ nagios_local_plugdir }}/{{ item }} owner=root group=nagios mode=0755
|
||||
with_items:
|
||||
- check_system_pp
|
||||
- show_users
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
- name: Ensure that the isti local nagios plugins directory exists
|
||||
file: dest={{ nagios_isti_plugdir }} owner=root group=root state=directory
|
||||
file: dest={{ nagios_local_plugdir }} owner=root group=root state=directory
|
||||
tags:
|
||||
- nrpe
|
||||
- nagios
|
||||
|
||||
- name: Install the postgresql backup nagios check
|
||||
copy: src=check_postgresql_backup dest={{ nagios_isti_plugdir }}/check_postgresql_backup owner=root group=root mode=0555
|
||||
copy: src=check_postgresql_backup dest={{ nagios_local_plugdir }}/check_postgresql_backup owner=root group=root mode=0555
|
||||
tags:
|
||||
- nrpe
|
||||
- nagios
|
||||
|
|
|
@ -4,7 +4,7 @@ export NAGIOS_WARNING=1
|
|||
export NAGIOS_CRITICAL=2
|
||||
export NAGIOS_UNKNOWN=3
|
||||
|
||||
ISTI_PLUGDIR={{ nagios_isti_plugdir }}
|
||||
ISTI_PLUGDIR={{ nagios_local_plugdir }}
|
||||
COMMON_LIB={{ nagios_common_lib }}
|
||||
|
||||
if [ -d {{ nagios_plugins_dir }} ] ; then
|
||||
|
|
|
@ -21,16 +21,16 @@ command[global_check_munin]={{ nagios_plugins_dir }}/check_procs -w 1:1 -c 1:1 -
|
|||
|
||||
# Show number and username of the logged users
|
||||
{% if nagios_multiple_allowed_users %}
|
||||
command[global_show_users]={{ nagios_isti_plugdir }}/show_users -a {% if nagios_multiple_users_allow_root %}root,{% endif %}{% for u in users_system_users %}{{ u.login }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||
command[global_show_users]={{ nagios_local_plugdir }}/show_users -a {% if nagios_multiple_users_allow_root %}root,{% endif %}{% for u in users_system_users %}{{ u.login }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||
{% else %}
|
||||
command[global_show_users]={{ nagios_isti_plugdir }}/show_users -a {{ nagios_allowed_users }}
|
||||
command[global_show_users]={{ nagios_local_plugdir }}/show_users -a {{ nagios_allowed_users }}
|
||||
{% endif %}
|
||||
|
||||
# Generic script that monitors the existance of a given processes list
|
||||
command[global_check_system_pp]={{ nagios_isti_plugdir }}/check_system_pp
|
||||
command[global_check_system_pp]={{ nagios_local_plugdir }}/check_system_pp
|
||||
|
||||
# Linux RAID check
|
||||
#command[global_check_linux_raid]={{ nagios_isti_plugdir }}/check_linux_raid
|
||||
#command[global_check_linux_raid]={{ nagios_local_plugdir }}/check_linux_raid
|
||||
{% if nagios_soft_raid_mdstat is defined and nagios_soft_raid_mdstat %}
|
||||
command[global_check_linux_raid]={{ nagios_plugins_dir }}/check_raid -p mdstat
|
||||
{% else %}
|
||||
|
@ -38,11 +38,11 @@ command[global_check_linux_raid]={{ nagios_plugins_dir }}/check_raid
|
|||
{% endif %}
|
||||
|
||||
# Disks S.M.A.R.T. check
|
||||
command[global_check_smart]={{ nagios_isti_plugdir }}/check_smart -d $ARG1$ -i $ARG2$
|
||||
command[global_check_smart]={{ nagios_local_plugdir }}/check_smart -d $ARG1$ -i $ARG2$
|
||||
|
||||
# Network interfaces
|
||||
#command[global_net_interfaces]={{ nagios_isti_plugdir }}/check_netint.pl -K -f -e
|
||||
command[global_net_interfaces]={{ nagios_isti_plugdir }}/check_netint.pl -K -f -e -D -S -n \(l\|eth\|p\|bond\)
|
||||
#command[global_net_interfaces]={{ nagios_local_plugdir }}/check_netint.pl -K -f -e
|
||||
command[global_net_interfaces]={{ nagios_local_plugdir }}/check_netint.pl -K -f -e -D -S -n \(l\|eth\|p\|bond\)
|
||||
|
||||
# Restart ntp (via handler)
|
||||
command[global_restart_ntp]=/usr/bin/sudo /etc/init.d/ntp start
|
||||
|
|
|
@ -1 +1 @@
|
|||
nagios ALL=(ALL) NOPASSWD: {{ nagios_plugins_dir }}/, {{ nagios_isti_plugdir }}/, {{ nagios_centos_plugins_dir }}/, /etc/init.d/, /usr/sbin/service, /sbin/service
|
||||
nagios ALL=(ALL) NOPASSWD: {{ nagios_plugins_dir }}/, {{ nagios_local_plugdir }}/, {{ nagios_centos_plugins_dir }}/, /etc/init.d/, /usr/sbin/service, /sbin/service
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Check the status of the postgresql local dumps
|
||||
command[{{ monitoring_group_name }}_check_postgresql_backup]={{ nagios_isti_plugdir }}/check_postgresql_backup
|
||||
command[{{ monitoring_group_name }}_check_postgresql_backup]={{ nagios_local_plugdir }}/check_postgresql_backup
|
||||
|
||||
command[{{ monitoring_group_name }}_check_postgresql_connection]=/usr/bin/sudo -u postgres /usr/bin/check_postgres_connection -db template1
|
||||
|
||||
|
|
Loading…
Reference in New Issue