Skip to content
Extraits de code Groupes Projets
Valider d8558fbe rédigé par Théo - Le Filament's avatar Théo - Le Filament
Parcourir les fichiers

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

parent 3cf06162
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -24,7 +24,7 @@ command[check_raid_{{ device }}]=/usr/lib/nagios/custom-plugins/check_mdstat.sh ...@@ -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_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 command[check_mem]=/usr/lib/nagios/custom-plugins/check_mem.pl -f -C -w 20 -c 5
{% if inventory_hostname in groups.docker | default([]) %} {% 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 %} {% else %}
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 290 -c 350 command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 290 -c 350
{% endif %} {% endif %}
...@@ -105,11 +105,12 @@ command[check_docker_cloud]=/usr/lib/nagios/custom-plugins/check_docker.sh --fil ...@@ -105,11 +105,12 @@ command[check_docker_cloud]=/usr/lib/nagios/custom-plugins/check_docker.sh --fil
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if inventory_hostname in groups.docker_odoo | default([]) %} {% if inventory_hostname in groups.docker_odoo | default([]) %}
{% if odoo_prod is defined %} {% for name, values in odoo_instances.items() %}
command[check_docker_odoo]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^odoo($|_.*)' --cpu 10:15 --memory 35:45 {% 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 %} {% 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 %} {% endfor %}
{% if restrict_internet_access and whitelisted_urls is defined %} {% 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 command[check_docker_whitelists]=/usr/lib/nagios/custom-plugins/check_docker.sh --filter '^whitelists.*' --cpu 10:10 --memory 5:7
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter