Skip to content
Extraits de code Groupes Projets
Valider 65d8adc9 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[IMP] add list of webhooks to be triggered daily

parent 6dc8710c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -17,7 +17,7 @@ Variables from default directory : ...@@ -17,7 +17,7 @@ Variables from default directory :
* nagios_url: URL on which Nagios will be listening * nagios_url: URL on which Nagios will be listening
* win_srv_ip: IP address of Windows server * win_srv_ip: IP address of Windows server
* win_b2b_url: URL for B2B exchange server * win_b2b_url: URL for B2B exchange server
* docker_hub_uri: URI of DockerHub to trigger build of images daily * webhooks_to_be_called_daily: list of WebHooks to be called daily
* services_to_be_monitored: list of extra services to be monitored * services_to_be_monitored: list of extra services to be monitored
Variables used on other hosts for monitoring : Variables used on other hosts for monitoring :
......
...@@ -6,8 +6,13 @@ nagios_url: "nagios.example.org" ...@@ -6,8 +6,13 @@ nagios_url: "nagios.example.org"
win_srv_ip: 10.12.12.12 win_srv_ip: 10.12.12.12
win_b2b_url: b2b.example.org win_b2b_url: b2b.example.org
# Docker Hub URI # Webhooks to be triggered daily
docker_hub_uri: /api/build/v1/source/test/trigger/test2/call/ webhooks_to_be_called_daily:
- name: Docker Odoo
url: gitlab.example.org
uri: "/api/v4/projects/xx/ref/REF_NAME/trigger/pipeline?token=TOKEN"
# List of external services to be monitored
services_to_be_monitored: services_to_be_monitored:
- name: Webmail - name: Webmail
period: generic period: generic
......
...@@ -80,9 +80,9 @@ define command { ...@@ -80,9 +80,9 @@ define command {
command_line $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -c $ARG1$ $ARG2$ command_line $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
} }
# trigger_docker_hub # trigger_webhook
define command { define command {
command_name trigger_docker_hub command_name trigger_webhook
command_line $USER1$/check_http -H $ARG1$ -S -u $ARG2$ -j POST command_line $USER1$/check_http -H $ARG1$ -S -u $ARG2$ -j POST
} }
......
...@@ -44,13 +44,15 @@ define service{ ...@@ -44,13 +44,15 @@ define service{
check_command check_local_procs!20!2:!nagios check_command check_local_procs!20!2:!nagios
} }
{% for webhook in webhooks_to_be_called_daily %}
define service{ define service{
use daily-service use daily-service
host_name Nagios Server host_name Nagios Server
service_description Trigger Build Odoo Images service_description WebHook {{ webhook.name }}
check_command trigger_docker_hub!hub.docker.com!{{ docker_hub_uri }} check_command trigger_webhook!{{ webhook.url }}!{{ webhook.uri }}
} }
{% endfor %}
{% for service in services_to_be_monitored %} {% for service in services_to_be_monitored %}
define service{ define service{
use {{ service.period }}-service use {{ service.period }}-service
......
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