Logwatch dont find logfiles in Windows OS if agent called from remote

Its even worth, I started logwatch in a cmd as system user and all works fine.

My logwatch.cfg:

C:\temp\test.txt
 W WARNING
 C CRITICAL
 
CLUSTER monpilot
 10.20.30.40
 10.20.30.41
C:\ProgramData\checkmk\agent\plugins>whoami
nt authority\system

C:\ProgramData\checkmk\agent\plugins>mk_logwatch.exe -vvv
<<<logwatch>>>
[[[C:\temp\test.txt]]]

If I do it with telnet I get only <<>>
So I did another test and wrote a little test plugin:

@echo off
echo ^<^<^<test^>^>^>
more c:\temp\test.txt

Agent output from telnet:

<<<logwatch>>>
<<<test>>>
WARNING
CRITICAL
Test

Both way demonstrate that system account has access to the files.

Finally I found out that the problem comes from the CLUSTER option. If I complete remove that it works. IP´s are correct set.
Will do further investigations and finally open a ticket.

thanks

Michael

1 Like