...
 
Commits (2)
check_swap = /usr/lib/nagios/plugins/check_swap -w 20 -c 10
......@@ -73,33 +73,9 @@
state: directory
- name: Copy default nagios configuration file
copy:
src: ssh-forcecommand.default.cfg
dest: /etc/nagios/ssh-forcecommand.default.cfg
- name: Copy contact nagios file
copy:
src: ssh-forcecommand.contact.cfg
dest: /etc/nagios/ssh-forcecommand.contact.cfg
force: no
- name: Copy swap nagios configuration file
copy:
src: ssh-forcecommand.swap.cfg
dest: /etc/nagios/ssh-forcecommand.swap.cfg
when: ansible_swaptotal_mb != 0
- name: Remove swap nagios configuration file
file:
dest: /etc/nagios/ssh-forcecommand.swap.cfg
state: absent
when: ansible_swaptotal_mb == 0
- name: Concat forcecommand files
assemble:
src: /etc/nagios
template:
src: ssh-forcecommand.cfg
dest: /etc/nagios/ssh-forcecommand.cfg
regexp: '^ssh-forcecommand\..*\.cfg$'
- name: Create sudo config
copy:
......
discover-cmds = /usr/bin/awk -F= '{ print $1 }' < /etc/nagios/ssh-forcecommand.cfg
discover-distro = /usr/bin/lsb_release -i -s
fetch-config = /bin/echo '{ "contact_groups": "{{ monitoring_client_contact_group }}" }'
check_load = /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
check_disks = /usr/lib/nagios/plugins/check_disk -W 10% -K 5% -w 15% -c 10% -p / -p /var/tmp
check_zombies = /usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
......@@ -9,3 +10,11 @@ check_etckeeper = sudo /usr/local/lib/nagios/plugins/check_git_status /etc
check_lts_release = /usr/local/lib/nagios/plugins/check_lts_release
check_rkhunter = /usr/local/lib/nagios/plugins/check_rkhunter
check_mailq = /usr/lib/nagios/plugins/check_mailq -w 3 -c 5
{% if ansible_swaptotal_mb > 0 %}
check_swap = /usr/lib/nagios/plugins/check_swap -w 20 -c 10
{% endif %}
{% if 'vpnservers' in group_names %}
check_conntrack = /usr/local/lib/nagios/plugins/check_conntrack.sh 80 90
check_dhcp = sudo /usr/lib/nagios/plugins/check_dhcp -i br-ffhb -u -s 10.196.0.2 -t 5
check_tinc_running = /usr/lib/nagios/plugins/check_procs -C tincd -c 1:
{% endif %}
......@@ -193,6 +193,7 @@
- hostgroups_available/etckeeper-server.cfg
- hostgroups_available/ssh-servers.cfg
- hostgroups_available/ssh-servers-with-password.cfg
- hostgroups_available/vpn-servers.cfg
- nagios.cfg
- objects/commands/hostchecks.cfg
- objects/commands/notifications.cfg
......
define hostgroup {
hostgroup_name vpn-servers
}
define service {
use generic-service
hostgroup_name vpn-servers
service_description Gatemon
check_command check_gatemon
}
......@@ -62,3 +62,8 @@ define command {
command_name check_smtp
command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
}
define command {
command_name check_gatemon
command_line $USER2$/check_gatemons.py -u https://status.ffhb.de -s $HOSTNAME$ -i 'addresses_ipv6' -a 3600
}