Context
Installation
Récupération et extraction des données
Shinken Entreprise vous a transmis un fichier TAR.GZ contenant des dossiers et exécutables qui vous permettront de procéder à l'installation d'un Poller sur Windows.
Se connecter en administrateur sur le serveur, et extraire ce TAR.GZ sur le serveur Windows. (7Zip par exemple peut vous permettre d'effectuer cette extraction sur Windows)
Installations des dépendances
Getting and extraction data
Shinken Enterprise delivery comes with a .tar.gz archive specifically for the Windows Poller.
The first step is to connect with an Administrative account on the Windows server and to extract the .tar.gz archive (with 7zip for example).
Dependencies installation
To install the Windows Poller, you first have to install the following dependencies on your system (contained in the root of the archiveAfin de mettre en place le Poller il faut installer les dépendances suivantes (contenues à la racine du dossier):
- python-2.7.6.amd64.msi [à installer en premier install first]
- pywin32-217.win-amd64-py2.7.exe
- pycurl-7.19.3.1.win-amd64-py2.7.exe
- egenix-pyopenssl-0.13.3.1.0.1.6.win-amd64-py2.7.msi
- psutil-5.2.1.win-amd64-py2.7.exe
Note : laisser les chemins d'installations par défaut
Installation manuelle:
leave default installation paths
Manual installation
- installation de CherryPy-3.2.4 installation:
- Ouvrir une commande DOS en Administrateur
- Open DOS command prompt with Administrator rights
- Move into the Se déplacer dans le répertoire CherryPy-3.2.4 folder
- Execute the command: CExécuter la commande c:\python27\python.exe setup.py install
- From the Windows explorer :
- Copy the
- Copier le répertoire "shinken" vers directory to C:\shinken
- Copier Copy tools\srvany.exe dans c:\shinken\srvany\ [remplacer le fichierreplace file]
- Copier Copy context.json dans c:\shinken\var [remplacer le fichiervar [replace file]
- Ouvrir le fichier Open C:\shinken\var\context.json avec le bloc note with a text editor
- Change current
- Modifier la valeur current_version par la version de votre installation - par exemple valeur to your installation version. For example: 02.04.00-137.fr
Installation
du service Automatique Windowsof the automatic Windows service
Open a DOS command line with Administrator rights and launch the command Ouvrir une commande DOS en Administrateur puis exécuter la commande:
- sc create "Shinken-Poller" binpath= "c:\shinken\srvany\srvany.exe" DisplayName= "Shinken-Poller"
- (ATTENTION: les espaces après les = sont nécessaires)
Depuis l'explorateur Windows :
- WARNING: spaces after = are required)
From Windows explorer :
- Import the poller.reg file into the registry by double-clicking it
- From the MMC console of the Windows services (accessible from Administration Tools ou by launching services.msc directly), changer the Shinken-Poller service to "Automatic" in the service properties and change the account that launches the services (via a local or domain administrator account)
- Start the service by clicking "Start" on the Shinken-Poller line in the MMC console, or launch the following command
- Importer le fichier poller.reg dans votre registre en double cliquant dessus
- Depuis la console MMC des services Windows (depuis les Outils d'Administration ou via la commande services.msc), changer le service Shinken-Poller en "Automatique" depuis les propriétés du service et changer le compte qui va exécuter le service (via un compte administrateur local ou de domaine)
- Démarrer alors le service en cliquant sur "démarrer" sur la ligne du service Shinken-Poller de la console MMC ou via la commande : net start Shinken-Poller.
- Check the service has been launched correctlyVérifier qu'il est lancé avec :
- 1/ le log Log file: C:\shinken\var\pollerd.log
- 2/ le port 7771 qui doit être ouvert, vérifiable avec The port 7771 must be open. This can be checked with following command: netstat -an
- 3/ une fois le nouveau Poller déclaré en configuration, depuis votre installation centrale, exécuter la commande shinken-healthcheck : vos Pollers doivent être valides et accessibles.Note : une à deux minutes sont parfois nécessaires afin que la configuration soit diffusée
Mise à jour
La mise à jour d'un démon Poller Windows est manuelle. Sur votre serveur Windows, réalisez l'extraction du fichier compressé que vous avez téléchargé (utilisez 7-zip par exemple), et suivez les différentes étapes.
Arrêt démon Poller
- Once the new Windows Poller declared in the configuration on the Arbiter server, launch the shinken-healthcheck command. Your pollers should be valid and accessible.
- Note : one or two minutes can pass before all the configuration has been dispatched and taken into account by the daemons
- Note : one or two minutes can pass before all the configuration has been dispatched and taken into account by the daemons
- Once the new Windows Poller declared in the configuration on the Arbiter server, launch the shinken-healthcheck command. Your pollers should be valid and accessible.
Updating a Windows Poller
The update of a Windows Poller is manual. On a Windows server, extract the archive and follow the following steps.
Stopping the Poller daemon
From the Services management tool, stop the "Shinken-Poller" service, or via the command lineDepuis le gestionnaire des services Windows, arrêtez le service "Shinken-Poller" ou depuis une commande DOS en administrateur :
- net stop Shinken-Poller
From the Windows task manager check that the "python.exe"
(liés au service Shinken) ne soient plus présents. Si après l'arrêt du service Shinken-Poller, des processusprocess linked to the Shinken service are not present anymore. If after stopping the service "python.exe"
sont toujours ouverts, vous pouvez les terminerare still present, they can be killed.
Backup
Les manipulations de remplacements de fichiers pouvant être délicates, nous vous conseillons de faire une copie complète de c:\shinken dans un dossier de backup de votre choix (exemple c:\temp\backup\).
Because manipulations on the Poller files can lead to errors, we advise to proceed to a complete backup of the C:\shinken directory before upgrading.
For old installations (before
Pour les anciennes installations (avantV02.04.00)
Afin de mettre à jour une ancienne installation (avant V02.04.00), il est nécessaire de mettre à jour une nouvelle dépendance qui n'était pas installée à l'origine: To update from an old version, please install a new dependency : psutil-5.2.1.win-amd64-py2.7.exe.
Remplacement des fichiers
Copying source files
- Copy the Copiez le fichier context.json (qui se trouve à la racine de votre dossier décompressé) dans c file (which is at the root of the extracted archive) to C:\shinken\var\ [remplacer le fichier]
Il faut supprimer l'ancien code de Shinken en supprimant le dossier suivant:
- [replace file]
You have to delete the old Shinken source files by deleting the following folder:
- Cc:\shinken\shinken
ATTENTION: il ne faut PAS supprimer le répertoire
cWARNING: Do not delete the entire C:\shinken en entier, mais seulement le répertoire folder, but delete the "shinken" à l'intérieur.folder that is INSIDE C:\shinken.
Copy the new Shinken source filesIl faut placer le nouveau code shinken:
- windows - XXX\shinken\shinken à copier dans to copy to c:\shinken\shinken
- Vérifier que le fichier Check that the c:\shinken\shinken\daemon.py est bien présent (pour vérifier que les répertoires sont au bon endroit).
Redémarrage du démon Poller
- file is still present (to check files have been copied to the correct place).
Restarting the Poller daemon
From the Windows Service management console, start the "Shinken-Poller" service, or from the command line with Administrator rightsDepuis le gestionnaire des services Windows, démarrez le service "Shinken-Poller" ou depuis une commande DOS en administrateur :
- net start Shinken-Poller
Troubleshooting
SSL
configuration
To configure communications to use SSL, you have to edit the CPour paramétrer le daemon en SSL, il faut modifier le fichier c:\shinken\etc\daemons\pollerd-windows.ini et modifier le bloc suivant # file and change the following bloc:
| Code Block |
|---|
#-- HTTPS |
configuration -- |
Vous pourrez alors activer le SSL et paramétrer vos certificatsYou can then enable SSL and configure your certificates.
Démarrage manuel du Poller - pour test
Si le service Windows ne démarre pas, pour débugger, vous pouvez lancer le démarrage du Poller, ouvrir une commande DOS en Administrateur et tester le démarrage en exécutant la commande:
- c:\Python27\python.exe c:\shinken\bin\shinken-poller.py -c c:\shinken\etc\daemons\pollerd-windows.ini
- c:\Python27\python.exe c:\shinken\bin\shinken-poller.py -c c:\shinken\etc\daemons\pollerd-windows.ini
Réseau
Bien vérifier que la communication réseau entre votre architecture Shinken et ce nouveau Poller Windows est opérationnelle.
En effet, un firewall pourrait bloquer des communications importantes, ce qui pourrait provoquer des problèmes entres les différents démons.
Le port d'écoute 7771 doit être également ouvert sur le Poller Windows.
Si besoin, suivant les définitions des démons de votre configuration, la résolution de nom doit également permettre au Poller Windows de communiquer avec les autres démons et inversement.
Droits
Lors de vos installations, bien penser à être connecté en administrateur local de la machine, ou administrateur du domaine si le serveur est sur un domaine.
Limitation du Poller
Il n'est pas possible de limiter le CPU pour un Poller Windows. Par conséquence, la propriété "max_cpu_queue_per_cpu" dans la définition du Poller, n'aura aucun effet. En revanche, la limitation sur la mémoire est effective.