BUG: piggyback names with spaces are completely ignored

CMK version:
2.3.0
OS version:
Docker container
Error message:
no error

Some output from processing host data with piggyback data included.

Transition PiggybackSectionParser -> NOOPParser
PiggybackMarker(hostname='NVIDIA-DLS-3') / Transition NOOPParser -> PiggybackParser
PiggybackMarker(hostname='NVIDIA-DLS-3') SectionMarker(name=SectionName('prism_vm'), cached=None, encoding='utf-8', nostrip=False, persist=None, separator='\x00') / Transition PiggybackParser -> PiggybackSectionParser
Transition PiggybackSectionParser -> NOOPParser
Transition PiggybackIgnoreParser -> NOOPParser
PiggybackMarker(hostname='EX2016') / Transition NOOPParser -> PiggybackParser
PiggybackMarker(hostname='EX2016') SectionMarker(name=SectionName('prism_vm'), cached=None, encoding='utf-8', nostrip=False, persist=None, separator='\x00') / Transition PiggybackParser -> PiggybackSectionParser
Transition PiggybackSectionParser -> NOOPParser

Some host data on 2.2

toring piggyback data for: 'NVIDIA-DLS-3'
Trying to acquire lock on /omd/sites/cmk/tmp/check_mk/piggyback/NVIDIA-DLS-3/NTX
Got lock on /omd/sites/cmk/tmp/check_mk/piggyback/NVIDIA-DLS-3/NTX
Releasing lock on /omd/sites/cmk/tmp/check_mk/piggyback/NVIDIA-DLS-3/NTX
Released lock on /omd/sites/cmk/tmp/check_mk/piggyback/NVIDIA-DLS-3/NTX
Storing piggyback data for: 'QUIRM_-_WSUS'
Trying to acquire lock on /omd/sites/cmk/tmp/check_mk/piggyback/QUIRM_-_WSUS/NTX
Got lock on /omd/sites/cmk/tmp/check_mk/piggyback/QUIRM_-_WSUS/NTX
Releasing lock on /omd/sites/cmk/tmp/check_mk/piggyback/QUIRM_-_WSUS/NTX
Released lock on /omd/sites/cmk/tmp/check_mk/piggyback/QUIRM_-_WSUS/NTX
Storing piggyback data for: 'EX2016'
Trying to acquire lock on /omd/sites/cmk/tmp/check_mk/piggyback/EX2016/NTX
Got lock on /omd/sites/cmk/tmp/check_mk/piggyback/EX2016/NTX
Releasing lock on /omd/sites/cmk/tmp/check_mk/piggyback/EX2016/NTX
Released lock on /omd/sites/cmk/tmp/check_mk/piggyback/EX2016/NTX

Also inside the tmp/check_mk/piggyback no data can be found.
Header inside the agent output looks like this.

<<<<Quirm - WSUS>>>>
<<<prism_vm:sep(0)>>>

The error also happens if you have no piggyback hostname translation rule active.
In my example was the rule set to uppercase for all names.

2 Likes

We are on it. :eyes:
And to fill the 20 character minimum, I will say, we already have an idea where to look.

1 Like

We are validating the host names now, and ignoring all invalid names. We had “names” like ".." and other nonsense in the past, which are not very good file names :slight_smile: .
But it should be ok if your translation changes it into a valid name, I think. Is that the case?

The problem is that before 2.3 spaces where replaced with underscore. Now these names are completely ignored and no translation rule can be applied.

I wasn’t aware of that; that would be an incompatible change I guess.
But you can still apply translations:


This works for me (<<<<karl - heinz>>>> → HostName("karl_heinz"))

Looks like this was removed by accident. However, I think it actually is better. We should not on one hand allow the configuration of translations, and then on the other hand do some translations automagically.
So I think probably I’ll just add an incompatible Werk.
What about the translation rule? It seems somewhat insufficient to me – but these things are sometimes hard to judge from a developers perspective. Is it practical to configure needed translations? Or is something missing?

I can only test today at the evening. But the regex will not work for more complex names.
How do we handle an name like this.

<<<<HOST ABC DEF>>>>

With unknown numbers of spaces. A option like on ESX special agent “replace space with underscore” would be good.

Yeah, I thought you might say that.

I’ll definitively talk to product management and the UX team about this.
We can extend the ruleset to give users more options – from a technical (dev) perspective, that is easy. But I want to be careful with that, and only add a small number of options that give the most benefit.

What are common requirements? Can you give more concrete examples?

The normal situation is, that no one knows what names you get as piggyback names.
Inside VMWare nearly everything is allowed for the naming, i think that was also the reason for the extra options inside the special agent.
That is the same for backup inside Veeam or like my example Nutanix.
From my point of view it would be better to have the same processing for the names for all sources of piggyback data. That also means the special agent reports the names as they are inside the data source.

Why not have the same behavior as before or inside some classic Monitoring Tools?
Replace invalid characters with underscore or remove invalid characters completely.
But not ignore the data.

3 Likes

We agree. So we’ll simply treat this as what it is: a regression. I’ll fix it.

There you go. Have a nice weekend! :wave:

2 Likes