7.2.2.2. Configuration / fichiers utiles¶
Les fichiers de configuration sont gérés par les procédures d’installation ou de mise à niveau de l’environnement VITAM. Se référer au DIN.
7.2.2.2.1. Cas des applicatifs monitorés par Consul¶
Pour chaque composant VITAM nécessitant une supervision de la part de Consul, un fichier est installé sur l’agent de la machine sous vitam/conf/consul
et est basé sur ce squelette :
7.2.2.2.1.1. Fichier /vitam/conf/consul/service-<composant>.json
¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | {
"service": {
{% if vitam_struct.vitam_component == vitam.storageofferdefault.vitam_component %}
"name": "{{ offer_conf }}",
{% else %}
"name": "{{ vitam_struct.vitam_component }}",
{% endif %}
"address": "{{ ip_service }}",
{% if ip_wan is defined %}
"advertise_addr_wan": "{{ ip_wan }}",
{% endif %}
"port": {{ vitam_struct.port_service }},
"enable_tag_override": false,
"tags": ["vitam","{{ vitam_struct.vitam_component }}"],
"checks": [
{
"name": "{{ vitam_struct.vitam_component }}: business service check",
{% if vitam_struct.https_enabled==true %}
"notes": "HTTPS port opened",
"tcp": "{{ ip_service }}:{{ vitam_struct.port_service }}",
{% else %}
"notes": "HTTP port opened",
"tcp": "{{ ip_service }}:{{ vitam_struct.port_service }}",
{% endif %}
"interval": "{{ vitam_struct.consul_check_business }}s"
},
{
"name": "{{ vitam_struct.vitam_component }} : admin service check",
"notes": "Status admin : /admin/v1/status",
"http": "http://{{ ip_admin }}:{{ vitam_struct.port_admin }}/admin/v1/status",
"interval": "{{ vitam_struct.consul_admin_check }}s"
}
{% if (vitam_struct.https_enabled != true) and (vitam_struct.vitam_component != vitam.elastickibanainterceptor.vitam_component) and (vitam_struct.vitam_component != vitam.security_internal.vitam_component) and (vitam_struct.vitam_component != vitam.ihm_demo.vitam_component) and (vitam_struct.vitam_component != vitam.ihm_recette.vitam_component) and (vitam_struct.vitam_component != vitam.library.vitam_component) %}
,{
"name": "{{ vitam_struct.vitam_component }} : http business service check",
"notes": "Status business : /{{ vitam_struct.baseuri }}/v1/status",
"http": "http://{{ ip_service }}:{{ vitam_struct.port_service }}/{{ vitam_struct.baseuri }}/v1/status",
"interval": "{{ vitam_struct.consul_admin_check }}s"
}
{% endif %}
{% if (vitam_struct.vitam_component == vitam.security_internal.vitam_component) %}
,{
"name": "{{ vitam_struct.vitam_component }} : http business service check",
"notes": "Status business : /status",
"http": "http://{{ ip_service }}:{{ vitam_struct.port_service }}/status",
"interval": "{{ vitam_struct.consul_check_business }}s"
}
{% endif %}
{% if (vitam_struct.vitam_component == vitam.worker.vitam_component) or (vitam_struct.vitam_component == vitam.ingestexternal.vitam_component) %}
,{
"name": "Siegfried check",
"notes": "Is siegfried running ?",
"tcp": "localhost:{{ siegfried.port }}",
"interval": "{{ siegfried.consul_check }}s"
}
{% endif %}
{% if vitam_struct.antivirus is defined %}
,{
"name": "Antivirus check",
"notes": "Is {{ vitam_struct.antivirus }} running ?",
"args": ["{{ vitam_folder_conf }}/scan-{{ vitam_struct.antivirus}}.sh","{{ vitam_folder_conf }}/scan-{{ vitam_struct.antivirus}}.sh"],
"interval": "30s",
"timeout": "5s"
}
{% endif %}
]
}
}
|