Hello,
I’ve an issue with the plugin centreon_nsclient_restapi for the veeam application i’ve a timeout with the mode “job-status”
/usr/lib/centreon/plugins/centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='172.17.70.72' --port='8443' --proto='https' --http-backend=curl --insecure --timeout='300' --legacy-password='xxxxx' --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' --debug
UNKNOWN: Command too long to execute (timeout)...
== Info: Trying 172.17.70.72...
== Info: TCP_NODELAY set
== Info: Connected to 172.17.70.72 (172.17.70.72) 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: subject: CN=localhost
== Info: start date: Mar 25 09:29:58 2024 GMT
== Info: expire date: Mar 25 09:29:58 2025 GMT
== Info: issuer: CN=localhost
== 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&job-status&%20--filter-name%3D%22%22%20--filter-start-time%3D%22%22%20--filter-end-time%3D%2286400%22%20--filter-counters%3D%22%22%20--ok-status%3D%22%22%20--warning-status%3D%22%22%20--critical-status%3D%22%25%7Bis_running%7D%20%3D%3D%200%20and%20not%20%25%7Bstatus%7D%20%3D~%20%2FSuccess%2Fi%22%20--warning-long%3D%22%22%20--critical-long%3D%22%22%20--verbose HTTP/1.1
Host: 172.17.70.72:8443
Accept: */*
password:******
== Info: HTTP 1.0, assume close after body
=> Recv header: HTTP/1.0 200
=> Recv header: Content-Length: 169
=> Recv header:
=> Recv data: {"header":{"source_id":""},"payload":r{"command":"check_centreon_plugins","lines":r{"message":"UNKNOWN: Command too long to execute (timeout)..."}],"result":"UNKNOWN"}]}
== Info: Closing connection 0
== Info: TLSv1.2 (OUT), TLS alert, close notify (256):
Locally on the windows machine the command is correctly executed :
C:\Users\Administrator>"c:\Program Files\centreon-nsclient\NSClient++\scripts\centreon\centreon_plugins.exe" --plugin=apps::backup::veeam::local::plugin --mode=job-status --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
CRITICAL: Job '**** - INFRA- CIFS' status: failed -type: Backup] - Job '**** - PROD - DMZPublic' status: failed Ptype: Backup] - Job '**** - PROD - *****' status: failed type: Backup]
With the mode licence it works :
/usr/lib/centreon/plugins/centreon_nsclient_restapi.pl --plugin=apps::nsclient::restapi::plugin --mode=query --hostname='172.17.70.72' --port='8443' --proto='https' --http-backend=curl --insecure --timeout=300 --legacy-password='centreon' --command=check_centreon_plugins --arg='apps::backup::veeam::local::plugin' --arg='licenses' --verbose --debug
OK: Number of licenses: 1 - License '*****' itype: perpetual] status: valid, instances total: 6 used: 0 (0.00%) free: 6 (100.00%) | 'licenses.total.count'=1;;;0; '*****#license.instances.usage.count'=0;;;0;6 '****#license.instances.free.count'=6;;;0;6 '*****#license.instances.usage.percentage'=0.00%;;;0;100
== Info: Trying 172.17.70.72...
== Info: TCP_NODELAY set
== Info: Connected to 172.17.70.72 (172.17.70.72) 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: subject: CN=localhost
== Info: start date: Mar 25 09:29:58 2024 GMT
== Info: expire date: Mar 25 09:29:58 2025 GMT
== Info: issuer: CN=localhost
== 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: 172.17.70.72:8443
Accept: */*
password:******
== Info: HTTP 1.0, assume close after body
=> Recv header: HTTP/1.0 200
=> Recv header: Content-Length: 460
=> Recv header:
=> Recv data: {"header":{"source_id":""},"payload"::{"command":"check_centreon_plugins","lines":m{"message":"OK: Number of licenses: 1 - License '****' Ntype: perpetual] status: valid, instances total: 6 used: 0 (0.00%) free: 6 (100.00%) | 'licenses.total.count'=1;;;0; '**** #license.instances.usage.count'=0;;;0;6 '****#license.instances.free.count'=6;;;0;6 '*****#license.instances.usage.percentage'=0.00%;;;0;100"}],"result":"OK"}]}
== Info: Closing connection 0
== Info: TLSv1.2 (OUT), TLS alert, close notify (256):
could you help me please ?