Piggyback entire agent

Hello,

I have the need to monitor a Linux host behind a Windows Server.
From what I read I need to use the piggyback mechanism so that the Windows Server will send data for the Linux host to.

Windows Agent is installed and registered to our Checkmk.
Linux Agent is installed to.
I managed to write a Powershell script that get the Linux agent output to a file and place it in the spool folder.

This is where the issue begin.
When I Rescan my Windows host, checkmk detect service for the Linux host and display warning about parsing (Parsing of section ps_lnx failed - please submit a crash report!).

A rescan of the Linux host find nothing.

My file in the spool folder looks like this :

<<<<linux-host>>>>
<<<local>>>
<<<check_mk>>>
... whole linux agent output
<<<<>>>>

What am I missing ?

thanks for the help

Could you use a hex editor to take a look at the spool file? I suspect there is a BOM in the first line or some wrong line feeds (we expect new line only).

Hi,

Thanks for your reply. You were right !
I had multiple problems with encoding and newlines.
I corrected everithing. Since I don’t have any problem on service discovery on the Windows Host.
However, Service Discovery isn’t working for the linux host.

I didn’t make a hostname translation rule as my linux host has the same name in the data and in the Cmk config.

Thanks for your help.

1 Like

Hi @Csauvaget

welcome to the forum! I am glad that Mattias’ suggestion worked for you.

Now, it would be awesome if you could mark his post as solution (using the little checkbox):

That way it’s easier to find for other’s that may experience a similar problem.

Thanks!

Hi @elias.voelker

thanks for your reply.

Unfortunately, this is a partial solution. As I still can’t discover services on the host.
As a new user I can’t upload files on this forum but if needed I can post agent debug outputs.

Please start a new thread on this completely different problem. In the new thread also show the Piggyback settings for both the host to be monitored and the host delivering Piggyback data: Is the host to be monitored in a way that Piggyback data is allowed or even expected? Is the host delivering Piggyback data allowed to do so?