Page d'accueil, mentions legales, licence, guide de contribution, catalogue porte a 39 packs
This commit is contained in:
1 parent
6c602c97ad
commit
469305b4a7
33 files changed
+1329
-258
No files matched your search
@@ -33,6 +33,12 @@ ENCLUME_ADMIN_GROUPE=enclume-admins
|
||||
# Depannage du premier demarrage, avant le mapping de portee "groups" :
|
||||
ENCLUME_ADMIN_COMPTES=
|
||||
|
||||
# Mentions legales, affichees sur /mentions
|
||||
ENCLUME_EDITEUR=Prenom Nom, particulier
|
||||
ENCLUME_CONTACT=[email protected]
|
||||
ENCLUME_HEBERGEUR=Auto-heberge, France
|
||||
ENCLUME_DEPOT=https://gitea.tips-of-mine.com/Tips-Of-Mine/Enclume
|
||||
|
||||
# Publication des packs acceptes, sous forme de demandes de fusion
|
||||
ENCLUME_GITEA_URL=https://gitea.tips-of-mine.com
|
||||
ENCLUME_GITEA_TOKEN=
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
# Journal des versions
|
||||
|
||||
Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/).
|
||||
Versionnement sémantique, comme décrit dans [docs/CONVENTIONS.md](docs/CONVENTIONS.md).
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Ajouté
|
||||
- Page d'accueil publique, distincte de l'éditeur désormais servi sur `/editeur`
|
||||
- Mentions légales et politique de confidentialité sur `/mentions`
|
||||
- Licence MIT, guide de contribution, journal des versions
|
||||
- Catalogue porté de 26 à 39 packs et de 124 à 177 sondes : pfSense, Stormshield, Palo Alto,
|
||||
MikroTik, Ubiquiti, HP ProCurve, onduleurs RFC 1628, Proxmox VE, Redis, MongoDB,
|
||||
Elasticsearch, RabbitMQ, LDAP
|
||||
|
||||
## 1.2.0
|
||||
|
||||
### Ajouté
|
||||
- Route `/health`, convention du web pour un point de santé ; `/sante` reste servi
|
||||
- Fenêtre de soumission documentée : règles attendues et modèle de pack commenté
|
||||
|
||||
### Modifié
|
||||
- Lien de modération et barre d'outils plus lisibles
|
||||
|
||||
## 1.1.8
|
||||
|
||||
### Ajouté
|
||||
- `/health` publie l'URI de redirection OIDC, pour la comparer à celle déclarée
|
||||
- Normalisation de `ENCLUME_URL_PUBLIQUE` : barre finale, protocole absent
|
||||
|
||||
## 1.1.7
|
||||
|
||||
### Corrigé
|
||||
- Alembic construit son moteur directement : un mot de passe encodé contient des `%`,
|
||||
que le fichier ini prenait pour des interpolations
|
||||
|
||||
## 1.1.6
|
||||
|
||||
### Corrigé
|
||||
- Les en-têtes transmis par le proxy sont honorés, sans quoi l'URI de redirection OIDC
|
||||
était construite en `http://localhost`
|
||||
|
||||
## 1.1.5
|
||||
|
||||
### Corrigé
|
||||
- Rendu des modèles de service : une propriété en lecture seule interrompait l'affichage
|
||||
|
||||
### Ajouté
|
||||
- Test d'interface dans un DOM headless, exécuté par la CI
|
||||
|
||||
## 1.1.4
|
||||
|
||||
### Corrigé
|
||||
- Alembic et le point d'entrée lisent la configuration de l'application, plus l'environnement
|
||||
|
||||
## 1.1.3
|
||||
|
||||
### Modifié
|
||||
- Construction arm64 réservée aux versions, cache de couches dans Harbor
|
||||
- Analyse statique `ruff` dans la CI
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Corrigé
|
||||
- URL de base assemblée à partir d'éléments séparés : un mot de passe contenant `@`
|
||||
disloquait l'URL de connexion
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Corrigé
|
||||
- `requests` déclaré explicitement, Authlib l'importe sans le déclarer
|
||||
|
||||
## 1.1.0
|
||||
|
||||
### Ajouté
|
||||
- Partage par lien, projets enregistrés, connexion optionnelle via OIDC
|
||||
- Soumission de packs et modération, publication en demande de fusion Gitea
|
||||
- Prérequis d'installation des sondes, générés dans un fichier distinct du CLAPI
|
||||
|
||||
### Corrigé
|
||||
- Lien cassé vers le script de l'éditeur, qui rendait l'interface muette
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Ajouté
|
||||
- Éditeur libre : commandes, modèles de service, modèles d'hôte, hôtes
|
||||
- Catalogue de packs, génération CLAPI, scripts de déploiement et de retour arrière
|
||||
- Empaquetage Docker, CI Gitea, synchronisation du catalogue depuis Git
|
||||
@@ -0,0 +1,87 @@
|
||||
# Contribuer à Enclume
|
||||
|
||||
Deux formes de contribution, très différentes par leur difficulté.
|
||||
|
||||
## Proposer un pack — le plus utile
|
||||
|
||||
Un pack décrit une technologie : un modèle d'hôte et ses sondes. C'est ce qui fait la valeur
|
||||
d'Enclume, et c'est accessible à quiconque supervise cette technologie au quotidien.
|
||||
|
||||
**Depuis le site**, bouton « Proposer un pack » : collez votre YAML, il est vérifié
|
||||
immédiatement, et une demande de fusion est ouverte après relecture.
|
||||
|
||||
**Par pull request**, si vous préférez : un fichier dans `catalog/<catégorie>/<id>.yml`.
|
||||
|
||||
### Le format
|
||||
|
||||
```yaml
|
||||
id: app-rabbitmq # minuscules, chiffres et tirets
|
||||
name: RabbitMQ # nom lisible, affiché dans le catalogue
|
||||
category: application # system | hardware | application
|
||||
status: to-verify # verified seulement si éprouvé sur un central réel
|
||||
plugin: centreon_rabbitmq_restapi.pl
|
||||
description: Supervision d'un broker RabbitMQ via son API de management.
|
||||
|
||||
host_template:
|
||||
name: App-RabbitMQ-custom # <Famille>-<Techno>-custom
|
||||
alias: Applicatif RabbitMQ
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: RABBITPORT, value: "15672", description: "Port de l'API"}
|
||||
- {name: RABBITPASSWORD, value: "", description: "Mot de passe", is_password: true}
|
||||
|
||||
prerequis: # facultatif mais précieux
|
||||
paquets:
|
||||
debian: [libwww-perl]
|
||||
rhel: [perl-libwww-perl]
|
||||
notes: |
|
||||
Activer le plugin de management et créer un compte en lecture seule.
|
||||
|
||||
services:
|
||||
- name: Queues # donnera le modèle App-RabbitMQ-Queues
|
||||
alias: Queues
|
||||
description: Messages en attente dans les files
|
||||
default: true # false pour une sonde décochée par défaut
|
||||
line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=… --mode=queues …"
|
||||
macros:
|
||||
- {name: WARNING, value: "1000", description: "Seuil warning"}
|
||||
```
|
||||
|
||||
### Les règles
|
||||
|
||||
- **Pas de point-virgule** dans une ligne de commande : c'est le séparateur CLAPI, il casserait
|
||||
le fichier d'import.
|
||||
- **Les seuils en macros** `$_SERVICEXXX$`, jamais en dur. C'est tout l'intérêt d'un modèle.
|
||||
- **Ce qui est commun à l'hôte va sur l'hôte** : ports, comptes, options du plugin. Ce qui est
|
||||
propre à une sonde va sur la sonde : seuils, filtres.
|
||||
- **Aucun mot de passe réel.** Valeur vide et `is_password: true`.
|
||||
- **`status: verified`** uniquement si vous avez exécuté ces commandes sur un Centreon. Sinon
|
||||
`to-verify`, c'est honnête et c'est utile.
|
||||
- `$CENTREONPLUGINS$` est remplacé par le répertoire de plugins choisi par l'utilisateur.
|
||||
|
||||
### Le plus précieux
|
||||
|
||||
Vérifier un pack existant marqué `to-verify` vaut autant qu'en écrire un nouveau. Un
|
||||
`--list-mode` sur le plugin concerné, une exécution réelle, et le passage en `verified` :
|
||||
c'est ce qui rend le catalogue fiable.
|
||||
|
||||
## Contribuer au code
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv && . .venv/bin/activate
|
||||
pip install -r requirements.txt pytest ruff
|
||||
python -m pytest -q
|
||||
sh tests/interface.sh
|
||||
```
|
||||
|
||||
Avant toute proposition, la revue décrite dans [docs/CONVENTIONS.md](docs/CONVENTIONS.md) :
|
||||
`ruff check`, la suite de tests, le test d'interface. Les conventions de nommage y sont aussi.
|
||||
|
||||
Une règle traverse tout le projet : **le serveur n'exécute jamais rien**. Ni CLAPI, ni
|
||||
prérequis, ni contribution. Il écrit des fichiers que l'utilisateur relit avant de les jouer.
|
||||
Toute proposition qui s'en écarte sera refusée, quel que soit son intérêt.
|
||||
|
||||
## Signaler un problème
|
||||
|
||||
Un pack dont le CLAPI généré ne passe pas sur votre central est un signalement de première
|
||||
importance : indiquez la version de Centreon, le pack, et le message d'erreur de `centreon`.
|
||||
+1
-1
@@ -52,6 +52,6 @@ USER enclume
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/sante', timeout=4).status==200 else 1)"
|
||||
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=4).status==200 else 1)"
|
||||
|
||||
CMD ["/usr/local/bin/entrypoint-web"]
|
||||
@@ -1,235 +1,21 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
Template-Docker
|
||||
Copyright (C) 2024 Tips-Of-Mine
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Hubert Cornet
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -10,7 +10,7 @@ Projet indépendant, sans lien avec Centreon SAS.
|
||||
|
||||
- **Éditeur libre** : commandes, modèles de service, modèles d'hôte, hôtes. Héritage,
|
||||
duplication, rattachement des services aux modèles d'hôte.
|
||||
- **Catalogue de départ** : 26 packs, environ 124 sondes, importables puis modifiables.
|
||||
- **Catalogue de départ** : 39 packs, 177 sondes, importables puis modifiables.
|
||||
- **Validation** avant génération : noms en double, références manquantes, point-virgule
|
||||
interdit, services rattachés à aucun modèle d'hôte, mots de passe en clair.
|
||||
- **Quatre fichiers** : `deploy.sh` (avec `--dry-run`), `deploy.clapi` (import CLAPI),
|
||||
@@ -81,7 +81,10 @@ python3 -m enclume.cli --projet mon-projet.json --out ./sortie
|
||||
| `GET POST DELETE /api/projets` | projets enregistrés (connexion requise) |
|
||||
| `POST /api/soumissions/verifier` `POST /api/soumissions` | contribution d'un pack |
|
||||
| `/api/moderation/...` | file de modération (groupe d'administration) |
|
||||
| `GET /sante` | version, commit, état du catalogue |
|
||||
| `GET /health` (alias `/sante`) | version, commit, état du catalogue, fonctions actives |
|
||||
| `GET /` | page d'accueil publique |
|
||||
| `GET /editeur` | l'éditeur |
|
||||
| `GET /mentions` | mentions légales et données personnelles |
|
||||
| `POST /recharger` | relecture du catalogue (appelé par `catalog-sync`) |
|
||||
|
||||
## Ajouter un pack au catalogue
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
id: app-elasticsearch
|
||||
name: Elasticsearch
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_elasticsearch_restapi.pl
|
||||
description: Supervision d'un cluster Elasticsearch via son API REST (sante du cluster, noeuds, index).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libwww-perl, libjson-xs-perl]
|
||||
rhel: [perl-libwww-perl, perl-JSON-XS]
|
||||
notes: |
|
||||
Un compte disposant du role monitoring suffit si la securite est activee.
|
||||
host_template:
|
||||
name: App-Elasticsearch-custom
|
||||
alias: Applicatif Elasticsearch
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: ESPORT, value: "9200", description: "Port de l'API"}
|
||||
- {name: ESPROTO, value: "http", description: "Protocole d'acces"}
|
||||
- {name: ESUSERNAME, value: "", description: "Compte de supervision"}
|
||||
- {name: ESPASSWORD, value: "", description: "Mot de passe du compte", is_password: true}
|
||||
- {name: ESEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cluster-Status
|
||||
alias: Cluster-Status
|
||||
description: Sante globale du cluster
|
||||
line: "$CENTREONPLUGINS$/centreon_elasticsearch_restapi.pl --plugin=apps::elasticsearch::restapi::plugin --mode=cluster-status --hostname=$HOSTADDRESS$ --port='$_HOSTESPORT$' --proto='$_HOSTESPROTO$' --api-username='$_HOSTESUSERNAME$' --api-password='$_HOSTESPASSWORD$' $_HOSTESEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Node-Statistics
|
||||
alias: Node-Statistics
|
||||
description: Consommation des noeuds du cluster
|
||||
line: "$CENTREONPLUGINS$/centreon_elasticsearch_restapi.pl --plugin=apps::elasticsearch::restapi::plugin --mode=node-statistics --hostname=$HOSTADDRESS$ --port='$_HOSTESPORT$' --proto='$_HOSTESPROTO$' --api-username='$_HOSTESUSERNAME$' --api-password='$_HOSTESPASSWORD$' $_HOSTESEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Indices-Statistics
|
||||
alias: Indices-Statistics
|
||||
description: Taille et nombre de documents des index
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_elasticsearch_restapi.pl --plugin=apps::elasticsearch::restapi::plugin --mode=indices-statistics --hostname=$HOSTADDRESS$ --port='$_HOSTESPORT$' --proto='$_HOSTESPROTO$' --api-username='$_HOSTESUSERNAME$' --api-password='$_HOSTESPASSWORD$' --filter-name='$_SERVICEFILTERNAME$' $_HOSTESEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: FILTERNAME, value: "", description: "Filtre sur le nom de l'index"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,44 @@
|
||||
id: app-ldap
|
||||
name: Annuaire LDAP
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_ldap.pl
|
||||
description: Supervision d'un annuaire LDAP ou Active Directory (temps de reponse d'une recherche, disponibilite).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libnet-ldap-perl]
|
||||
rhel: [perl-LDAP]
|
||||
notes: |
|
||||
Un compte de lecture seule suffit. Preferer une recherche portant sur une base
|
||||
restreinte plutot que sur la racine de l'annuaire.
|
||||
host_template:
|
||||
name: App-LDAP-custom
|
||||
alias: Applicatif LDAP
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: LDAPPORT, value: "389", description: "Port d'ecoute"}
|
||||
- {name: LDAPBINDDN, value: "", description: "Compte de connexion (DN complet)"}
|
||||
- {name: LDAPBINDPASSWORD, value: "", description: "Mot de passe du compte", is_password: true}
|
||||
- {name: LDAPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Search
|
||||
alias: Search
|
||||
description: Temps de reponse d'une recherche
|
||||
line: "$CENTREONPLUGINS$/centreon_ldap.pl --plugin=apps::protocols::ldap::plugin --mode=search --hostname=$HOSTADDRESS$ --port='$_HOSTLDAPPORT$' --bind-dn='$_HOSTLDAPBINDDN$' --bind-password='$_HOSTLDAPBINDPASSWORD$' --search-base='$_SERVICESEARCHBASE$' --search-filter='$_SERVICESEARCHFILTER$' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' $_HOSTLDAPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: SEARCHBASE, value: "", description: "Base de recherche, ex. dc=exemple,dc=fr"}
|
||||
- {name: SEARCHFILTER, value: "(objectClass=*)", description: "Filtre de recherche"}
|
||||
- {name: WARNING, value: "1", description: "Temps de reponse warning (s)"}
|
||||
- {name: CRITICAL, value: "3", description: "Temps de reponse critical (s)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Search-Count
|
||||
alias: Search-Count
|
||||
description: Nombre d'entrees retournees par une recherche
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_ldap.pl --plugin=apps::protocols::ldap::plugin --mode=search --hostname=$HOSTADDRESS$ --port='$_HOSTLDAPPORT$' --bind-dn='$_HOSTLDAPBINDDN$' --bind-password='$_HOSTLDAPBINDPASSWORD$' --search-base='$_SERVICESEARCHBASE$' --search-filter='$_SERVICESEARCHFILTER$' --warning-entries='$_SERVICEWARNING$' --critical-entries='$_SERVICECRITICAL$' $_HOSTLDAPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: SEARCHBASE, value: "", description: "Base de recherche"}
|
||||
- {name: SEARCHFILTER, value: "(objectClass=*)", description: "Filtre de recherche"}
|
||||
- {name: WARNING, value: "", description: "Seuil warning sur le nombre d'entrees"}
|
||||
- {name: CRITICAL, value: "1:", description: "Seuil critical sur le nombre d'entrees"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,52 @@
|
||||
id: app-mongodb
|
||||
name: MongoDB
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_mongodb.pl
|
||||
description: Supervision d'une instance MongoDB (connexion, operations, taille des bases, replication).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libmongodb-perl]
|
||||
rhel: [perl-MongoDB]
|
||||
notes: |
|
||||
Compte de supervision avec le role clusterMonitor :
|
||||
db.createUser({user: "centreon", pwd: "...", roles: [{role: "clusterMonitor", db: "admin"}]})
|
||||
host_template:
|
||||
name: App-MongoDB-custom
|
||||
alias: Applicatif MongoDB
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: MONGOPORT, value: "27017", description: "Port d'ecoute"}
|
||||
- {name: MONGOUSERNAME, value: "centreon", description: "Compte de supervision"}
|
||||
- {name: MONGOPASSWORD, value: "", description: "Mot de passe du compte", is_password: true}
|
||||
- {name: MONGOEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Connection-Time
|
||||
alias: Connection-Time
|
||||
description: Temps d'etablissement de la connexion
|
||||
line: "$CENTREONPLUGINS$/centreon_mongodb.pl --plugin=database::mongodb::plugin --mode=connection-time --hostname=$HOSTADDRESS$ --port='$_HOSTMONGOPORT$' --username='$_HOSTMONGOUSERNAME$' --password='$_HOSTMONGOPASSWORD$' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' $_HOSTMONGOEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "1000", description: "Seuil warning en ms"}
|
||||
- {name: CRITICAL, value: "5000", description: "Seuil critical en ms"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Databases-Size
|
||||
alias: Databases-Size
|
||||
description: Taille des bases de donnees
|
||||
line: "$CENTREONPLUGINS$/centreon_mongodb.pl --plugin=database::mongodb::plugin --mode=databases-size --hostname=$HOSTADDRESS$ --port='$_HOSTMONGOPORT$' --username='$_HOSTMONGOUSERNAME$' --password='$_HOSTMONGOPASSWORD$' $_HOSTMONGOEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Operations
|
||||
alias: Operations
|
||||
description: Operations par seconde
|
||||
line: "$CENTREONPLUGINS$/centreon_mongodb.pl --plugin=database::mongodb::plugin --mode=operations --hostname=$HOSTADDRESS$ --port='$_HOSTMONGOPORT$' --username='$_HOSTMONGOUSERNAME$' --password='$_HOSTMONGOPASSWORD$' $_HOSTMONGOEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Replication-Lag
|
||||
alias: Replication-Lag
|
||||
description: Retard de replication du jeu de replicas
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_mongodb.pl --plugin=database::mongodb::plugin --mode=replication-lag --hostname=$HOSTADDRESS$ --port='$_HOSTMONGOPORT$' --username='$_HOSTMONGOUSERNAME$' --password='$_HOSTMONGOPASSWORD$' --warning='$_SERVICEWARNING$' --critical='$_SERVICECRITICAL$' $_HOSTMONGOEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "60", description: "Retard warning en secondes"}
|
||||
- {name: CRITICAL, value: "300", description: "Retard critical en secondes"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,53 @@
|
||||
id: app-proxmox
|
||||
name: Proxmox VE (API REST)
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_proxmox_ve_api.pl
|
||||
description: Supervision d'un cluster Proxmox VE via son API REST (noeuds, machines virtuelles, stockage, quorum).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libwww-perl, libjson-xs-perl]
|
||||
rhel: [perl-libwww-perl, perl-JSON-XS]
|
||||
notes: |
|
||||
Creer un utilisateur de supervision dans Proxmox avec le role PVEAuditor :
|
||||
pveum user add centreon@pve --password '...'
|
||||
pveum acl modify / --users centreon@pve --roles PVEAuditor
|
||||
host_template:
|
||||
name: App-Proxmox-custom
|
||||
alias: Applicatif Proxmox VE
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: PVEPORT, value: "8006", description: "Port de l'API"}
|
||||
- {name: PVEUSERNAME, value: "centreon@pve", description: "Compte de supervision"}
|
||||
- {name: PVEPASSWORD, value: "", description: "Mot de passe du compte", is_password: true}
|
||||
- {name: PVEEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cluster-Status
|
||||
alias: Cluster-Status
|
||||
description: Quorum et etat general du cluster
|
||||
line: "$CENTREONPLUGINS$/centreon_proxmox_ve_api.pl --plugin=apps::proxmox::ve::restapi::plugin --mode=cluster-status --hostname=$HOSTADDRESS$ --port='$_HOSTPVEPORT$' --api-username='$_HOSTPVEUSERNAME$' --api-password='$_HOSTPVEPASSWORD$' $_HOSTPVEEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Node-Usage
|
||||
alias: Node-Usage
|
||||
description: Consommation CPU, memoire et disque des noeuds
|
||||
line: "$CENTREONPLUGINS$/centreon_proxmox_ve_api.pl --plugin=apps::proxmox::ve::restapi::plugin --mode=node-usage --hostname=$HOSTADDRESS$ --port='$_HOSTPVEPORT$' --api-username='$_HOSTPVEUSERNAME$' --api-password='$_HOSTPVEPASSWORD$' --warning-cpu='$_SERVICEWARNINGCPU$' --critical-cpu='$_SERVICECRITICALCPU$' $_HOSTPVEEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNINGCPU, value: "80", description: "Seuil warning CPU en %"}
|
||||
- {name: CRITICALCPU, value: "90", description: "Seuil critical CPU en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Vm-Usage
|
||||
alias: Vm-Usage
|
||||
description: Etat et consommation des machines virtuelles
|
||||
line: "$CENTREONPLUGINS$/centreon_proxmox_ve_api.pl --plugin=apps::proxmox::ve::restapi::plugin --mode=vm-usage --hostname=$HOSTADDRESS$ --port='$_HOSTPVEPORT$' --api-username='$_HOSTPVEUSERNAME$' --api-password='$_HOSTPVEPASSWORD$' --filter-name='$_SERVICEFILTERNAME$' $_HOSTPVEEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: FILTERNAME, value: "", description: "Filtre sur le nom de la machine"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Storage-Usage
|
||||
alias: Storage-Usage
|
||||
description: Occupation des espaces de stockage
|
||||
line: "$CENTREONPLUGINS$/centreon_proxmox_ve_api.pl --plugin=apps::proxmox::ve::restapi::plugin --mode=storage-usage --hostname=$HOSTADDRESS$ --port='$_HOSTPVEPORT$' --api-username='$_HOSTPVEUSERNAME$' --api-password='$_HOSTPVEPASSWORD$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTPVEEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,46 @@
|
||||
id: app-rabbitmq
|
||||
name: RabbitMQ
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_rabbitmq_restapi.pl
|
||||
description: Supervision d'un broker RabbitMQ via son API de management (files, noeuds, connexions).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libwww-perl, libjson-xs-perl]
|
||||
rhel: [perl-libwww-perl, perl-JSON-XS]
|
||||
notes: |
|
||||
Activer le plugin de management, puis creer un compte avec le tag monitoring :
|
||||
rabbitmqctl add_user centreon '...'
|
||||
rabbitmqctl set_user_tags centreon monitoring
|
||||
host_template:
|
||||
name: App-RabbitMQ-custom
|
||||
alias: Applicatif RabbitMQ
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: RABBITPORT, value: "15672", description: "Port de l'API de management"}
|
||||
- {name: RABBITUSERNAME, value: "centreon", description: "Compte de supervision"}
|
||||
- {name: RABBITPASSWORD, value: "", description: "Mot de passe du compte", is_password: true}
|
||||
- {name: RABBITEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Node-Usage
|
||||
alias: Node-Usage
|
||||
description: Etat et consommation des noeuds
|
||||
line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=apps::rabbitmq::restapi::plugin --mode=node-usage --hostname=$HOSTADDRESS$ --port='$_HOSTRABBITPORT$' --api-username='$_HOSTRABBITUSERNAME$' --api-password='$_HOSTRABBITPASSWORD$' $_HOSTRABBITEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Queue-Usage
|
||||
alias: Queue-Usage
|
||||
description: Messages en attente dans les files
|
||||
line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=apps::rabbitmq::restapi::plugin --mode=queue-usage --hostname=$HOSTADDRESS$ --port='$_HOSTRABBITPORT$' --api-username='$_HOSTRABBITUSERNAME$' --api-password='$_HOSTRABBITPASSWORD$' --filter-name='$_SERVICEFILTERNAME$' --warning-messages-ready='$_SERVICEWARNING$' --critical-messages-ready='$_SERVICECRITICAL$' $_HOSTRABBITEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: FILTERNAME, value: "", description: "Filtre sur le nom de la file"}
|
||||
- {name: WARNING, value: "1000", description: "Seuil warning sur les messages en attente"}
|
||||
- {name: CRITICAL, value: "5000", description: "Seuil critical sur les messages en attente"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Connections
|
||||
alias: Connections
|
||||
description: Connexions et canaux ouverts
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=apps::rabbitmq::restapi::plugin --mode=connections --hostname=$HOSTADDRESS$ --port='$_HOSTRABBITPORT$' --api-username='$_HOSTRABBITUSERNAME$' --api-password='$_HOSTRABBITPASSWORD$' $_HOSTRABBITEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,51 @@
|
||||
id: app-redis
|
||||
name: Redis
|
||||
category: application
|
||||
status: to-verify
|
||||
plugin: centreon_redis_cli.pl
|
||||
description: Supervision d'une instance Redis (clients, memoire, persistance, replication).
|
||||
prerequis:
|
||||
paquets:
|
||||
debian: [libredis-perl]
|
||||
rhel: [perl-Redis]
|
||||
notes: |
|
||||
Un compte en lecture seule suffit. Avec Redis 6 et superieur, creer un utilisateur ACL
|
||||
limite a la commande INFO plutot que d'utiliser le mot de passe principal.
|
||||
host_template:
|
||||
name: App-Redis-custom
|
||||
alias: Applicatif Redis
|
||||
parents: [generic-active-host-custom]
|
||||
macros:
|
||||
- {name: REDISPORT, value: "6379", description: "Port d'ecoute"}
|
||||
- {name: REDISPASSWORD, value: "", description: "Mot de passe", is_password: true}
|
||||
- {name: REDISEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Clients
|
||||
alias: Clients
|
||||
description: Nombre de clients connectes
|
||||
line: "$CENTREONPLUGINS$/centreon_redis_cli.pl --plugin=apps::redis::cli::plugin --mode=clients --server=$HOSTADDRESS$ --port='$_HOSTREDISPORT$' --password='$_HOSTREDISPASSWORD$' --warning-connected='$_SERVICEWARNING$' --critical-connected='$_SERVICECRITICAL$' $_HOSTREDISEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning"}
|
||||
- {name: CRITICAL, value: "", description: "Seuil critical"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Memoire utilisee et fragmentation
|
||||
line: "$CENTREONPLUGINS$/centreon_redis_cli.pl --plugin=apps::redis::cli::plugin --mode=memory --server=$HOSTADDRESS$ --port='$_HOSTREDISPORT$' --password='$_HOSTREDISPASSWORD$' --warning-memory-used='$_SERVICEWARNING$' --critical-memory-used='$_SERVICECRITICAL$' $_HOSTREDISEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning en octets"}
|
||||
- {name: CRITICAL, value: "", description: "Seuil critical en octets"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Persistence
|
||||
alias: Persistence
|
||||
description: Etat des sauvegardes RDB et AOF
|
||||
line: "$CENTREONPLUGINS$/centreon_redis_cli.pl --plugin=apps::redis::cli::plugin --mode=persistence --server=$HOSTADDRESS$ --port='$_HOSTREDISPORT$' --password='$_HOSTREDISPASSWORD$' $_HOSTREDISEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Replication
|
||||
alias: Replication
|
||||
description: Etat de la replication
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_redis_cli.pl --plugin=apps::redis::cli::plugin --mode=replication --server=$HOSTADDRESS$ --port='$_HOSTREDISPORT$' --password='$_HOSTREDISPASSWORD$' $_HOSTREDISEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,56 @@
|
||||
id: hw-hp-procurve-snmp
|
||||
name: Switch HP ProCurve et Aruba (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_hp_procurve_snmp.pl
|
||||
description: Supervision d'un commutateur HP ProCurve ou Aruba en SNMP.
|
||||
host_template:
|
||||
name: HW-HP-Procurve-SNMP-custom
|
||||
alias: Materiel HP ProCurve SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU de l'equipement
|
||||
line: "$CENTREONPLUGINS$/centreon_hp_procurve_snmp.pl --plugin=network::hp::procurve::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_hp_procurve_snmp.pl --plugin=network::hp::procurve::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Hardware
|
||||
alias: Hardware
|
||||
description: Etat des composants materiels
|
||||
line: "$CENTREONPLUGINS$/centreon_hp_procurve_snmp.pl --plugin=network::hp::procurve::snmp::plugin --mode=hardware --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --component='$_SERVICECOMPONENT$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: COMPONENT, value: ".*", description: "Composants a verifier (regex)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_hp_procurve_snmp.pl --plugin=network::hp::procurve::snmp::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic --warning-in-traffic='$_SERVICEWARNINGIN$' --critical-in-traffic='$_SERVICECRITICALIN$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: WARNINGIN, value: "80", description: "Seuil warning trafic entrant (%)"}
|
||||
- {name: CRITICALIN, value: "90", description: "Seuil critical trafic entrant (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
- name: Uptime
|
||||
alias: Uptime
|
||||
description: Duree depuis le dernier redemarrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_hp_procurve_snmp.pl --plugin=network::hp::procurve::snmp::plugin --mode=uptime --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-uptime='$_SERVICEWARNING$' --critical-uptime='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning (secondes)"}
|
||||
- {name: CRITICAL, value: "@0:600", description: "Seuil critical (secondes)"}
|
||||
- {name: EXTRAOPTIONS, value: "--unit=s", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,56 @@
|
||||
id: hw-mikrotik-snmp
|
||||
name: MikroTik RouterOS (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_mikrotik_snmp.pl
|
||||
description: Supervision d'un equipement MikroTik sous RouterOS en SNMP.
|
||||
host_template:
|
||||
name: HW-MikroTik-SNMP-custom
|
||||
alias: Materiel MikroTik SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU de l'equipement
|
||||
line: "$CENTREONPLUGINS$/centreon_mikrotik_snmp.pl --plugin=network::mikrotik::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_mikrotik_snmp.pl --plugin=network::mikrotik::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Hardware
|
||||
alias: Hardware
|
||||
description: Etat des composants materiels
|
||||
line: "$CENTREONPLUGINS$/centreon_mikrotik_snmp.pl --plugin=network::mikrotik::snmp::plugin --mode=hardware --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --component='$_SERVICECOMPONENT$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: COMPONENT, value: ".*", description: "Composants a verifier (regex)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_mikrotik_snmp.pl --plugin=network::mikrotik::snmp::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic --warning-in-traffic='$_SERVICEWARNINGIN$' --critical-in-traffic='$_SERVICECRITICALIN$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: WARNINGIN, value: "80", description: "Seuil warning trafic entrant (%)"}
|
||||
- {name: CRITICALIN, value: "90", description: "Seuil critical trafic entrant (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
- name: Uptime
|
||||
alias: Uptime
|
||||
description: Duree depuis le dernier redemarrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_mikrotik_snmp.pl --plugin=network::mikrotik::snmp::plugin --mode=uptime --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-uptime='$_SERVICEWARNING$' --critical-uptime='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning (secondes)"}
|
||||
- {name: CRITICAL, value: "@0:600", description: "Seuil critical (secondes)"}
|
||||
- {name: EXTRAOPTIONS, value: "--unit=s", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,56 @@
|
||||
id: hw-paloalto-snmp
|
||||
name: Pare-feu Palo Alto (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_paloalto_snmp.pl
|
||||
description: Supervision d'un pare-feu Palo Alto en SNMP.
|
||||
host_template:
|
||||
name: HW-PaloAlto-SNMP-custom
|
||||
alias: Materiel Palo Alto SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU de l'equipement
|
||||
line: "$CENTREONPLUGINS$/centreon_paloalto_snmp.pl --plugin=network::paloalto::standard::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_paloalto_snmp.pl --plugin=network::paloalto::standard::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Hardware
|
||||
alias: Hardware
|
||||
description: Etat des composants materiels
|
||||
line: "$CENTREONPLUGINS$/centreon_paloalto_snmp.pl --plugin=network::paloalto::standard::snmp::plugin --mode=hardware --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --component='$_SERVICECOMPONENT$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: COMPONENT, value: ".*", description: "Composants a verifier (regex)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_paloalto_snmp.pl --plugin=network::paloalto::standard::snmp::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic --warning-in-traffic='$_SERVICEWARNINGIN$' --critical-in-traffic='$_SERVICECRITICALIN$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: WARNINGIN, value: "80", description: "Seuil warning trafic entrant (%)"}
|
||||
- {name: CRITICALIN, value: "90", description: "Seuil critical trafic entrant (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
- name: Uptime
|
||||
alias: Uptime
|
||||
description: Duree depuis le dernier redemarrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_paloalto_snmp.pl --plugin=network::paloalto::standard::snmp::plugin --mode=uptime --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-uptime='$_SERVICEWARNING$' --critical-uptime='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning (secondes)"}
|
||||
- {name: CRITICAL, value: "@0:600", description: "Seuil critical (secondes)"}
|
||||
- {name: EXTRAOPTIONS, value: "--unit=s", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,49 @@
|
||||
id: hw-pfsense-snmp
|
||||
name: Pare-feu pfSense (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_pfsense_snmp.pl
|
||||
description: Supervision d'un pare-feu pfSense en SNMP (CPU, memoire, etat des regles, interfaces).
|
||||
prerequis:
|
||||
notes: |
|
||||
Activer le service SNMP dans Services > SNMP, et cocher les modules Host Resources
|
||||
et UCD si la supervision systeme est souhaitee.
|
||||
host_template:
|
||||
name: HW-pfSense-SNMP-custom
|
||||
alias: Materiel pfSense SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU du boitier
|
||||
line: "$CENTREONPLUGINS$/centreon_pfsense_snmp.pl --plugin=apps::pfsense::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_pfsense_snmp.pl --plugin=apps::pfsense::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Rules-Drop
|
||||
alias: Rules-Drop
|
||||
description: Paquets rejetes par les regles de filtrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_pfsense_snmp.pl --plugin=apps::pfsense::snmp::plugin --mode=rules-drop --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_generic_snmp.pl --plugin=snmp_standard::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,56 @@
|
||||
id: hw-stormshield-snmp
|
||||
name: Pare-feu Stormshield (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_stormshield_snmp.pl
|
||||
description: Supervision d'un pare-feu Stormshield SNS en SNMP.
|
||||
host_template:
|
||||
name: HW-Stormshield-SNMP-custom
|
||||
alias: Materiel Stormshield SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU de l'equipement
|
||||
line: "$CENTREONPLUGINS$/centreon_stormshield_snmp.pl --plugin=network::stormshield::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_stormshield_snmp.pl --plugin=network::stormshield::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Hardware
|
||||
alias: Hardware
|
||||
description: Etat des composants materiels
|
||||
line: "$CENTREONPLUGINS$/centreon_stormshield_snmp.pl --plugin=network::stormshield::snmp::plugin --mode=hardware --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --component='$_SERVICECOMPONENT$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: COMPONENT, value: ".*", description: "Composants a verifier (regex)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_stormshield_snmp.pl --plugin=network::stormshield::snmp::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic --warning-in-traffic='$_SERVICEWARNINGIN$' --critical-in-traffic='$_SERVICECRITICALIN$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: WARNINGIN, value: "80", description: "Seuil warning trafic entrant (%)"}
|
||||
- {name: CRITICALIN, value: "90", description: "Seuil critical trafic entrant (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
- name: Uptime
|
||||
alias: Uptime
|
||||
description: Duree depuis le dernier redemarrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_stormshield_snmp.pl --plugin=network::stormshield::snmp::plugin --mode=uptime --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-uptime='$_SERVICEWARNING$' --critical-uptime='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning (secondes)"}
|
||||
- {name: CRITICAL, value: "@0:600", description: "Seuil critical (secondes)"}
|
||||
- {name: EXTRAOPTIONS, value: "--unit=s", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,56 @@
|
||||
id: hw-ubiquiti-snmp
|
||||
name: Ubiquiti UniFi et EdgeMax (SNMP)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_ubnt_snmp.pl
|
||||
description: Supervision d'un equipement Ubiquiti en SNMP.
|
||||
host_template:
|
||||
name: HW-Ubiquiti-SNMP-custom
|
||||
alias: Materiel Ubiquiti SNMP
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Cpu
|
||||
alias: Cpu
|
||||
description: Charge CPU de l'equipement
|
||||
line: "$CENTREONPLUGINS$/centreon_ubnt_snmp.pl --plugin=network::ubnt::snmp::plugin --mode=cpu --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-average='$_SERVICEWARNING$' --critical-average='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Memory
|
||||
alias: Memory
|
||||
description: Utilisation de la memoire
|
||||
line: "$CENTREONPLUGINS$/centreon_ubnt_snmp.pl --plugin=network::ubnt::snmp::plugin --mode=memory --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-usage-prct='$_SERVICEWARNING$' --critical-usage-prct='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "80", description: "Seuil warning en %"}
|
||||
- {name: CRITICAL, value: "90", description: "Seuil critical en %"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Hardware
|
||||
alias: Hardware
|
||||
description: Etat des composants materiels
|
||||
line: "$CENTREONPLUGINS$/centreon_ubnt_snmp.pl --plugin=network::ubnt::snmp::plugin --mode=hardware --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --component='$_SERVICECOMPONENT$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: COMPONENT, value: ".*", description: "Composants a verifier (regex)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Interfaces
|
||||
alias: Interfaces
|
||||
description: Etat et trafic des interfaces
|
||||
line: "$CENTREONPLUGINS$/centreon_ubnt_snmp.pl --plugin=network::ubnt::snmp::plugin --mode=interfaces --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --interface='$_SERVICEINTERFACE$' --add-status --add-traffic --warning-in-traffic='$_SERVICEWARNINGIN$' --critical-in-traffic='$_SERVICECRITICALIN$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: INTERFACE, value: "", description: "Filtre sur le nom de l'interface"}
|
||||
- {name: WARNINGIN, value: "80", description: "Seuil warning trafic entrant (%)"}
|
||||
- {name: CRITICALIN, value: "90", description: "Seuil critical trafic entrant (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "--interface-use-adminstatus --name", description: "Options supplementaires"}
|
||||
- name: Uptime
|
||||
alias: Uptime
|
||||
description: Duree depuis le dernier redemarrage
|
||||
default: false
|
||||
line: "$CENTREONPLUGINS$/centreon_ubnt_snmp.pl --plugin=network::ubnt::snmp::plugin --mode=uptime --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-uptime='$_SERVICEWARNING$' --critical-uptime='$_SERVICECRITICAL$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNING, value: "", description: "Seuil warning (secondes)"}
|
||||
- {name: CRITICAL, value: "@0:600", description: "Seuil critical (secondes)"}
|
||||
- {name: EXTRAOPTIONS, value: "--unit=s", description: "Options supplementaires"}
|
||||
@@ -0,0 +1,43 @@
|
||||
id: hw-ups-rfc1628
|
||||
name: Onduleur standard (RFC 1628)
|
||||
category: hardware
|
||||
status: to-verify
|
||||
plugin: centreon_ups_standard_rfc1628_snmp.pl
|
||||
description: Supervision de tout onduleur respectant la MIB standard UPS-MIB. Repli utile quand aucun pack constructeur ne correspond.
|
||||
host_template:
|
||||
name: HW-UPS-RFC1628-custom
|
||||
alias: Materiel Onduleur RFC1628
|
||||
parents: [generic-active-host-custom]
|
||||
check_command: check_centreon_ping
|
||||
check_command_args: "!3!200,20%!400,50%"
|
||||
macros:
|
||||
- {name: SNMPEXTRAOPTIONS, value: "", description: "Options supplementaires passees au plugin"}
|
||||
services:
|
||||
- name: Battery-Status
|
||||
alias: Battery-Status
|
||||
description: Etat, charge et autonomie de la batterie
|
||||
line: "$CENTREONPLUGINS$/centreon_ups_standard_rfc1628_snmp.pl --plugin=hardware::ups::standard::rfc1628::snmp::plugin --mode=battery-status --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-charge-remaining='$_SERVICEWARNINGCHARGE$' --critical-charge-remaining='$_SERVICECRITICALCHARGE$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNINGCHARGE, value: "50:", description: "Seuil warning sur la charge restante (%)"}
|
||||
- {name: CRITICALCHARGE, value: "25:", description: "Seuil critical sur la charge restante (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Input-Lines
|
||||
alias: Input-Lines
|
||||
description: Tension et frequence des lignes d'entree
|
||||
line: "$CENTREONPLUGINS$/centreon_ups_standard_rfc1628_snmp.pl --plugin=hardware::ups::standard::rfc1628::snmp::plugin --mode=input-lines --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Output-Lines
|
||||
alias: Output-Lines
|
||||
description: Charge et tension des lignes de sortie
|
||||
line: "$CENTREONPLUGINS$/centreon_ups_standard_rfc1628_snmp.pl --plugin=hardware::ups::standard::rfc1628::snmp::plugin --mode=output-lines --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' --warning-load='$_SERVICEWARNINGLOAD$' --critical-load='$_SERVICECRITICALLOAD$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: WARNINGLOAD, value: "70", description: "Seuil warning sur la charge (%)"}
|
||||
- {name: CRITICALLOAD, value: "85", description: "Seuil critical sur la charge (%)"}
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
- name: Alarms
|
||||
alias: Alarms
|
||||
description: Alarmes remontees par l'onduleur
|
||||
line: "$CENTREONPLUGINS$/centreon_ups_standard_rfc1628_snmp.pl --plugin=hardware::ups::standard::rfc1628::snmp::plugin --mode=alarms --hostname=$HOSTADDRESS$ --snmp-version='$_HOSTSNMPVERSION$' --snmp-community='$_HOSTSNMPCOMMUNITY$' $_HOSTSNMPEXTRAOPTIONS$ $_SERVICEEXTRAOPTIONS$"
|
||||
macros:
|
||||
- {name: EXTRAOPTIONS, value: "", description: "Options supplementaires"}
|
||||
@@ -30,6 +30,11 @@ services:
|
||||
ENCLUME_DB_UTILISATEUR: enclume
|
||||
ENCLUME_DB_MOTDEPASSE: ${POSTGRES_PASSWORD:?definir POSTGRES_PASSWORD}
|
||||
ENCLUME_PARTAGE_JOURS: ${ENCLUME_PARTAGE_JOURS:-90}
|
||||
# Mentions legales. Sans ces valeurs, la page indique ce qui manque.
|
||||
ENCLUME_EDITEUR: ${ENCLUME_EDITEUR:-}
|
||||
ENCLUME_CONTACT: ${ENCLUME_CONTACT:-}
|
||||
ENCLUME_HEBERGEUR: ${ENCLUME_HEBERGEUR:-}
|
||||
ENCLUME_DEPOT: ${ENCLUME_DEPOT:-}
|
||||
# Connexion optionnelle, deleguee a Authentik qui federe GitHub et Google.
|
||||
ENCLUME_OIDC_METADATA: ${ENCLUME_OIDC_METADATA:-}
|
||||
ENCLUME_OIDC_CLIENT_ID: ${ENCLUME_OIDC_CLIENT_ID:-}
|
||||
|
||||
@@ -11,7 +11,7 @@ ce qui permet à n'importe qui de l'auto-héberger sans rien configurer.
|
||||
| Soumission de packs | base + OIDC | contributions par pull request uniquement |
|
||||
| Publication des packs acceptés | jeton Gitea | modération possible, publication non |
|
||||
|
||||
`/sante` annonce l'état réel de chacune.
|
||||
`/health` annonce l'état réel de chacune.
|
||||
|
||||
## Authentik
|
||||
|
||||
@@ -36,8 +36,19 @@ ENCLUME_OIDC_CLIENT_SECRET=...
|
||||
|
||||
### En cas de « Redirect URI Error »
|
||||
|
||||
Authentik compare au caractère près l'URI reçue à celle déclarée. La page d'erreur porte dans
|
||||
son adresse le paramètre `redirect_uri=` : c'est ce que l'application a réellement demandé.
|
||||
Authentik compare au caractère près l'URI reçue à celle déclarée. Demandez à l'application ce
|
||||
qu'elle envoie :
|
||||
|
||||
```bash
|
||||
curl -s https://<domaine>/health | python3 -m json.tool | grep uri_de_retour
|
||||
```
|
||||
|
||||
La valeur renvoyée est exactement celle à déclarer dans **le fournisseur**, champ « URIs de
|
||||
redirection », en correspondance **Stricte**. Attention à ne pas la saisir dans « URI de
|
||||
déconnexion », qui est un champ voisin et sans rapport.
|
||||
|
||||
La page d'erreur porte aussi dans son adresse le paramètre `redirect_uri=` : c'est la même
|
||||
information, vue depuis le navigateur.
|
||||
|
||||
- Une barre oblique finale, un `http` au lieu de `https`, un sous-domaine différent : tout
|
||||
écart compte.
|
||||
|
||||
@@ -22,10 +22,10 @@ cd Enclume
|
||||
cp .env.example .env # renseigner ENCLUME_TAG, ENCLUME_DOMAINE, POSTGRES_PASSWORD, ENCLUME_SECRET_KEY
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
curl -s https://enclume.tips-of-mine.com/sante
|
||||
curl -s https://enclume.tips-of-mine.com/health
|
||||
```
|
||||
|
||||
`/sante` renvoie la version et le commit de l'image en cours : c'est la source de vérité
|
||||
`/health` renvoie la version et le commit de l'image en cours : c'est la source de vérité
|
||||
sur ce qui tourne réellement.
|
||||
|
||||
## Mise à jour
|
||||
@@ -35,7 +35,7 @@ Une évolution donne une image, jamais un `docker compose build` sur le serveur.
|
||||
```bash
|
||||
sed -i 's/^ENCLUME_TAG=.*/ENCLUME_TAG=1.4.0/' .env
|
||||
docker compose pull && docker compose up -d
|
||||
curl -s https://enclume.tips-of-mine.com/sante | grep 1.1.4
|
||||
curl -s https://enclume.tips-of-mine.com/health | grep 1.1.4
|
||||
```
|
||||
|
||||
## Retour arrière
|
||||
|
||||
@@ -86,7 +86,7 @@ Puis sur le serveur, dans le répertoire du compose :
|
||||
```bash
|
||||
cp .env.example .env # renseigner ENCLUME_TAG=1.0.0 et le domaine
|
||||
docker compose pull && docker compose up -d
|
||||
curl -s https://<domaine>/sante
|
||||
curl -s https://<domaine>/health
|
||||
```
|
||||
|
||||
## Réseau Traefik
|
||||
|
||||
+24
-1
@@ -20,6 +20,20 @@ def _bool(nom: str, defaut: bool = False) -> bool:
|
||||
return brut.strip().lower() in {"1", "true", "oui", "yes", "on"}
|
||||
|
||||
|
||||
def _url_publique() -> str:
|
||||
"""Adresse publique du site, normalisee.
|
||||
|
||||
Une barre finale ou un protocole absent suffirait a faire diverger l'URI de
|
||||
redirection de celle declaree chez le fournisseur.
|
||||
"""
|
||||
brut = os.environ.get("ENCLUME_URL_PUBLIQUE", "").strip().rstrip("/")
|
||||
if not brut:
|
||||
return ""
|
||||
if not brut.startswith(("http://", "https://")):
|
||||
brut = f"https://{brut}"
|
||||
return brut
|
||||
|
||||
|
||||
def _url_base() -> str:
|
||||
"""Assemble l'URL PostgreSQL a partir des variables separees."""
|
||||
hote = os.environ.get("ENCLUME_DB_HOTE", "")
|
||||
@@ -43,7 +57,16 @@ class Config:
|
||||
# --- Identite du service ------------------------------------------------
|
||||
VERSION = os.environ.get("ENCLUME_VERSION", "dev")
|
||||
COMMIT = os.environ.get("ENCLUME_COMMIT", "inconnu")
|
||||
URL_PUBLIQUE = os.environ.get("ENCLUME_URL_PUBLIQUE", "").rstrip("/")
|
||||
URL_PUBLIQUE = _url_publique()
|
||||
DEPOT = os.environ.get(
|
||||
"ENCLUME_DEPOT", "https://gitea.tips-of-mine.com/Tips-Of-Mine/Enclume"
|
||||
).rstrip("/")
|
||||
|
||||
# --- Mentions legales ---------------------------------------------------
|
||||
# Sans ces valeurs, la page affiche ce qui manque plutot qu'une page vide.
|
||||
EDITEUR = os.environ.get("ENCLUME_EDITEUR", "")
|
||||
CONTACT = os.environ.get("ENCLUME_CONTACT", "")
|
||||
HEBERGEUR = os.environ.get("ENCLUME_HEBERGEUR", "")
|
||||
|
||||
# --- Sessions -----------------------------------------------------------
|
||||
# Sans cle fournie, on en tire une au demarrage : les sessions ne survivent
|
||||
|
||||
@@ -911,17 +911,89 @@ brancher('btn-deconnexion', function () {
|
||||
|
||||
// ------------------------------------------------------ soumission de pack
|
||||
|
||||
|
||||
var MODELE_PACK = [
|
||||
'# Un pack decrit une technologie : ses sondes, leur ligne de commande et',
|
||||
'# leurs macros. Remplacez les valeurs, gardez la structure.',
|
||||
'id: app-rabbitmq # minuscules, chiffres et tirets',
|
||||
'name: RabbitMQ # nom lisible, affiche dans le catalogue',
|
||||
'category: application # system | hardware | application',
|
||||
'status: to-verify # verified si vous l avez eprouve sur un central',
|
||||
'plugin: centreon_rabbitmq_restapi.pl',
|
||||
'description: Supervision d un broker RabbitMQ via son API de management.',
|
||||
'',
|
||||
'host_template:',
|
||||
' name: App-RabbitMQ-custom # convention : <Famille>-<Techno>-custom',
|
||||
' alias: Applicatif RabbitMQ',
|
||||
' parents: [generic-active-host-custom]',
|
||||
' macros:',
|
||||
' - {name: RABBITPORT, value: "15672", description: "Port de l API"}',
|
||||
' - {name: RABBITPASSWORD, value: "", description: "Mot de passe", is_password: true}',
|
||||
'',
|
||||
'# Facultatif : ce qu il faut installer sur le collecteur.',
|
||||
'prerequis:',
|
||||
' paquets:',
|
||||
' debian: [libwww-perl]',
|
||||
' rhel: [perl-libwww-perl]',
|
||||
' notes: |',
|
||||
' Activer le plugin de management et creer un compte en lecture seule.',
|
||||
'',
|
||||
'services:',
|
||||
' - name: Queues # le modele s appellera App-RabbitMQ-Queues',
|
||||
' alias: Queues',
|
||||
' description: Messages en attente dans les files',
|
||||
' default: true # false pour une sonde decochee par defaut',
|
||||
' line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=apps::rabbitmq::restapi::plugin --mode=queues --hostname=$HOSTADDRESS$ --port=\'$_HOSTRABBITPORT$\' --warning=\'$_SERVICEWARNING$\'"',
|
||||
' macros:',
|
||||
' - {name: WARNING, value: "1000", description: "Seuil warning"}',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
brancher('btn-soumettre', function () {
|
||||
ouvrirModale('Proposer un pack au catalogue', function (corps) {
|
||||
corps.appendChild(elt('p', {
|
||||
className: 'lede',
|
||||
textContent: "Collez le YAML de votre pack. Il sera verifie ici, puis relu dans une " +
|
||||
'demande de fusion avant d\u2019entrer au catalogue. Rien n\u2019est execute par le site.'
|
||||
textContent: 'Un pack decrit une technologie : un modele d\u2019hote et ses sondes. ' +
|
||||
'Il sera verifie ici, puis relu dans une demande de fusion avant d\u2019entrer au ' +
|
||||
'catalogue. Rien n\u2019est execute par le site.'
|
||||
}));
|
||||
|
||||
var zone = elt('textarea', { rows: 16, placeholder: 'id: app-rabbitmq\nname: RabbitMQ\ncategory: application\n...' });
|
||||
var aide = elt('div', { className: 'notice' });
|
||||
aide.appendChild(elt('b', { textContent: 'Ce qui est attendu' }));
|
||||
var regles = elt('ul');
|
||||
[
|
||||
'Un identifiant en minuscules, chiffres et tirets : os-debian-snmp, app-rabbitmq.',
|
||||
'Une categorie parmi system, hardware et application.',
|
||||
'Un modele d\u2019hote nomme <Famille>-<Techno>-custom, qui porte les macros communes : ports, comptes, options du plugin.',
|
||||
'Une sonde par mode du plugin, avec sa ligne de commande commencant par $CENTREONPLUGINS$ ou $USER1$.',
|
||||
'Les seuils en macros $_SERVICEXXX$, jamais en dur dans la ligne.',
|
||||
'Aucun point-virgule dans les lignes de commande : c\u2019est le separateur CLAPI.',
|
||||
'Aucun mot de passe reel : laissez la valeur vide et marquez la macro is_password.'
|
||||
].forEach(function (regle) { regles.appendChild(elt('li', { textContent: regle })); });
|
||||
aide.appendChild(regles);
|
||||
corps.appendChild(aide);
|
||||
|
||||
var zone = elt('textarea', { rows: 16, placeholder: 'Collez ici le YAML de votre pack, ou partez du modele commente.' });
|
||||
corps.appendChild(zone);
|
||||
|
||||
var exemple = elt('div', { className: 'barre' });
|
||||
exemple.appendChild(elt('button', {
|
||||
type: 'button', className: 'small', textContent: 'Partir d\u2019un modele commente',
|
||||
onclick: function () {
|
||||
if (zone.value.trim() && !confirm('Remplacer le contenu saisi par le modele ?')) return;
|
||||
zone.value = MODELE_PACK;
|
||||
zone.focus();
|
||||
}
|
||||
}));
|
||||
exemple.appendChild(elt('button', {
|
||||
type: 'button', className: 'small',
|
||||
textContent: 'Reprendre un pack existant',
|
||||
onclick: function () {
|
||||
etat('Ouvrez un pack du catalogue depuis « Importer un pack » pour vous en inspirer');
|
||||
}
|
||||
}));
|
||||
corps.appendChild(exemple);
|
||||
|
||||
var mot = elt('input', { type: 'text', placeholder: 'Un mot pour le relecteur (facultatif)' });
|
||||
corps.appendChild(mot);
|
||||
|
||||
|
||||
@@ -65,7 +65,15 @@ small { color: var(--ink-dim); font-size: 12px; display: block; margin-top: 4px;
|
||||
}
|
||||
.toolbar select { width: auto; min-width: 210px; flex: 0 0 auto; }
|
||||
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
|
||||
.toolbar .grow { flex: 1; text-align: right; color: var(--ok); font-size: 12.5px; }
|
||||
.toolbar .grow {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
color: var(--ok);
|
||||
font-size: 12.5px;
|
||||
padding-right: 10px;
|
||||
border-right: 1px solid var(--line);
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- atelier */
|
||||
|
||||
@@ -369,7 +377,12 @@ pre.code {
|
||||
/* -------------------------------------------- comptes, partage, moderation */
|
||||
|
||||
.toolbar .compte { font-size: 12.5px; color: var(--ink-dim); }
|
||||
.toolbar .compte a { margin-left: 6px; }
|
||||
.toolbar .compte a {
|
||||
margin-left: 6px;
|
||||
color: var(--accent);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
.toolbar a.btn {
|
||||
padding: 6px 11px;
|
||||
border-color: var(--accent);
|
||||
@@ -395,9 +408,87 @@ pre.code {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#modal-corps input[type="text"] { margin-bottom: 10px; }
|
||||
#modal-corps .notice { margin: 12px 0 0; }
|
||||
#modal-corps .notice { margin: 12px 0; }
|
||||
#modal-corps .notice ul { margin: 8px 0 0; padding-left: 18px; }
|
||||
#modal-corps .notice li { color: var(--ink-dim); margin-bottom: 4px; }
|
||||
|
||||
/* --------------------------------------------------------- prerequis */
|
||||
|
||||
.prerequis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
|
||||
.prerequis textarea { min-height: 90px; }
|
||||
|
||||
/* ------------------------------------------------------------- accueil */
|
||||
|
||||
.topbar h1 a { color: var(--ink); text-decoration: none; }
|
||||
.topbar h1 a:hover { color: var(--accent); }
|
||||
|
||||
.accueil {
|
||||
max-width: 980px;
|
||||
margin: 0 auto;
|
||||
padding: 48px 26px 80px;
|
||||
}
|
||||
.accueil section { margin-bottom: 52px; }
|
||||
.accueil h2 { font-size: 28px; line-height: 1.25; margin-bottom: 14px; max-width: 22ch; }
|
||||
.accueil h3 { font-size: 16px; margin-bottom: 12px; }
|
||||
.accueil p { color: var(--ink-dim); max-width: 72ch; margin: 0 0 14px; }
|
||||
.accueil .petit { font-size: 12.5px; margin-top: 12px; }
|
||||
.accueil code {
|
||||
font-family: var(--mono);
|
||||
font-size: 12.5px;
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
padding: 1px 5px;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.accueil a { color: var(--accent); }
|
||||
|
||||
.manchette { padding-bottom: 8px; }
|
||||
.manchette .barre { margin-top: 22px; gap: 10px; }
|
||||
|
||||
.accueil .btn {
|
||||
display: inline-block;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 9px 16px;
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.accueil .btn:hover { border-color: var(--accent); }
|
||||
.accueil .btn.primaire {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #17202b;
|
||||
font-weight: 600;
|
||||
}
|
||||
.accueil .btn.primaire:hover { filter: brightness(1.08); }
|
||||
|
||||
.chiffres {
|
||||
display: flex;
|
||||
gap: 48px;
|
||||
padding: 22px 0;
|
||||
border-top: 1px solid var(--line);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.chiffres div { display: flex; flex-direction: column; }
|
||||
.chiffres b { font-family: var(--mono); font-size: 26px; font-weight: 500; }
|
||||
.chiffres span { color: var(--ink-dim); font-size: 12.5px; }
|
||||
|
||||
.etapes, .garanties {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 26px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
.etapes b, .garanties b { display: block; margin-bottom: 6px; }
|
||||
.etapes p, .garanties p { font-size: 13px; margin: 0; }
|
||||
.garanties div { border-left: 2px solid var(--accent); padding-left: 14px; }
|
||||
|
||||
.accueil.texte { max-width: 760px; }
|
||||
.accueil.texte h3 { margin-top: 26px; }
|
||||
|
||||
@media (max-width: 820px) {
|
||||
.etapes, .garanties { grid-template-columns: 1fr; }
|
||||
.chiffres { flex-wrap: wrap; gap: 24px; }
|
||||
.accueil h2 { font-size: 22px; }
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Enclume — Générateur de configuration CLAPI pour Centreon{% endblock %}
|
||||
{% block body %}
|
||||
<div class="accueil">
|
||||
|
||||
<section class="manchette">
|
||||
<h2>Créez votre configuration Centreon, repartez avec le CLAPI</h2>
|
||||
<p>Commandes de contrôle, modèles de service, modèles d'hôte : construisez-les dans votre
|
||||
navigateur, à partir de zéro ou d'un des {{ pack_count }} packs du catalogue. Enclume produit
|
||||
les fichiers à jouer sur votre central — que vous relisez avant de les exécuter.</p>
|
||||
<div class="barre">
|
||||
<a class="btn primaire" href="/editeur">Ouvrir l'éditeur</a>
|
||||
<a class="btn" href="#fonctionnement">Comment ça marche</a>
|
||||
</div>
|
||||
<p class="petit">Sans inscription. Rien n'est installé. Projet indépendant de Centreon SAS.</p>
|
||||
</section>
|
||||
|
||||
<section class="chiffres">
|
||||
<div><b>{{ pack_count }}</b><span>packs prêts à importer</span></div>
|
||||
<div><b>{{ service_count }}</b><span>sondes préconfigurées</span></div>
|
||||
<div><b>{{ verifies }}</b><span>packs éprouvés sur un central</span></div>
|
||||
</section>
|
||||
|
||||
<p class="petit" style="margin-top:-38px">Les {{ pack_count - verifies }} autres portent la
|
||||
mention « à valider » : leurs lignes de commande n'ont pas encore été confrontées à une
|
||||
installation réelle. Le catalogue est honnête sur ce qu'il ignore.</p>
|
||||
|
||||
<section id="fonctionnement">
|
||||
<h3>Le problème que ça résout</h3>
|
||||
<p>Déclarer une technologie dans Centreon demande de créer une commande par sonde, un
|
||||
modèle de service par sonde, un modèle d'hôte, puis de rattacher le tout. À la souris, pour
|
||||
vingt sondes, c'est une demi-journée. En CLAPI, c'est un script — encore faut-il l'écrire
|
||||
sans se tromper sur un séparateur.</p>
|
||||
|
||||
<div class="etapes">
|
||||
<div>
|
||||
<b>1. Partir d'un pack ou de zéro</b>
|
||||
<p>Le catalogue couvre les systèmes, le matériel et les applications courantes. Importé
|
||||
dans votre projet, un pack devient modifiable : seuils, macros, sondes à garder.</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>2. Ajuster</b>
|
||||
<p>Vos conventions de nommage, votre préfixe, votre version de Centreon — les macros
|
||||
sortent en trois ou cinq champs selon la cible. Chaque objet est vérifié : noms en
|
||||
double, références manquantes, point-virgule interdit.</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>3. Récupérer</b>
|
||||
<p><code>deploy.sh</code> avec son mode d'essai, <code>deploy.clapi</code> pour l'import,
|
||||
les deux <code>rollback</code> correspondants, et <code>prerequis.sh</code> quand le pack
|
||||
déclare ses dépendances.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Ce que le site ne fait pas</h3>
|
||||
<div class="garanties">
|
||||
<div>
|
||||
<b>Il n'exécute rien</b>
|
||||
<p>Ni CLAPI, ni prérequis, ni contribution. Il écrit des fichiers. Vous les relisez,
|
||||
vous les jouez. Votre central n'est jamais joignable depuis ici.</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>Il ne garde pas vos mots de passe</b>
|
||||
<p>Les macros marquées mot de passe sont vidées avant toute écriture : partage, projet
|
||||
enregistré, soumission. Elles ne vivent que dans votre navigateur.</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>Il ne demande pas de compte</b>
|
||||
<p>L'éditeur, la génération et le partage fonctionnent sans connexion. Se connecter
|
||||
n'ajoute que l'enregistrement en ligne et la proposition de packs.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Le catalogue s'enrichit par ses utilisateurs</h3>
|
||||
<p>Un pack est un fichier YAML d'une trentaine de lignes. Si vous supervisez une technologie
|
||||
absente du catalogue, la proposer prend quelques minutes — et vérifier un pack existant
|
||||
marqué « à valider » vaut tout autant. Le format et les règles sont dans le
|
||||
<a href="{{ depot }}/src/branch/main/CONTRIBUTING.md">guide de contribution</a>.</p>
|
||||
<div class="barre">
|
||||
<a class="btn" href="{{ depot }}">Code source</a>
|
||||
<a class="btn" href="/editeur">Ouvrir l'éditeur</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -14,7 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<h1>Enclume</h1>
|
||||
<h1><a href="/">Enclume</a></h1>
|
||||
<span class="meta">Générateur de configuration CLAPI pour Centreon</span>
|
||||
<span class="version">{{ version }}</span>
|
||||
</header>
|
||||
@@ -22,8 +22,10 @@
|
||||
<footer class="pied">
|
||||
<span>Projet indépendant, sans lien avec Centreon SAS. Centreon est une marque déposée de son propriétaire.</span>
|
||||
<span class="grow"></span>
|
||||
<a href="https://gitea.tips-of-mine.com/Tips-Of-Mine/Enclume">Code source</a>
|
||||
<a href="/sante">État du service</a>
|
||||
<a href="/mentions">Mentions légales</a>
|
||||
<a href="{{ depot }}">Code source</a>
|
||||
<a href="{{ depot }}/src/branch/main/CONTRIBUTING.md">Contribuer</a>
|
||||
<a href="/health">État du service</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Mentions légales — Enclume{% endblock %}
|
||||
{% block body %}
|
||||
<div class="accueil texte">
|
||||
|
||||
<h2>Mentions légales</h2>
|
||||
|
||||
<h3>Éditeur</h3>
|
||||
<p>{{ editeur or "Non renseigné — définir ENCLUME_EDITEUR." }}<br>
|
||||
Contact : {{ contact or "Non renseigné — définir ENCLUME_CONTACT." }}</p>
|
||||
|
||||
<h3>Hébergement</h3>
|
||||
<p>{{ hebergeur or "Non renseigné — définir ENCLUME_HEBERGEUR." }}</p>
|
||||
|
||||
<h3>Marques</h3>
|
||||
<p>Centreon est une marque déposée de Centreon SAS. Enclume est un projet indépendant, sans
|
||||
lien ni affiliation avec cette société. Les noms de constructeurs et d'éditeurs cités dans le
|
||||
catalogue appartiennent à leurs propriétaires respectifs.</p>
|
||||
|
||||
<h3>Licence</h3>
|
||||
<p>Le code source est publié sous licence MIT. Les fichiers générés par le site vous
|
||||
appartiennent : ils sont produits à partir de ce que vous saisissez, sans restriction d'usage.</p>
|
||||
|
||||
<h3>Responsabilité</h3>
|
||||
<p>Les configurations générées sont fournies sans garantie. Elles doivent être relues avant
|
||||
d'être appliquées sur un environnement de production. Le catalogue signale par une mention
|
||||
« à valider » les packs dont les lignes de commande n'ont pas été éprouvées sur une
|
||||
installation réelle.</p>
|
||||
|
||||
<h2 style="margin-top:32px">Données personnelles</h2>
|
||||
|
||||
<h3>Sans connexion</h3>
|
||||
<p>Votre projet est conservé dans votre navigateur, par le mécanisme de stockage local. Il
|
||||
n'est transmis au serveur que lorsque vous demandez une génération — le temps de produire les
|
||||
fichiers, sans être conservé.</p>
|
||||
|
||||
<h3>Liens de partage</h3>
|
||||
<p>Créer un lien de partage enregistre une copie du projet sur le serveur, accessible à qui
|
||||
possède le lien. Les macros marquées « mot de passe » en sont retirées avant l'enregistrement.
|
||||
Ces copies sont supprimées automatiquement après {{ partage_jours }} jours.</p>
|
||||
|
||||
<h3>Avec un compte</h3>
|
||||
<p>La connexion est facultative. Elle enregistre votre identifiant chez le fournisseur
|
||||
d'identité, votre adresse de courriel et votre nom d'affichage, ainsi que les projets que
|
||||
vous choisissez d'enregistrer et les packs que vous proposez. Aucune autre donnée n'est
|
||||
collectée.</p>
|
||||
|
||||
<h3>Cookies</h3>
|
||||
<p>Un seul cookie est déposé, et uniquement si vous vous connectez : il porte votre session.
|
||||
Aucun cookie de mesure d'audience, aucun traceur publicitaire, aucun service tiers chargé
|
||||
depuis vos pages.</p>
|
||||
|
||||
<h3>Vos droits</h3>
|
||||
<p>Vous pouvez consulter, modifier et supprimer vos projets enregistrés depuis l'éditeur. Pour
|
||||
la suppression de votre compte et des données associées, écrivez à l'adresse de contact
|
||||
ci-dessus.</p>
|
||||
|
||||
<p style="margin-top:24px"><a class="btn" href="/editeur">Retour à l'éditeur</a></p>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -96,9 +96,30 @@ def create_app() -> Flask:
|
||||
"fonctions": Config.etat(),
|
||||
"utilisateur": utilisateur,
|
||||
"oidc_nom": Config.OIDC_NOM,
|
||||
"depot": Config.DEPOT,
|
||||
}
|
||||
|
||||
@app.get("/")
|
||||
def accueil() -> str:
|
||||
cat = catalog()
|
||||
return render_template(
|
||||
"accueil.html",
|
||||
pack_count=len(cat.packs),
|
||||
service_count=cat.service_count,
|
||||
verifies=sum(1 for p in cat.packs.values() if p.status == "verified"),
|
||||
)
|
||||
|
||||
@app.get("/mentions")
|
||||
def mentions() -> str:
|
||||
return render_template(
|
||||
"mentions.html",
|
||||
editeur=Config.EDITEUR,
|
||||
contact=Config.CONTACT,
|
||||
hebergeur=Config.HEBERGEUR,
|
||||
partage_jours=Config.PARTAGE_JOURS,
|
||||
)
|
||||
|
||||
@app.get("/editeur")
|
||||
def editor() -> str:
|
||||
cat = catalog()
|
||||
return render_template(
|
||||
@@ -135,12 +156,20 @@ def create_app() -> Flask:
|
||||
"moderation.html", autorise=utilisateur.administrateur, connecte=True
|
||||
)
|
||||
|
||||
# Les routes consommees par des machines suivent la convention du web ;
|
||||
# /sante reste servi pour ne rien casser, y compris en retour arriere.
|
||||
@app.get("/health")
|
||||
@app.get("/sante")
|
||||
def health() -> Response:
|
||||
cat = catalog()
|
||||
# L'URI de redirection est publiee ici parce qu'elle doit correspondre
|
||||
# au caractere pres a celle declaree chez le fournisseur : la comparer
|
||||
# ne doit pas demander de lire les journaux.
|
||||
uri_de_retour = auth.url_de_retour() if Config.oidc_actif() else ""
|
||||
return jsonify(
|
||||
{
|
||||
"statut": "ok",
|
||||
"uri_de_retour": uri_de_retour,
|
||||
"version": os.environ.get("ENCLUME_VERSION", "dev"),
|
||||
"revision": os.environ.get("ENCLUME_COMMIT", "inconnu"),
|
||||
"packs": len(cat.packs),
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ ENCLUME_CATALOG=${ENCLUME_CATALOG:-catalog} python3 - "$PAGE" <<'PY'
|
||||
import sys
|
||||
from enclume.webapp import create_app
|
||||
with open(sys.argv[1], "w", encoding="utf-8") as sortie:
|
||||
sortie.write(create_app().test_client().get("/").data.decode())
|
||||
sortie.write(create_app().test_client().get("/editeur").data.decode())
|
||||
PY
|
||||
|
||||
NODE_PATH=tests/node_modules node tests/interface.mjs "$PAGE"
|
||||
@@ -104,7 +104,7 @@ def test_toutes_les_ressources_de_la_page_existent():
|
||||
import re
|
||||
|
||||
client = create_app().test_client()
|
||||
html = client.get("/").data.decode()
|
||||
html = client.get("/editeur").data.decode()
|
||||
refs = re.findall(r'(?:src|href)="(/static/[^"]+)"', html)
|
||||
assert refs, "la page ne reference aucune ressource statique"
|
||||
for ref in refs:
|
||||
@@ -116,7 +116,23 @@ def test_le_script_expose_les_gestionnaires_attendus():
|
||||
import re
|
||||
|
||||
client = create_app().test_client()
|
||||
html = client.get("/").data.decode()
|
||||
html = client.get("/editeur").data.decode()
|
||||
script = client.get("/static/editeur.js").data.decode()
|
||||
for identifiant in re.findall(r'id="(btn-[^"]+|projet-[^"]+)"', html):
|
||||
assert identifiant in script, f"aucun gestionnaire pour {identifiant}"
|
||||
|
||||
|
||||
def test_accueil_et_mentions():
|
||||
"""Le site public a une porte d'entree et ses mentions, distinctes de l'outil."""
|
||||
client = create_app().test_client()
|
||||
|
||||
accueil = client.get("/")
|
||||
assert accueil.status_code == 200
|
||||
assert b"/editeur" in accueil.data
|
||||
assert b"Centreon SAS" in accueil.data
|
||||
|
||||
mentions = client.get("/mentions")
|
||||
assert mentions.status_code == 200
|
||||
assert b"Donn" in mentions.data # section donnees personnelles
|
||||
|
||||
assert client.get("/editeur").status_code == 200
|
||||
@@ -420,3 +420,43 @@ def test_alembic_supporte_un_mot_de_passe_encode():
|
||||
marque in sortie
|
||||
for marque in ("OperationalError", "could not translate", "Name or service not known")
|
||||
), sortie[-800:]
|
||||
|
||||
|
||||
def test_sante_publie_l_uri_de_retour(app_oidc):
|
||||
"""Comparer l'URI envoyee au fournisseur ne doit pas demander de lire les journaux."""
|
||||
donnees = app_oidc.test_client().get(
|
||||
"/sante", headers={"X-Forwarded-Proto": "https", "X-Forwarded-Host": "enclume.example"}
|
||||
).get_json()
|
||||
assert donnees["uri_de_retour"].endswith("/connexion/retour")
|
||||
assert donnees["uri_de_retour"].startswith("https://")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"saisie, attendu",
|
||||
[
|
||||
("https://enclume.example/", "https://enclume.example"),
|
||||
("enclume.example", "https://enclume.example"),
|
||||
(" https://enclume.example ", "https://enclume.example"),
|
||||
("", ""),
|
||||
],
|
||||
)
|
||||
def test_url_publique_normalisee(monkeypatch, saisie, attendu):
|
||||
"""Une barre finale ou un protocole oublie ferait diverger l'URI de redirection."""
|
||||
import importlib
|
||||
|
||||
monkeypatch.setenv("ENCLUME_URL_PUBLIQUE", saisie)
|
||||
import enclume.config
|
||||
|
||||
importlib.reload(enclume.config)
|
||||
obtenu = enclume.config.Config.URL_PUBLIQUE
|
||||
assert obtenu == attendu
|
||||
|
||||
|
||||
def test_les_deux_routes_de_sante(app):
|
||||
"""/health est la route de reference ; /sante reste servi pour la compatibilite."""
|
||||
client = app.test_client()
|
||||
reference = client.get("/health")
|
||||
ancienne = client.get("/sante")
|
||||
assert reference.status_code == 200
|
||||
assert ancienne.status_code == 200
|
||||
assert reference.get_json()["statut"] == ancienne.get_json()["statut"] == "ok"
|
||||
Reference in new issue
Block a user