Solved

Problème nsclient restapi timeout


Badge +1

Bonjour,

 

Je rencontre un problème de timeout lors du check vers un serveur veeam.

Voici la commande lancé :

 /usr/lib/centreon/plugins/centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='XXX.XXX.XXX.XXX' --port='8443' --proto='https' --legacy-password='lebonmotdepasse' --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='job-status'  --arg=' --filter-name="" --filter-start-time="" --filter-end-time="86400" --filter-counters="" --ok-status="" --warning-status="" --critical-status="%{is_running} == 0 and not %{status} =~ /Success/i" --warning-long="" --critical-long="" --verbose  --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE’

 

La commande charge cpu fonctionne parfaitement mais des que la requête prends plus de 5 secondes j’ai ce retour :

UNKNOWN: 500 read timeout

et avec time devant j’ai toujours :

real    0m5.169s

même si j’ajoute un argument timeout dans la commande.

Wireshark me permet de voir que c’est centreon qui demande à couper la communication.

Quelqu’un peut-il m’aider a résoudre ce problème de timeout?

 

Merci d’avance.
 

icon

Best answer by matth_94 31 August 2022, 14:28

View original

6 replies

Userlevel 5
Badge +11

Hi @matth_94, Please ask your problem in English. This will help all other non-french speaking users who have the same issue to benefit from the solutions that will be proposed. Thank you for your understanding

Userlevel 4
Badge +13

Hi @matth_94 

Can you try with... and build from there? 

-bash-4.2$  /usr/lib/centreon/plugins/centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --command=check_cpu --hostname='x.x.x.x' --port='8443' --proto='https' --legacy-password='xyz' --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE'
OK: CPU load is ok. | 'total 5m'=0%;80;90;; 'total 1m'=0%;80;90;; 'total 5s'=1%;80;90;;

can also add --debug

======> request send
GET https://x.x.x.x:8443/query/check_cpu?
User-Agent: centreon::plugins::backend::http::useragent
Password: xyz

======> response done
HTTP/1.1 200 OK
Content-Length: 379
Client-Date: Fri, 10 Jun 2022 20:28:44 GMT
Client-Peer: x.x.x.x:8443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /CN=localhost
Client-SSL-Cert-Subject: /CN=localhost
Client-SSL-Cipher: AES256-GCM-SHA384
Client-SSL-Socket-Class: IO::Socket::SSL
Set-Cookie: token=frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ; path=/
Set-Cookie: uid=admin; path=/

{"header":{"source_id":""},"payload":[{"command":"check_cpu","lines":[{"message":"OK: CPU load is ok.","perf":[{"alias":"total 5m","int_value":{"critical":90,"unit":"%","value":0,"warning":80}},{"alias":"total 1m","int_value":{"critical":90,"unit":"%","value":0,"warning":80}},{"alias":"total 5s","int_value":{"critical":90,"unit":"%","value":0,"warning":80}}]}],"result":"OK"}]}

 

 

Badge

bonjour matth_94,

 

Avez-vous résolu votre pb car je rencontre le même. 

 

merci

 

Badge +1

Bonjour @Benoit34 ,

 

Oui j’ai pu avoir une aide sur le slack centreon qui a des channels en français et en anglais… J’ai pu modifier le timeout suite a des conseils avisés.

Je n’ai plus la commande en tête et je n’ai pas accès à cette supervision pour le moment donc je vous invite a vous rendre sur slack.

Si vous ne trouvez pas votre solution, dites le moi et je verrai pour vous retrouver cela.

 

Bonne continuation.

Badge

Super, merci,  je regarde. 

 

Bonne journée

Badge +1

@matth_94 

 

Bonjour,

 

Peux tu partager la solution ici stp, car j’ai le même soucis et je n’ai pas accès au slack centreon dont il est difficile de trouver l’adresse.


 

Can you share the solution here please.

 

Regards,

Reply