Solved

veeam plugin UNKNOWN: 500 read timeout

  • 8 September 2022
  • 7 replies
  • 810 views

Userlevel 1
Badge +7

i have problem with veeam rest ap plugin (windows rest api is ok) 

 

 

[root@centreon-central plugins]# /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='XXXXX' --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE' --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses'  --arg=' --filter-to="" --filter-type="" --filter-status="" --unit="" --warning-status="" --critical-status="%{status} =~ /expired|invalid/i" --warning-expires="" --critical-expires="" --warning-license-instances-usage="" --critical-license-instances-usage="" --warning-license-instances-free="" --critical-license-instances-free="" --warning-license-instances-usage-prct="" --critical-license-instances-usage-prct="" --warning-total="" --critical-total="" --verbose' --debug
UNKNOWN: 500 read timeout
======> request send
GET https://192.168.0.53:8443/query/check_centreon_plugins?apps%3A%3Abackup%3A%3Aveeam%3A%3Alocal%3A%3Aplugin&licenses&%20--filter-to%3D%22%22%20--filter-type%3D%22%22%20--filter-status%3D%22%22%20--unit%3D%22%22%20--warning-status%3D%22%22%20--critical-status%3D%22%25%7Bstatus%7D%20%3D~%20%2Fexpired%7Cinvalid%2Fi%22%20--warning-expires%3D%22%22%20--critical-expires%3D%22%22%20--warning-license-instances-usage%3D%22%22%20--critical-license-instances-usage%3D%22%22%20--warning-license-instances-free%3D%22%22%20--critical-license-instances-free%3D%22%22%20--warning-license-instances-usage-prct%3D%22%22%20--critical-license-instances-usage-prct%3D%22%22%20--warning-total%3D%22%22%20--critical-total%3D%22%22%20--verbose
User-Agent: centreon::plugins::backend::http::useragent
Password: XXXXX

======> response done
500 read timeout
Content-Type: text/plain
Client-Date: Thu, 08 Sep 2022 14:04:25 GMT
Client-Warning: Internal response

read timeout at /usr/share/perl5/vendor_perl/Net/HTTP/Methods.pm line 268.

 

 

if i use windows nsclient plugin i obtain a result

 


[root@centreon-central plugins]# /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='XXXXX'  --command=check_drivesize --arg="drive=*" --arg="perf-config=used(unit:B)used %(ignored:true)" --arg="filter=type = 'fixed' and name not regexp '.*yst.*'" --arg="warning=total_used>80%" --arg="critical=total_used>90%" --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE'                                                                                         WARNING : 438.688MB/523.996MB used | 'C:\ used'=50302001152.000B;68180085964.000;76702596710.000;0.000;85225107456.000 '\\?\Volume{4df404fe-2bce-40fa-a5e3-601128265c8f}\ used'=459997184.000B;439559782.000;494504755.000;0.000;549449728.000 '\\?\Volume{15311f3a-3859-484f-a314-32a6c56ef42d}\ used'=30106624.000B;80530636.000;90596966.000;0.000;100663296.000
[root@centreon-central plugins]#
 

i had to add --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE' on both cases, 

 


[root@centreon-central plugins]# /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='XXXXX'  --command=check_drivesize --arg="drive=*" --arg="perf-config=used(unit:B)used %(ignored:true)" --arg="filter=type = 'fixed' and name not regexp '.*yst.*'" --arg="warning=total_used>80%" --arg="critical=total_used>90%"
UNKNOWN: 500 Can't connect to 192.168.0.53:8443 (certificate verify failed)
 

why?

icon

Best answer by Fanto 14 September 2022, 10:17

View original

7 replies

Userlevel 6
Badge +19

Hi, 


Could you try this command please and paste the result?

 

 /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='XXXXX' --http-backend-curl --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​

Userlevel 1
Badge +7

Hi, 


Could you try this command please and paste the result?

 

 /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='XXXXX' --http-backend-curl --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​

/usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='centreon' --http-backend-curl --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​
Unknown option: http-backend-curl at /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl line 463.
[root@Centreon-IT100-HomeLab ~]#
 

 

so:

 

[root@Centreon-IT100-HomeLab ~]# /usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='centreon' --http-backend --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​
UNKNOWN: 500 read timeout
 

Userlevel 1
Badge +7

/usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='centreon' --http-backend --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​--verbose --debug
UNKNOWN: 500 read timeout
======> request send
GET https://192.168.0.53:8443/query/check_centreon_plugins?apps%3A%3Abackup%3A%3Aveeam%3A%3Alocal%3A%3Aplugin&licenses
User-Agent: centreon::plugins::backend::http::useragent
Password: centreon

======> response done
500 read timeout
Content-Type: text/plain
Client-Date: Tue, 13 Sep 2022 16:05:52 GMT
Client-Warning: Internal response

read timeout at /usr/share/perl5/vendor_perl/Net/HTTP/Methods.pm line 268.
 

Userlevel 1
Badge +7

 

changed into:

/usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='centreon' --http-backend=curl --insecure --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​--verbose --debug
UNKNOWN: 450 Timeout reached
== Info:   Trying 192.168.0.53...
== Info: TCP_NODELAY set
== Info: Connected to 192.168.0.53 (192.168.0.53) port 8443 (#0)
== Info: ALPN, offering http/1.1
== Info: successfully set certificate verify locations:
== Info:   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
== Info: TLSv1.3 (OUT), TLS handshake, Client hello (1):
== Info: TLSv1.3 (IN), TLS handshake, Server hello (2):
== Info: TLSv1.2 (IN), TLS handshake, Certificate (11):
== Info: TLSv1.2 (IN), TLS handshake, Server finished (14):
== Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
== Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
== Info: TLSv1.2 (OUT), TLS handshake, Finished (20):
== Info: TLSv1.2 (IN), TLS handshake, Finished (20):
== Info: SSL connection using TLSv1.2 / AES256-GCM-SHA384
== Info: ALPN, server did not agree to a protocol
== Info: Server certificate:
[..]
== Info:  SSL certificate verify result: self signed certificate (18), continuing anyway.
=> Send header: GET /query/check_centreon_plugins?apps%3A%3Abackup%3A%3Aveeam%3A%3Alocal%3A%3Aplugin&licenses HTTP/1.1
Host: 192.168.0.53:8443
Accept: */* password:centreon

== Info: Operation timed out after 5001 milliseconds with 0 bytes received
== Info: Closing connection 0
== Info: TLSv1.2 (OUT), TLS alert, close notify (256)

Userlevel 1
Badge +7

great news.

/usr/lib/centreon/plugins//centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='192.168.0.53' --port='8443' --proto='https' --legacy-password='centreon' --http-backend=curl --insecure --timeout=30 --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' ​--verbose --debug
 

worked. 

How can i make a secure connection? which configuration i missed?

Userlevel 6
Badge +19

Hi, 


To get rid of the --insecure flag, you’ll have to use an official certiifcate (not self-signed).


​​​​​​​

Userlevel 1
Badge +7

Hi, 


To get rid of the --insecure flag, you’ll have to use an official certiifcate (not self-signed).

 

ok, from an internal ca. Thank you very much for your help.

Reply