Quest-ce qu'un webservice pour les checks passifs
Le receiver a un module spécial pour les checks passifs. Ce module est appelé ws-arbiter et va ouvrir par défaut le port
What is the webservice for passive checks
The receiver daemon has a special module about passive checks. the module is named ws-arbiter and will open by default the 7760 TCP/HTTP port. You will be able to POST your checks into the receiver thanks to this module.
Module configuration
.Vous pourrez inscrire vos checks dans le receiver grâce à ce module.
Configuration du module
La configuration de ce module se trouve dans le fichier The configuration of this module is loacated in the file /etc/shinken/modules/ws-arbiter.cfg
By default it will be Par défaut ce sera :
| Code Block |
|---|
define module {
module_name ws-arbiter
module_type ws_arbiter
host 0.0.0.0
port 7760
username anonymous ; If you want auth, set username and password.
#password secret
} |
The values will beLes valeurs peuvent être :
- module_name: set a uniq name for this défini un nom unique pour le module
- module_type: must be doit être ws_arbiter
- host: the IP to listen tol'adresse à écouter IP . 0.0.0.0 means signifie "all toutes les interfaces"
- port: TCP to listen toà écouter
- username&password: if set to si mis à "anonymous" no credentials will be need. If you set a username and a password, then this basic authentification will be used
Example of passive check push:
- aucune accréditation nécessaire. si vous mettez un nom utilisateur/mot de passe,une authentification est nécessaire
Exemple d'un push de check passif :
Pour un hôteFor an host:
| Code Block |
|---|
curl -u user:password -d "time_stamp=$(date +%s)&host_name=host-checked&service_description=service-checked&return_code=0" --data-urlencode "output=Everything OK" http://shinken-srv:7760/push_check_result |
- time_stamp= epoch of the période du check
- host_name= name of the host you want to send check tonom de l'hôte auquel vous voulez envoyer le check
- service_description = name of the check you want to push resultnom du check pour lequel vous voulez pousser un résultat
- return_code= [ 0,1,2,3 ] values for code returnvaleur pour le code retour.
- output= texte simple text for your pour le check