Hi Crisanto,
We migrate our vCenter 2 weeks ago and we’re no more able to monitor it (VMware doesn’t maintain Perl SDK anymore...).
If anyone knows a workaround, I’ll appreciate ;)
Regards
Up !
Hello everyone,
We have the same problem.
Has anyone found a solution?
Regards,
Hello,I asked Centreon support and the answer was "I confirm compatibility with vCenter 8." We will still do it in staging to be sure.
Je suis sous vmware 8 update 2 ca fonctionne bien pas de problème
@slayderz2 merci beaucoup pour ce retour !
Pour faire fonctionner le plugin local SDK de vCenter 8 y a pas eu d’action particulière ?
Hello there, Centreon is currently working on a new VMWare 8 connector (ESX first) and we are looking for an environment to work in real conditions with the VMWare 8 API. Does one of you have one and is ready to let us try some HTTP requests in the vCenter ? Thank you in advance and best regards.
Hello there, Centreon is currently working on a new VMWare 8 connector (ESX first) and we are looking for an environment to work in real conditions with the VMWare 8 API. Does one of you have one and is ready to let us try some HTTP requests in the vCenter ? Thank you in advance and best regards.
Hello there. Are you still working on it ?
Hello :) Thank you for your reply. We've managed to get the resources we need internally, so we should be able to make progress on this topic very soon. We'll keep you informed :)
Hello :) Thank you for your reply. We've managed to get the resources we need internally, so we should be able to make progress on this topic very soon. We'll keep you informed :)
Any update ?
Hello @Jerome MARGUERITTE :) We're still working on VMWare 8 connector, which is one of our priorities for the upcoming release. Best regards.
Hello :) The first stone of the new connector VMware 8 ESX was laid in the release of this month :
And you can give us feedback about it here :
VMware8 ESX REST API do not work. I have a Centreon 24.10.0.
>centreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=host-status --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='http' --esx-name='192.168.9.1' --esx-id='pvirtual-00-01.interno.cedex.es' --username='monitorizacion' --password='****'UNKNOWN: curl perform error : Server returned nothing (no headers, no data)
pcentreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=host-status --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='https' --esx-name='192.168.9.1' --esx-id='pvirtual-00-01.interno.cedex.es' --username='monitorizacion' --password='****'UNKNOWN: curl perform error : SSL peer certificate or SSH remote key was not OK
UNKNOWN: curl perform error : SSL peer certificate or SSH remote key was not OK
>centreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=host-status --hostname='vcenter-00-02.interno.cedex.es' --port='80' --proto='https' --esx-name='192.168.9.1' --esx-id='pvirtual-00-01.interno.cedex.es' --username='monitorizacion' --password='****'UNKNOWN: curl perform error : SSL connect error
Can anybody help me please?
miguel.a.fernandez@cedex.es
Hi @Miguel Angel ,
The error message suggests that you may have to apply the part that relates to SSL certificate in the prerequisites from the documentation or add the --insecure
option.
The rest of the command line also inspires me to remind this excerpt of the --help
section of the plugin:
--esx-id Define which physical server to monitor based on its resource ID (example: "host-16"). --esx-name Define which physical server to monitor based on its name (example: "esx01.mydomain.tld"). When possible, it is recommended to use "--esx-id" instead.
In your case, as I understand your situation, instead of --esx-name='192.168.9.1' --esx-id='pvirtual-00-01.interno.cedex.es'
you should use --esx-name='pvirtual-00-01.interno.cedex.es' --esx-id=''
.
The esx-id is an internal identifier that you can notice in the URL when you browse it in the vCenter WUI.
You may use the host discovery feature to avoid having to bother figuring it.
[centreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=host-status --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='https' --esx-name='192.168.9.1' --insecure --esx-name='pvirtual-00-01.interno.cedex.es' --username='monitorizacion' --password='***'
OK: Host 'pvirtual-00-01.interno.cedex.es', id: 'host-12': power state is POWERED_ON, connection state is CONNECTED
Thanks, it´s working!!!!!!
I fixed another problem...
[root@vLCENTREON-00-E01 centplugins]# pwd /var/lib/centreon/centplugins
>root@vLCENTREON-00-E01 centplugins]# ls -alrt
-rw-rw-r--. 1 centreon-engine centreon-engine 411 mar 14 12:45 cache_snmpstandard_193.145.75.81_161_storage -rw-rw-r--. 1 centreon-engine centreon-engine 412 mar 14 12:50 cache_snmpstandard_193.145.67.4_161_storage drwxrwxr-x. 2 centreon centreon 8192 mar 14 12:56 .-rw-r--r--. 1 root root 65 mar 14 12:56 vsphere8_api_dd6678d7c6a601e5160c632de9a7b1c7 -rw-rw-r--. 1 centreon-engine centreon-engine 485 mar 14 12:57 cache_linux_local_193.145.75.51:22_cpu_a181a603769c1f98ad927e7367c7aa51 -rw-rw-r--. 1 centreon-engine centreon-engine 821 mar 14 12:57 cache_linux_local_193.145.75.35:22_cpu_a181a603769c1f98ad927e7367c7aa51
9root@vLCENTREON-00-E01 centplugins]# chown centreon-engine:centreon-engine ./vsphere8_api_dd6678d7c6a601e5160c632de9a7b1c7
and after that, there is another problem…
Can you help me please?
Hi,
About the need to chown
, it only happened because you run the plugin as root . I always recommend to run them as centreon-engine by running su - centreon-engine
first or by prefixing the command with sudo -u centreon-engine
.
About the absence of counter acquisition specification, it is normal that it happens when the check is performed for the first time. It should disappear at the second check. If not, please run the command with the --debug
option.
There was a problem in the file:
[root@vLCENTREON-00-E01 ~]# vi /etc/sudoers.d/centreon
# Centreon Vmware CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart centreon_vmware CENTREON ALL = NOPASSWD: /usr/bin/systemctl start centreon_vmware CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart centreon_vmware.service CENTREON ALL = NOPASSWD: /usr/bin/systemctl start centreon_vmware.serviceCENTREON ALL = NOPASSWD: systemctl restart centreon_vmware CENTREON ALL = NOPASSWD: systemctl start centreon_vmware CENTREON ALL = NOPASSWD: systemctl restart centreon_vmware.service CENTREON ALL = NOPASSWD: systemctl start centreon_vmware.service
I fixed the error, but the situation is the same…
eroot@vLCENTREON-00-E01 ~]# /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=power --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='https' --esx-name='192.168.9.1' --esx-id='host-12' --username='monitorizacion' --password='U!7GM7Vzj9sX' --warning-power-usage-watts='' --critical-power-usage-watts='' --debugUNKNOWN: API returns error of type UNAUTHORIZED: AId: vapi.security.authorization.permission.denied - Msg: Permission to perform this operation was denied ()]
The user “monitorizacion” in Vmware infraestructure “is read only administrator”. Is it a problem? What privileges does it to have?
Thanks, and regards…
Miguel
Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: 79422898bd7630635aa8c388b435863a
== Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 403 => Recv header: date: Mon, 17 Mar 2025 09:14:45 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 4 => Recv header: => Recv data: {"error_type":"UNAUTHORIZED","messages":[{"args":[],"default_message":"Permission to perform this operation was denied","id":"vapi.security.authorization.permission.denied"}]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact
Hi @Miguel Angel ,
First, this new plugin does not use the centreon_vmware daemon.
The daemon relies on the Perl SDK, which is not supported in VMware 8 any more, the purpose of this new plugin is to monitor items without the SDK.
Then, you need to give the privileges listed in the documentation to be able to record and read statistics.
I send the error I have….
OK: usage-percentage : skipped (no value(s)), usage-frequency : skipped (no value(s)) - no data for host host-15 counter cpu.capacity.provisioned.HOST at the moment. - no data for host host-15 counter cpu.capacity.usage.HOST at the moment. == Info: Trying 192.168.9.5:443... == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: ALPN, offering h2 == Info: ALPN, offering http/1.1 == Info: CAfile: /etc/pki/tls/certs/ca-bundle.crt == Info: TLSv1.0 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.3 (OUT), TLS handshake, Client hello (1): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.3 (IN), TLS handshake, Server hello (2): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Certificate (11): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server finished (14): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16): == Info: TLSv1.2 (OUT), TLS header, Finished (20): == Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Finished (20): == Info: TLSv1.2 (IN), TLS header, Finished (20): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Finished (20): == Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 == Info: ALPN, server accepted to use h2 == Info: Server certificate: == Info: subject: CN=vCenter-00-02.interno.cedex.es; C=US == Info: start date: Aug 8 10:32:34 2023 GMT == Info: expire date: Aug 7 22:32:34 2025 GMT == Info: issuer: CN=CA; DC=vsphere; DC=local; C=US; ST=California; O=vCenter-00-02.interno.cedex.es; OU=VMware Engineering == Info: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. == Info: Using HTTP2, server supports multi-use == Info: Connection state changed (HTTP/2 confirmed) == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: Using Stream ID: 1 (easy handle 0x55efd1940380) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: Connection state changed (MAX_CONCURRENT_STREAMS == 2147483647)! == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:03:59 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 11 => Recv header: => Recv data: {"acq_specs":{{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1744994901,"interval":60,"memo_":"","id":"101","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744996369,"interval":60,"memo_":"","id":"102","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"103","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"104","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.contention.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"105","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"106","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"107","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150493,"interval":60,"memo_":"","id":"108","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":,{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150544,"interval":60,"memo_":"","id":"109","status":"ENABLED"}]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact == Info: Found bundle for host vcenter-00-02.interno.cedex.es: 0x55efd19cd5f0 5can multiplex] == Info: Re-using existing connection! (#0) with host vcenter-00-02.interno.cedex.es == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: Using Stream ID: 3 (easy handle 0x55efd1940380) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/data/dp?rsrcs=type.HOST.moid=host-15&cid=cpu.capacity.provisioned.HOST&start=1742385719 HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:03:59 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 11 => Recv header: => Recv data: {"data_points":d]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact == Info: Found bundle for host vcenter-00-02.interno.cedex.es: 0x55efd19cd5f0 5can multiplex] == Info: Re-using existing connection! (#0) with host vcenter-00-02.interno.cedex.es == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: Using Stream ID: 5 (easy handle 0x55efd1940380) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/data/dp?rsrcs=type.HOST.moid=host-15&cid=cpu.capacity.usage.HOST&start=1742385719 HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:03:59 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 13 => Recv header: => Recv data: {"data_points":d]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact
Can you help me?
Miguel
[centreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=power --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='https' --esx-name='pvirtual-00-03.interno.cedex.es' --esx-id='host-15' --username='adminsecmaf' --password='***' --warning-power-usage-watts='' --critical-power-usage-watts='' --debugOK: power-usage-watts : skipped (no value(s)) - no data for host host-15 counter power.capacity.usage.HOST at the moment. == Info: Trying 192.168.9.5:443... == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: ALPN, offering h2 == Info: ALPN, offering http/1.1 == Info: CAfile: /etc/pki/tls/certs/ca-bundle.crt == Info: TLSv1.0 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.3 (OUT), TLS handshake, Client hello (1): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.3 (IN), TLS handshake, Server hello (2): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Certificate (11): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server finished (14): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16): == Info: TLSv1.2 (OUT), TLS header, Finished (20): == Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Finished (20): == Info: TLSv1.2 (IN), TLS header, Finished (20): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Finished (20): == Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 == Info: ALPN, server accepted to use h2 == Info: Server certificate: == Info: subject: CN=vCenter-00-02.interno.cedex.es; C=US == Info: start date: Aug 8 10:32:34 2023 GMT == Info: expire date: Aug 7 22:32:34 2025 GMT == Info: issuer: CN=CA; DC=vsphere; DC=local; C=US; ST=California; O=vCenter-00-02.interno.cedex.es; OU=VMware Engineering == Info: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. == Info: Using HTTP2, server supports multi-use == Info: Connection state changed (HTTP/2 confirmed) == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: Using Stream ID: 1 (easy handle 0x559507bd9dd0) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: Connection state changed (MAX_CONCURRENT_STREAMS == 2147483647)! == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:10:26 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 6 => Recv header: => Recv data: {"acq_specs":a{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1744994901,"interval":60,"memo_":"","id":"101","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744996369,"interval":60,"memo_":"","id":"102","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"103","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"104","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.contention.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"105","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"106","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"107","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150493,"interval":60,"memo_":"","id":"108","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150544,"interval":60,"memo_":"","id":"109","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745151004,"interval":60,"memo_":"","id":"110","status":"ENABLED"}]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact == Info: Found bundle for host vcenter-00-02.interno.cedex.es: 0x559507be3180 9can multiplex] == Info: Re-using existing connection! (#0) with host vcenter-00-02.interno.cedex.es == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: Using Stream ID: 3 (easy handle 0x559507bd9dd0) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/data/dp?rsrcs=type.HOST.moid=host-15&cid=power.capacity.usage.HOST&start=1742386106 HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:10:26 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 6 => Recv header: => Recv data: {"data_points":t]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact
is this working properly?
Miguel
Hello everyone!
I'm reaching out because I'm having an issue with this new ESX8 setup. Here are the options I'm using:
/usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=memory --hostname='***vcsa.****.****' --port='443' --proto='https' --esx-id='***esx04.***.***' --username='********' --password='********' --insecure --warning-vms-usage-percentage='' --critical-vms-usage-percentage='' --warning-vms-usage-bytes='' --critical-vms-usage-bytes=''
However, this is the error message I get:compose_type_from_rsrc_id: cannot extract type from 'esx04. . *'**
I believe the issue comes from the ESX ID, as I can't seem to find the correct value. Do you have any suggestions on how to retrieve it?
Thanks in advance!
[centreon-engine@vLCENTREON-00-E01 ~]$ /usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=power --hostname='vcenter-00-02.interno.cedex.es' --port='443' --proto='https' --esx-name='pvirtual-00-03.interno.cedex.es' --esx-id='host-15' --username='adminsecmaf' --password='***' --warning-power-usage-watts='' --critical-power-usage-watts='' --debugOK: power-usage-watts : skipped (no value(s)) - no data for host host-15 counter power.capacity.usage.HOST at the moment. == Info: Trying 192.168.9.5:443... == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: ALPN, offering h2 == Info: ALPN, offering http/1.1 == Info: CAfile: /etc/pki/tls/certs/ca-bundle.crt == Info: TLSv1.0 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.3 (OUT), TLS handshake, Client hello (1): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.3 (IN), TLS handshake, Server hello (2): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Certificate (11): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server finished (14): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16): == Info: TLSv1.2 (OUT), TLS header, Finished (20): == Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Finished (20): == Info: TLSv1.2 (IN), TLS header, Finished (20): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Finished (20): == Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 == Info: ALPN, server accepted to use h2 == Info: Server certificate: == Info: subject: CN=vCenter-00-02.interno.cedex.es; C=US == Info: start date: Aug 8 10:32:34 2023 GMT == Info: expire date: Aug 7 22:32:34 2025 GMT == Info: issuer: CN=CA; DC=vsphere; DC=local; C=US; ST=California; O=vCenter-00-02.interno.cedex.es; OU=VMware Engineering == Info: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. == Info: Using HTTP2, server supports multi-use == Info: Connection state changed (HTTP/2 confirmed) == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: Using Stream ID: 1 (easy handle 0x559507bd9dd0) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: Connection state changed (MAX_CONCURRENT_STREAMS == 2147483647)! == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:10:26 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 6 => Recv header: => Recv data: {"acq_specs":a{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1744994901,"interval":60,"memo_":"","id":"101","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744996369,"interval":60,"memo_":"","id":"102","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"103","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"104","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.contention.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"105","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"106","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"107","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150493,"interval":60,"memo_":"","id":"108","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150544,"interval":60,"memo_":"","id":"109","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":r{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745151004,"interval":60,"memo_":"","id":"110","status":"ENABLED"}]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact == Info: Found bundle for host vcenter-00-02.interno.cedex.es: 0x559507be3180 9can multiplex] == Info: Re-using existing connection! (#0) with host vcenter-00-02.interno.cedex.es == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: Using Stream ID: 3 (easy handle 0x559507bd9dd0) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/data/dp?rsrcs=type.HOST.moid=host-15&cid=power.capacity.usage.HOST&start=1742386106 HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: b6e96caade35d6465a30b3163fde8580
== Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Wed, 19 Mar 2025 12:10:26 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 6 => Recv header: => Recv data: {"data_points":t]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact
is this working properly?
Miguel
Hi,
According to the response to the GET request to /api/stats/acq-specs
both power.capacity.usage.HOST
and cpu.capacity.provisioned.HOST
counters are being recorded, so receiving only {"data_points":e]}
should happen only the first time and then return data to the second and following executions. Do you get the same result when you repeat the same command again?
Hello everyone!
I'm reaching out because I'm having an issue with this new ESX8 setup. Here are the options I'm using:
/usr/lib/centreon/plugins//centreon_vmware8_esx_restapi.pl --plugin=apps::vmware::vsphere8::esx::plugin --mode=memory --hostname='***vcsa.****.****' --port='443' --proto='https' --esx-id='***esx04.***.***' --username='********' --password='********' --insecure --warning-vms-usage-percentage='' --critical-vms-usage-percentage='' --warning-vms-usage-bytes='' --critical-vms-usage-bytes=''
However, this is the error message I get:compose_type_from_rsrc_id: cannot extract type from 'esx04. . *'**
I believe the issue comes from the ESX ID, as I can't seem to find the correct value. Do you have any suggestions on how to retrieve it?
Thanks in advance!
Hi,
Please have a look at this post , it explains why your command does not work.
I think there is a problem in the software…. check the next request.
UNKNOWN: compose_type_from_rsrc_id: cannot extract type from 'host-12.interno.cedex.es' == Info: Trying 192.168.9.5:443... == Info: Connected to vcenter-00-02.interno.cedex.es (192.168.9.5) port 443 (#0) == Info: ALPN, offering h2 == Info: ALPN, offering http/1.1 == Info: CAfile: /etc/pki/tls/certs/ca-bundle.crt == Info: TLSv1.0 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.3 (OUT), TLS handshake, Client hello (1): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.3 (IN), TLS handshake, Server hello (2): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Certificate (11): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Server finished (14): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16): == Info: TLSv1.2 (OUT), TLS header, Finished (20): == Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): == Info: TLSv1.2 (OUT), TLS header, Certificate Status (22): == Info: TLSv1.2 (OUT), TLS handshake, Finished (20): == Info: TLSv1.2 (IN), TLS header, Finished (20): == Info: TLSv1.2 (IN), TLS header, Certificate Status (22): == Info: TLSv1.2 (IN), TLS handshake, Finished (20): == Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 == Info: ALPN, server accepted to use h2 == Info: Server certificate: == Info: subject: CN=vCenter-00-02.interno.cedex.es; C=US == Info: start date: Aug 8 10:32:34 2023 GMT == Info: expire date: Aug 7 22:32:34 2025 GMT == Info: issuer: CN=CA; DC=vsphere; DC=local; C=US; ST=California; O=vCenter-00-02.interno.cedex.es; OU=VMware Engineering == Info: SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. == Info: Using HTTP2, server supports multi-use == Info: Connection state changed (HTTP/2 confirmed) == Info: Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: Using Stream ID: 1 (easy handle 0x563e24f83e30) == Info: TLSv1.2 (OUT), TLS header, Unknown (23): => Send header: GET /api/stats/acq-specs HTTP/2 Host: vcenter-00-02.interno.cedex.es accept: */* vmware-api-session-id: 30e5a185fc0f8538502de2cf9873bdc9
== Info: TLSv1.2 (IN), TLS header, Unknown (23): == Info: Connection state changed (MAX_CONCURRENT_STREAMS == 2147483647)! == Info: TLSv1.2 (OUT), TLS header, Unknown (23): == Info: TLSv1.2 (IN), TLS header, Unknown (23): => Recv header: HTTP/2 200 => Recv header: date: Thu, 20 Mar 2025 12:20:23 GMT => Recv header: content-type: application/json => Recv header: x-envoy-upstream-service-time: 14 => Recv header: => Recv data: {"acq_specs": {"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1744994901,"interval":60,"memo_":"","id":"101","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744996369,"interval":60,"memo_":"","id":"102","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"103","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"104","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.contention.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-12"}],"expiration":1744997180,"interval":60,"memo_":"","id":"105","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"106","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-14"}],"expiration":1745150366,"interval":60,"memo_":"","id":"107","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150493,"interval":60,"memo_":"","id":"108","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745150544,"interval":60,"memo_":"","id":"109","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-15"}],"expiration":1745151004,"interval":60,"memo_":"","id":"110","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"power.capacity.usage.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-13"}],"expiration":1745151465,"interval":60,"memo_":"","id":"111","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-13"}],"expiration":1745230374,"interval":60,"memo_":"","id":"112","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-11"}],"expiration":1745230451,"interval":60,"memo_":"","id":"113","status":"ENABLED"},{"counters":{"cid_mid":{"mid":"","cid":"cpu.capacity.provisioned.HOST"},"set_id":""},"resources":}{"predicate":"EQUAL","scheme":"moid","type":"HOST","id_value":"host-10"}],"expiration":1745230470,"interval":60,"memo_":"","id":"114","status":"ENABLED"}]} == Info: Connection #0 to host vcenter-00-02.interno.cedex.es left intact
Can you help me, please?