-
Notifications
You must be signed in to change notification settings - Fork 129
added best pratices for containers monitoring CTOR-1861 #5231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lucie-tirand
wants to merge
1
commit into
staging
Choose a base branch
from
CTOR-1861-best-practices-for-containers-monitoring
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -21,8 +21,8 @@ Le connecteur apporte les modèles de service suivants | |||
|
|
||||
| | Alias | Modèle de service | Description | Découverte | | ||||
| |:-----------------|:---------------------------------------|:-------------------------------------------------------------|:----------:| | ||||
| | Container-Status | App-Docker-Container-Status-SSH-custom | Contrôle permettant de vérifier le statut des conteneurs | X | | ||||
| | Container-Usage | App-Docker-Container-Usage-SSH-custom | Contrôle permettant de vérifier l'utilisation des conteneurs | X | | ||||
| | Container-Status | App-Docker-Container-Status-SSH-custom | Contrôle permettant de vérifier le statut des conteneurs | X | | ||||
| | Container-Usage | App-Docker-Container-Usage-SSH-custom | Contrôle permettant de vérifier l'utilisation des conteneurs | X | | ||||
|
|
||||
| > Les services listés ci-dessus sont créés automatiquement lorsque le modèle d'hôte **App-Docker-SSH-custom** est utilisé. | ||||
|
|
||||
|
|
@@ -82,6 +82,31 @@ Deux méthodes de connexion SSH sont possibles : | |||
| * soit en copiant la clé SSH publique de l'utilisateur `centreon-engine` du collecteur Centreon à la ressource à superviser | ||||
| * soit en définissant votre utilisateur et votre mot de passe directement dans les macros d'hôtes. | ||||
|
|
||||
| ## 2. Docker SSH | ||||
|
|
||||
| **Page cible :** `applications-docker-ssh` | ||||
|
|
||||
| --- | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
|
|
||||
| ### Bonne pratique : nommer vos conteneurs | ||||
|
|
||||
| Par défaut, Docker génère un nom aléatoire à chaque recréation de conteneur. | ||||
| Le connecteur utilise ce nom (via l'option `--filter-name`) pour identifier les conteneurs et créer les métriques associées. | ||||
| Si ce nom change, de nouvelles métriques et un nouveau fichier RRD sont créés dans `/var/lib/centreon/metrics`, entraînant une prolifération de données obsolètes. | ||||
|
|
||||
| **Attribuez toujours un nom fixe à chaque conteneur supervisé :** | ||||
|
|
||||
| ```bash | ||||
| # Ligne de commande | ||||
| docker run -d --name mon-nginx nginx | ||||
|
|
||||
| # Docker Compose | ||||
| services: | ||||
| web: | ||||
| image: nginx | ||||
| container_name: mon-nginx | ||||
| ``` | ||||
|
|
||||
| ## Installer le connecteur de supervision | ||||
|
|
||||
| ### Pack | ||||
|
|
||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,6 +106,34 @@ Voici le tableau des services pour ce connecteur, détaillant les métriques et | |
|
|
||
| Il est essentiel d'avoir Docker, un fichier de configuration Prometheus et des volumes Docker appropriés pour utiliser Prometheus avec cAdvisor. | ||
|
|
||
| ## 3. cAdvisor API | ||
|
|
||
| **Page cible :** `cloud-cadvisor-api` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
|
||
| --- | ||
|
|
||
| ### Bonne pratique : nommer vos conteneurs | ||
|
|
||
| cAdvisor identifie chaque conteneur par son nom. | ||
| Par défaut, Docker génère un nom aléatoire à chaque recréation de conteneur, ce qui amène Centreon | ||
| à créer de nouvelles métriques et un nouveau fichier RRD dans `/var/lib/centreon/metrics` à chaque changement, | ||
| entraînant une prolifération de données obsolètes. | ||
|
|
||
| **Attribuez toujours un nom fixe à chaque conteneur supervisé :** | ||
|
|
||
| ```bash | ||
| # Ligne de commande | ||
| docker run -d --name mon-nginx nginx | ||
|
|
||
| # Docker Compose | ||
| services: | ||
| web: | ||
| image: nginx | ||
| container_name: mon-nginx | ||
| ``` | ||
|
|
||
| > Si vous utilisez Kubernetes, privilégiez des `StatefulSets` pour garantir des noms de pods stables (`mon-service-0`, `mon-service-1`, etc.), compatibles avec les filtres `--container` et `--pod` du connecteur. | ||
|
|
||
| ## Installer le connecteur de supervision | ||
|
|
||
| ### Pack | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?