Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
docker_nagios
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Ansible Roles
docker_nagios
Validations
65d8adc9
Valider
65d8adc9
rédigé
Il y a 3 ans
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[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
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
README.md
+1
-1
1 ajout, 1 suppression
README.md
defaults/main.yml
+7
-2
7 ajouts, 2 suppressions
defaults/main.yml
templates/commands.cfg.j2
+2
-2
2 ajouts, 2 suppressions
templates/commands.cfg.j2
templates/localhost.cfg.j2
+4
-2
4 ajouts, 2 suppressions
templates/localhost.cfg.j2
avec
14 ajouts
et
7 suppressions
README.md
+
1
−
1
Voir le fichier @
65d8adc9
...
@@ -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 :
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
defaults/main.yml
+
7
−
2
Voir le fichier @
65d8adc9
...
@@ -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
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
templates/commands.cfg.j2
+
2
−
2
Voir le fichier @
65d8adc9
...
@@ -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
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
templates/localhost.cfg.j2
+
4
−
2
Voir le fichier @
65d8adc9
...
@@ -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
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter