2.0.0p6 RAW - can not locate "Datasource programs > Check state of VMWare ESX via vSphere"

Hello again.

I recently created a post asking about vSphere read-only user permissions. That user has been created in vSphere but I cannot seem to add vSphere to CheckMK. I have been working at this for a few hours with no progress.

Monitoring VMWare ESXi (checkmk.com)
In the doc above it states:

  • You must have defined the ESXi-server as the host in Checkmk, and configured it as an agent (Checkmk Agent). Tip: Select the host name so that it is the same as that known to the server itself.
    Once the prerequisites have have been satisfied you can create a Rule in the Datasource programs > Check state of VMWare ESX via vSphere rule set. This will be assigned to the defined host, so that instead of the standard agent the Special Agent will be used for retrieving data from the VMware-monitoring.

I continue to fail adding vSphere/VMs. Iā€™ve read multiple sites online, previous posts on the forum here, gone through the CheckMK documents, and nothing seems to fit with 2.0.0p6 RAW.

Looks like I might be stuck at:
(ESXi-server as host and) ā€œconfigured it as an agent.ā€

I have the host added, it pings, but I cannot seem to get further. I cannot get any services information. A lot of documents make reference to:

Datasource programs > Check state of VMWare ESX via vSphere

I cannot find ā€œDatasource programsā€ anywhere in 2.0.0p6. I also cannot seem to find out how to turn 1 of our hosts into an Agent? I cannot find where to enter the credentials of that read only account I added to vSphere. A rule search for ā€œstate of vmwareā€ doesnā€™t return any results.

Am I missing some documentation? Or is documentation just not updated to match the 2.0.0p6 interface yet? Or have I missed a section in the UI that deals with this?

To note: I can install the agent directly on VMs but reading the CheckMK material it looks like best practice is to get VM data piggybacked from the ESXi hosts?

With such a small number of VMs though I may be better off manually installing the agent on them.

Hello @sysadm1n,

in checkmk 2.0 this ruleset is called ā€œVMWare ESX via vSphereā€ and you can find it under Setup ā†’ Agents ā†’ VM, Cloud, Container.
You should configure your ESX host with ā€œAPI integrations if configured, else Checkmk agentā€ and create the ESX rule for that host with the user credentials you already created.

Regarding the monitoring of VMs: If possible i would also install the checkmk-Agent on the VMs and monitor them this way as well. You will get much more information about your hosts if you monitor them with the agent then just the piggyback-information you get from the ESX host.

Hope that helps.

Cheers,
Lorenz

1 Like

Thank you @lkoenig

I had searched that area of the UI but failed to realize the title ā€œVM, Cloud, Containerā€ was clickable.
red

Dumb on my part, so sorry about that. After your post and revisiting that section I was able to add vSphere, and add the credentials for the read only account over there - but I still fail to receive any data about the host itself. Just ā€œAvailabilityā€. It can ping and tracert but doesnā€™t collect any service data.

At this point I will move forward with installing the agent on the 20 VMs we have but I would like to get host monitoring up at some point. Any next step suggestions @lkoenig ?

Did you activate the changes? How is your ESX-Host configured in WATO? It should look like this:


Then you can go to ā€œSave & go to service configurationā€ and you should see the new services you get from the host. If that doesnā€™t work you can go to ā€œSave & go to connection testsā€ to figure out why you donā€™t get any information.

For monitoring the VMs you have to create a new host in checkmk for every VM you want to monitor with the corresponding IP-address or hostname if you have DNS-resolution. If the agent is already installed on the host you should get data from the host. This process is documented pretty well here: Setting up monitoring

1 Like

Thank you for all the help so far @lkoenig
Changes have been activated. And my ā€œMonitoring Agentsā€ for the ESXi host mirror your screen shot. When I save and test services all I get is:

Also, I will be installing the agent on each VM and adding them individually. I have a few already up and running with active email alerts. I was just getting thrown off by the documentation. The CheckMK documents make it sound like I donā€™t need agents on my VMs. They word it like piggyback data from the hosts is sufficient.

Okay, it seems as if the rule for your ESX-host is taking effect, but something seems wrong with the credentials. Can you try to log in to the webinterface of the ESX-host with the credentials you provided in the rule? Can you specify other known working credentials (e.g. for the root-user) in the rule and see if that works? Are you trying to contact a standalone ESX-host or a vCenter?

Piggyback information is always useful and you also get some information there you wonā€™t get with the agent, but i would always consider the agent installed on the target system as the most important source for monitoring a host.

1 Like

@lkoenig
Sorry for my delay (time differences).

I have begun to test different credentials but no luck yet. Also, I started work today and noticed the connection to an agent has failed. It was fine yesterday, and the agent was restarted on the host but is still not getting data. Could this be related?

(this image is from the host that was working but now isnā€™t. Itā€™s not the vSphere agent)
red

@lkoenig
For a little context in my last position they had an old version of CheckMK (version 1.2) and they were using an older vCenter. So I have some experience with CheckMK - but, this version 2.0.0p6 and integrating with vSphere is new to me.

This is also my first time deploying CheckMK in a new environment.

I appreciate all the help so far.

ā€œConnection refusedā€ could be due to a firewall blocking the request, perhaps even on the host itself.

Can you successfully connect from your monitoring server to the ESXi host (10.5.3.32)?
Test with telnet or openssl s_client

1 Like

As for the host that was working: Did you restrict your rule for the ESX-agent to the ESX-host? Because it looks like the rule is now applied to all hosts and now checkmk is trying to execute the ESX-special agent for all hosts, not just the ESX-host. That is probably the reason why your other hosts arenā€™t working anymore. Make sure to restrict the ESX-rule only to the ESX-host in the conditions, like so (change the name accordingly), or with hosttags, folders, etc, whatever you prefer:

As for the ESX-host: The error-message (or at least what i can see from the screenshot) says that something is wrong with the credentials. Please try to log in to the ESX-webinterface with that read-only user and check if that works.

1 Like

@lkoenig
You were correct about the rule being applied to all. I created a new folder for hosts and changed the condition to apply to the newly created folder.

As for permissions I am at a loss. For testing I added the admin credentials of vSphere to CheckMK and it still fails with the same error.

@martin.schwarz
Firewall rules are in place. But I will take this and contact out network guy to see if thereā€™s anything that might be causing this issue.

probably not necessary. I mis-interpreted the ā€œconnection refusedā€. As you just clarified to @lkoenig, this was probably from the rule being applied to unrelated hosts, so no firewall problem there.

1 Like

Could you share the error message? in your screenshot from yesterday, it is cut off at ā€œreasonā€ - just where the interesting part starts :wink: Wild guess: some trouble with the ssl certificate?

1 Like

@martin.schwarz
I keep seeing credential issue. I even tried the admin credentials for our vsphere but it isnā€™t working. Itā€™s a local account and Iā€™ve used both ā€˜userā€™ and ā€˜user@vsphere.localā€™ yet canā€™t seem to get through.

red

Please do on the command line in your site a ā€œcmk -D hostnameā€ now you see how the special agent is called. You should test this command manually. The vCenter special agent also has a command line option to write a trace file. This is very helpful for debugging.

1 Like

@andreas-doehler Hummā€¦ Ran this on the CheckMK server. Thoughts?

You should replace ā€œhostnameā€ with the name of your ESX-host when you run the command, so the same name you gave the host when you configured it in the checkmk webinterface.

2 Likes

@andreas-doehler @lkoenig
Have to be honest - It is positive to still do things that make me feel like an idiot. Keeps me grounded.

Hereā€™s the same command but with the hostname of the ESXi host

If you query a host you cannot use the vSphere user like ā€œcheckmk@vsphere.localā€ the host donā€™t know anything about the vSphere users.
For the host you need to create a local user on the hostsystem.

1 Like