7.2.6.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.6.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.6.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
{
  "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 %}
{% if vitam_struct.https_enabled==true %}
    "port": {{ vitam_struct.port_service }},
{% else %}
    "port": {{ vitam_struct.port_service }},
{% endif %}
    "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": "1s"
      },
      {
        "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": "1s"
      }
{% 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": "1s"
      }
{% 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 %}
    ]
  }
}