tech:notes_nsclient_nagios_windows
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_nsclient_nagios_windows [2025/04/16 12:11] – Jean-Baptiste | tech:notes_nsclient_nagios_windows [2026/02/27 13:51] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes NSClient (Agent Nagios / Centreon pour windows) | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | WebAPI | ||
| + | |||
| + | Voir : | ||
| + | * [[Pb plugin Nagios centreon NSClient 403]] | ||
| + | |||
| + | Voir aussi : | ||
| + | * check_ncpa | ||
| + | * check-mk-agent | ||
| + | * Exporter prometheus | ||
| + | |||
| + | check_nt et Centreon : https:// | ||
| + | |||
| + | ## Flux | ||
| + | |||
| + | |||
| + | | PORT | SENS | SERVICE | ||
| + | | ------------- | --------------- | -------------- | ---------------------------------- | | ||
| + | | 12489/ | ||
| + | | 5666/ | ||
| + | | 5667/ | ||
| + | | 8443/ | ||
| + | | 80 or 443/tcp | NAGIOS <= HOTE | NRDPClient | ||
| + | |||
| + | En plus de | ||
| + | |||
| + | | PORT | SENS | SERVICE | ||
| + | | ------------- | --------------- | -------------- | ---------------------------------- | | ||
| + | | ICMP | NAGIOS => HOTE | PING | ||
| + | | 161/ | ||
| + | | 162/ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | # Port 5666 | ||
| + | check_nrpe -H localhost -c check_load | ||
| + | |||
| + | # Pour 1248 | ||
| + | check_nt -H 192.168.1.10 -p 1248 -v UPTIME | ||
| + | check_nt -H 192.168.1.10 -p 1248 -v CLIENTVERSION | ||
| + | check_nt -H 192.168.1.10 -p 1248 -v INSTANCES -l Process | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | $ / | ||
| + | c:\ - total: 49.90 Gb - used: 11.78 Gb (24%) - free 38.12 Gb (76%) | 'c:\ Used Space' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ## Rest API | ||
| + | |||
| + | |||
| + | Changer | ||
| + | |||
| + | ~~~ini | ||
| + | ; Section for REST API users | ||
| + | [/ | ||
| + | password=centreon | ||
| + | role=limited | ||
| + | ~~~ | ||
| + | |||
| + | en | ||
| + | |||
| + | ~~~ini | ||
| + | ; Section for REST API users | ||
| + | [/ | ||
| + | password=P@ssw0rd | ||
| + | role=limited | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Autres | ||
| + | |||
| + | The NSClient++ password can be found by running: | ||
| + | ~~~winbatch | ||
| + | nscp web -- password --display | ||
| + | ~~~ | ||
| + | |||
| + | or you can sett a new password: | ||
| + | ~~~winbatch | ||
| + | nscp web -- password --set new-password | ||
| + | ~~~ | ||
| + | |||
| + | Debug | ||
| + | ~~~winbatch | ||
| + | nscp web password set=icinga --debug | ||
| + | ~~~ | ||
| + | |||
| + | If you want to fill this file with all available options run the following command: | ||
| + | ~~~winbatch | ||
| + | nscp settings --generate --add-defaults --load-all | ||
| + | ~~~ | ||
| + | |||
| + | If you want to activate a module and bring in all its options use: | ||
| + | ~~~winbatch | ||
| + | nscp settings --activate-module <MODULE NAME=""> | ||
| + | ~~~ | ||
| + | |||
| + | For details run: | ||
| + | ~~~winbatch | ||
| + | nscp settings --help | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Conf | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | '' | ||
| + | ~~~ini | ||
| + | [/ | ||
| + | password =Str0ngPassw0rd | ||
| + | ; PORT NUMBER - Port to use for check_nt. | ||
| + | port = 12489 | ||
| + | |||
| + | [/modules] | ||
| + | NSClientServer = 1 | ||
| + | CheckDisk = 1 | ||
| + | CheckEventLog = 1 | ||
| + | WebServer = 0 | ||
| + | Scheduler = 1 | ||
| + | |||
| + | [/ | ||
| + | allowed hosts = 127.0.0.1, | ||
| + | timeout = 30 | ||
| + | |||
| + | [/ | ||
| + | level = debug | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ini | ||
| + | [/ | ||
| + | allowed hosts = 0.0.0.0/0 | ||
| + | password = P@ssw0rd | ||
| + | port = 12489 | ||
| + | |||
| + | [/modules] | ||
| + | WEBServer = 1 | ||
| + | NRPEServer = 0 | ||
| + | NSClientServer = 1 | ||
| + | |||
| + | [/ | ||
| + | ; ALLOWED HOSTS - A coma separated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges. | ||
| + | allowed hosts = 0.0.0.0/0 | ||
| + | |||
| + | [/ | ||
| + | password = P@ssw0rd | ||
| + | role=limited | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Multi instance - Multiple NSClient++ | ||
| + | ~~~winbatch | ||
| + | nscp service --install --name nscp2 | ||
| + | ~~~ | ||
| + | Source : https:// | ||
| + | |||
| + | Old | ||
| + | |||
| + | ~~~ini | ||
| + | [Settings] | ||
| + | use_file=1 | ||
| + | |||
| + | [modules] | ||
| + | NRPEListener.dll | ||
| + | NSClientListener.dll | ||
| + | ; | ||
| + | CheckSystem.dll | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | If you want to fill this file with all available options run the following command: | ||
| + | ~~~winbatch | ||
| + | nscp settings --generate --add-defaults --load-all | ||
| + | ~~~ | ||
| + | |||
| + | If you want to activate a module and bring in all its options use: | ||
| + | ~~~winbatch | ||
| + | nscp settings --activate-module <MODULE NAME> --add-defaults | ||
| + | ~~~ | ||
| + | For details run: | ||
| + | ~~~winbatch | ||
| + | nscp settings --help | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## Notes | ||
| + | |||
| + | NSCA - Nagios Service Check Acceptor : Supervision en mode actif | ||
| + | |||
| + | |||
| + | ## Err | ||
| + | |||
| + | ~~~ | ||
| + | # / | ||
| + | could not fetch information from server | ||
| + | ~~~ | ||
| + | |||
| + | ### Solution | ||
| + | |||
| + | Dans mon cas il fallait autoriser le serveur Nagios par son nom ou son IP dans le fichier '' | ||
| + | |||
| + | |||
| + | |||
