Templatify check_log_age_host

This commit is contained in:
nemunaire 2023-05-09 23:03:10 +02:00
parent 34f5103fac
commit 41450f6cdc
1 changed files with 4 additions and 16 deletions

View File

@ -306,22 +306,10 @@ command[check_ntp_time]=/usr/lib/nagios/plugins/check_ntp_time -H fr.pool.ntp.or
{% else %}
command[check_ntp_time]=/usr/lib/nagios/plugins/check_ntp_time -H {{ ntp_pool[0] }} -w 1 -c 2
{% endif %}
{% if inventory_hostname == 'geb.ra.nemunai.re' %}
command[check_log_age_ankh.serekh.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/ankh.serekh.nemunai.re/messages.log
command[check_log_age_geb.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/geb.ra.nemunai.re/messages.log
command[check_log_age_hathor.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/hathor.ra.nemunai.re/messages.log
command[check_log_age_montou.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/montou.ra.nemunai.re/messages.log
command[check_log_age_nout.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/nout.ra.nemunai.re/messages.log
command[check_log_age_sekhmet0.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet0.ra.nemunai.re/messages.log
command[check_log_age_sekhmet1.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet1.ra.nemunai.re/messages.log
command[check_log_age_sekhmet2.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet2.ra.nemunai.re/messages.log
command[check_log_age_sekhmet3.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet3.ra.nemunai.re/messages.log
command[check_log_age_sekhmet4.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet4.ra.nemunai.re/messages.log
command[check_log_age_sekhmet5.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet5.ra.nemunai.re/messages.log
command[check_log_age_sekhmet6.ra.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/sekhmet6.ra.nemunai.re/messages.log
command[check_log_age_ouaset.masr.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/ouaset.masr.nemunai.re/messages.log
command[check_log_age_rhakotis.masr.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/rhakotis.masr.nemunai.re/messages.log
command[check_log_age_jizah.masr.nemunai.re]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/jizah.masr.nemunai.re/messages.log
{% if inventory_hostname in groups['logger-hosts'] %}
{% for host in groups['all'] %}
command[check_log_age_{{ host }}]=/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -W 32 -C 32 /var/log/{{ host }}/messages.log
{% endfor %}
{% endif %}
# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for