Check_mk 2.0.0p5, ESXi 7.x and special agent error

I’m running 2.0.0p5 and trying to monitor ESXi 7.0. I have already added vCenter Server.

I’ve created a local user on the host, given it the read-only role and created a rule:

vsphere user name: monitor
vsphere secret: pasword
type of query: queried host is a host system
Retrieve information about:
hosts
Datastores
Performance Counters
Condition type: Explicit Conditions
Explicit host: esxhost.domain.com

The host properties are:
hostname: esxhost.domain.com
Check agent/API Integrtation: API Integration if configured, else Checkmk agent

The host and it’s monitored services are discovered correctly and it shows as piggybacked off of the vCenter server.

However, the connection test for the host fails with:

Agent exited with code 1: Cannot login to vSphere Server (reason: [500] Internal Server Error). Please check the credentials.

And there is a critical for the host in monitoring:

[special_vsphere] Agent exited with code 1: Cannot login to vSphere Server (reason: [500] Internal Server Error). Please check the credentials.CRIT, [piggyback] Valid sources: vcenter.domain.com, execution time 5.2 sec

Not sure what I can do to get this error resolved so my host doesn’t show a critical error.

One thing first, you don’t need to query vCenter and ESX host. It is ok if you only query the vCenter server and pull all the data from there.

For your problem you can only do a “cmk -D esxhost.domain.com” take the special agent command as shown in the top section and test this manually on the command line.
There are also the option available in the special agent to create a trace file with the complete communication between agent and vCenter/ESX server.

Thanks for the suggestions. Unless I’m misconfiguring something I’ve found there’s info you get when querying the host that you don’t from just vCenter. For instance multipath status to storage and interface status.

This is the results I get from the cmk command:

OMD[site1]:~$ cmk -d esxhost.domain.com
ERROR [special_vsphere]: Agent exited with code 1: Cannot login to vSphere Server (reason: [500] Internal Server Error). Please check the credentials.(!!)
<<<esx_vsphere_counters:sep(124):cached(1623097711,90)>>>
datastore.datastoreReadIops|605b4005-db7e6764-2fc7-78ac442ff4a8|8#20#104|number
datastore.datastoreReadIops|605b40a9-2e39329a-f5fa-78ac442ff4a8|15#11#11|number
datastore.datastoreReadIops|605b40f9-fb534d64-6a42-78ac442ff4a8|0#0#0|number
datastore.datastoreReadIops|605b4990-d4cecbc6-c330-78ac442ff4a8|0#0#0|number
datastore.datastoreReadIops|605e355f-1fac5d36-7d04-78ac442ff4a8|11#11#26|number
datastore.datastoreReadIops|605e358b-94b2cf6c-538d-78ac442ff4a8|14#24#28|number
datastore.datastoreReadIops|6061d439-5900739a-2d33-78ac442ff410|0#0#0|number
datastore.datastoreReadIops|606226e1-08618746-b250-78ac442ff4a8|0#0#0|number
datastore.datastoreWriteIops|605b4005-db7e6764-2fc7-78ac442ff4a8|7#5#4|number
datastore.datastoreWriteIops|605b40a9-2e39329a-f5fa-78ac442ff4a8|2#2#0|number
datastore.datastoreWriteIops|605b40f9-fb534d64-6a42-78ac442ff4a8|0#0#0|number
datastore.datastoreWriteIops|605b4990-d4cecbc6-c330-78ac442ff4a8|0#0#0|number
datastore.datastoreWriteIops|605e355f-1fac5d36-7d04-78ac442ff4a8|2#2#2|number
datastore.datastoreWriteIops|605e358b-94b2cf6c-538d-78ac442ff4a8|12#9#13|number
datastore.datastoreWriteIops|6061d439-5900739a-2d33-78ac442ff410|0#0#0|number
datastore.datastoreWriteIops|606226e1-08618746-b250-78ac442ff4a8|0#0#0|number
...

So it is able to query the host but it still claims the credentials are wrong.

My command was with a capital D :slight_smile:
With your lowercase d it outputs the check output processed by CMK. The capital D outputs the actual configuration.

This is also available from vCenter. With 1.6 it was so that this was missing with the default vSphere agent. The only missing information, if you pull all the data from vCenter, is the time difference compared to the monitoring server.

My command was with a capital D :slight_smile:
With your lowercase d it outputs the check output processed by CMK. The capital D outputs the actual configuration.

Yes, I used capital D. Fat fingers :slight_smile:

This is also available from vCenter. With 1.6 it was so that this was missing with the default vSphere agent. The only missing information, if you pull all the data from vCenter, is the time difference compared to the monitoring server.

I’ve added only using vCenter but the only objects I get for the hosts are local datastore capacities and the power state for each.

To be clear, if I add the vCenter do I still need to create a host object for each host? If yes, with or without the special agent?

To be honest, what I find the most confusing about all this is that the documentation still refers to 1.x as does most of people’s posts. Since the UI is different in 2.x it makes it hard to translate between the two.

You need to create the hosts objects and these objects then are configured without agent and without snmp.

This is something for @martin.hirschvogel :wink:

Thank you! That was the missing piece for me. Now that I’ve configured the host with no agent it’s states are discovered via piggyback from the vCenter and I no longer have the critical for the agent in the host.

Cheers!

Doesn’t the Dynamic config also work for vCenter and create all piggyback hosts itself? Don’t know anything about vCenter, but thought the principle is the same.

And towards the screenshots. We are trying to update the screenshots as quickly as we can. But the docs are 1000+ pages with a lot of screenshots. It is just a lot.

It works with vCenter as with every other piggyback source :slight_smile:
The question is more if you want to use it.