Vsphere hostname translation intermittent / not working

CMK version: raw 1.6.0p12
OS version: RHEL 7.9

Error message: n/a

One of my colleagues configured check_mk to pull data from vsphere, using the ‘piggyback’ mechanism.

The hostname translation config was set to ‘drop domain part’, but the piggyback ‘hosts’ disappeared after a while and then new hosts appeared with fqdn in their host ‘name’, and the ‘rewritten’ hosts go to state ‘UNKN’.

Can someone help me work out what’s going wrong?

I was excited to introduce check_mk to a new team, but it looks terrible when hosts keep ‘disappearing’.

Ideally I’d like to fix this so it works consistently. But if I can’t…

Should I just turn off piggyback and use only the check_mk agent?

Can you still get vsphere metrics about datastores etc without the piggyback host data?

Thanks!

Hi @subflux and welcome to the community!
You are probably just misunderstanding the piggyback translation mechanism.
It works from the point of view of the Checkmk Host object.
Consider this:

Hostname in vCenter: host.fqdn
Hostname in Checkmk: host
Piggyback translation: Drop domain part

Hostname in vCenter: host
Hostname in Checkmk: host.fqdn
Piggyback translation: Regex (adding the ‘.fqdn’ part)

I get confused about this myself sometimes, so sometimes you just have to test the behavior.
I hope I could give you a hint where to look.

Hi Robin,

I appreciate the comment - my issue is that it -did- seem to work for some time. Then, seemingly without cause, the hosts with a fqdn started appearing as hosts, and the hosts (post translation) without the fqdn were shown as status: unkown. (They previously were acting like normal hosts).

This makes me suspicious. If nothing changed, there is no reason the hosts would vanish. This feature is working stable for years in countless environments. And from my experience when someone says ‘I did nothing’ or ‘Nothing changed’, guess what actually happened? :wink:

But taking another look at your version information: You might want to update your environment, as it is really old. Getting it up-to-date would fix any possibly existing bugs.
After that, one can closer into the issue.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.