Hello everyone,
We updated our ESXi to version 8.
So I'm trying to configure the new VSphere8 connector without success.
I created a dedicated account on vCenter for monitoring.
This account is functional since the "host-status" mode is working correctly:
/usr/lib/centreon/plugins/centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=host-status --hostname='vcenter.mycompany.fr' --port='443' --proto='https' --esx-id='host-1234' --username='supervision-centreon@vsphere.local' --password='XXXXXXXXXXXX' OK: Host 'esx1.mycompany.fr', id: 'host-1234': power state is POWERED_ON, connection state is CONNECTED
I can also connect to vCenter via the web and view the characteristics of my ESXi and VMs.
I'm having a problem with all other services associated with this connector:
/usr/lib/centreon/plugins/centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=power --hostname='vcenter.mycompany.fr' --port='443' --proto='https' --esx-name='esx1.mycompany.fr' --esx-id='host-1324' --username='supervision-centreon@vsphere.local' --password='XXXXXXXXXXXX' --warning-usage-watts='' --critical-usage-watts='' UNKNOWN: 401 Unauthorized
In debug mode:
/usr/lib/centreon/plugins/centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=power --hostname='vcenter.mycompany.fr' --port='443' --proto='https' --esx-name='esx1.mycompany.fr' --esx-id='host-1234' --username='supervision-centreon@vsphere.local' --password='XXXXXXXXXXXX' --warning-usage-watts='' --critical-usage-watts='' --debug UNKNOWN: 401 Unauthorized == Info: Trying 192.168.1.1:443... == Info: Connected to vcenter.mycompany.fr (192.168.1.1) port 443 (#0) == Info: ALPN: offers h2,http/1.1 == 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 key exchange (12): == 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 / ECDHE-RSA-AES256-GCM-SHA384 == Info: ALPN: server accepted h2 == Info: Server certificate: == Info: subject: CN=vcenter.mycompany.fr; C=FR; ST=France; == Info: start date: Jun 12 19:00:32 2025 GMT == Info: expire date: Oct 27 10:59:22 2025 GMT == Info: issuer: CN=CA; DC=vsphere; DC=local; C=US; O=vcenter-rvd == Info: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. == Info: using HTTP/2 == Info: h2h3 n:method: GET] == Info: h2h3 n:path: /api/stats/acq-specs] == Info: h2h3 n:scheme: https] == Info: h2h3 n:authority: vcenter.mycompany.fr] == Info: h2h3 naccept: */*] == Info: h2h3 nvmware-api-session-id: 04b6f514c79c5e897f33b9572aa0ac2a] == Info: Using Stream ID: 1 (easy handle 0x556d69140940) => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter.mycompany.fr accept: */* vmware-api-session-id: 04b6f514c79c5e897f33b9572aa0ac2a
=> Recv header: HTTP/2 401 => Recv header: date: Tue, 01 Jul 2025 07:28:37 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 56 => Recv header: vary: Accept-Encoding => Recv header: => Recv data: {"error_type":"UNAUTHENTICATED","messages":m{"args"::],"default_message":"Unable to authenticate user","id":"vapi.security.authentication.invalid"}]} == Info: Connection #0 to host vcenter.mycompany.fr left intact == Info: Found bundle for host: 0x556d6914aef0 dcan multiplex] == Info: Re-using existing connection #0 with host vcenter.mycompany.fr == Info: h2h3 n:method: POST] == Info: h2h3 n:path: /api/session] == Info: h2h3 n:scheme: https] == Info: h2h3 n:authority: vcenter.mycompany.fr] == Info: h2h3 naccept: */*] == Info: h2h3 nauthorization: Basic c3VwZXJ2aXNpb24tY2VudHJlb25AdnNwaGVyZS5sb2NhbDpNVVJxLTVZbjFoQFJCMXBtaXNMbQ==] == Info: h2h3 ncontent-type: application/x-www-form-urlencoded] == Info: h2h3 ncontent-length: 0] == Info: Using Stream ID: 3 (easy handle 0x556d69140940) => Send header: POST /api/session HTTP/2 Host: vcenter.mycompany.fr accept: */* authorization: Basic c3VwZXJ2aXNpb24tY2VudHJlb25AdnNwaGVyZS5sb2NhbDpNVVJxLTVZbjFoQFJCMXBtaXNMbQ= content-type: application/x-www-form-urlencoded content-length: 0
=> Recv header: HTTP/2 201 => Recv header: date: Tue, 01 Jul 2025 07:28:37 GMT => Recv header: vmware-api-session-id: 685e987b90d8c76fe126e612b3d01f99 => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 29 => Recv header: vary: Accept-Encoding => Recv header: => Recv data: "685e987b90d8c76fe126e612b3d01f99" == Info: Connection #0 to host vcenter.mycompany.fr left intact == Info: Found bundle for host: 0x556d6914aef0 dcan multiplex] == Info: Re-using existing connection #0 with host vcenter.mycompany.fr == Info: h2h3 n:method: GET] == Info: h2h3 n:path: /api/stats/acq-specs] == Info: h2h3 n:scheme: https] == Info: h2h3 n:authority: vcenter.mycompany.fr] == Info: h2h3 naccept: */*] == Info: h2h3 nvmware-api-session-id: 685e987b90d8c76fe126e612b3d01f99] == Info: Using Stream ID: 5 (easy handle 0x556d69140940) => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter.mycompany.fr accept: */* vmware-api-session-id: 685e987b90d8c76fe126e612b3d01f99
=> Recv header: HTTP/2 401 => Recv header: date: Tue, 01 Jul 2025 07:28:37 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 103 => Recv header: vary: Accept-Encoding => Recv header: => Recv data: {"error_type":"UNAUTHENTICATED","messages":m{"args"::],"default_message":"Unable to authenticate user","id":"vapi.security.authentication.invalid"}]} == Info: Connection #0 to host vcenter.mycompany.fr left intact
I get the same error with an administrator account.
Have you also encountered this kind of problem?