Skip to content
Snippets Groups Projects
Commit d8558fbe authored by Théo - Le Filament's avatar Théo - Le Filament
Browse files

change(check_docker_odoo): follow update One dict to rule them all

parent 3cf06162
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ command[check_raid_{{ device }}]=/usr/lib/nagios/custom-plugins/check_mdstat.sh
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w .85,.80,.75 -c .99,.95,.90
command[check_mem]=/usr/lib/nagios/custom-plugins/check_mem.pl -f -C -w 20 -c 5
{% if inventory_hostname in groups.docker | default([]) %}
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w {{ ((group_names | length - 7) * 20 + 370) | int | abs }} -c {{ ((group_names | length - 7) * 20 + 410) | int | abs }}
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w {{ ((group_names | length - 6) * 20 + 370) | int | abs }} -c {{ ((group_names | length - 6) * 20 + 410) | int | abs }}
{% else %}
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 290 -c 350
{% endif %}
......@@ -105,11 +105,12 @@ command[check_docker_cloud]=/usr/lib/nagios/custom-plugins/check_docker.sh --fil
{% endif %}
{% endif %}
{% if inventory_hostname in groups.docker_odoo | default([]) %}
{% if odoo_prod is defined %}
command[check_docker_odoo]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^odoo($|_.*)' --cpu 10:15 --memory 35:45
{% for name, values in odoo_instances.items() %}
{% if values.is_prod is defined and values.is_prod %}
command[check_docker_odoo]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^{{ name }}($|_.*)' --cpu 10:15 --memory 35:45
{% else %}
command[check_docker_odoo]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^{{ name }}($|_.*)' --cpu 10:15 --memory 20:25
{% endif %}
{% for instance in odoo_nonprod_instances | default([]) %}
command[check_docker_{{ instance.name }}]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^{{ instance.dir }}.*' --cpu 10:15 --memory 20:25
{% endfor %}
{% if restrict_internet_access and whitelisted_urls is defined %}
command[check_docker_whitelists]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^whitelists.*' --cpu 10:10 --memory 5:7
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment