Hello,
I have created a small Powershell script as per Local checks guide, put into the local folder, but its not appearing in the web. I tried to see the agent output via cmk command, but my result is not showing up. Running the script manually works well.
What is the correct way to troubleshoot this?
Thanks Leos
Tried with check_mk_agent.exe test and the result shows the info properly.
Hi,
Have you made sure, that the SYSTEM-User has enough permissions for everything you do in the local script?
check_mk_agent.exe test runs as your current user, so you’re in a different context permissionwise.
To test you can also change the user of the windows-service to your current user and try again from the checkmk-host via cmk -d hostname or telnet hostname 6556.
Cheers Jeronimo
Hi,
I have used psexec to switch under SYSTEM context and the data are shown correctly.
But from the core, nothing
Sorry, bad info. I tried with --check from core. If I try cmk -d I have the data there.
But then, the service is not discovered in web UI. What to do?
Cheers
The problem is the check-header.
You have <<<cobian_backup>>>, localchecks use the header local.
You don’t need to explicitely print out a header if you have your script in the local-folder though, so if you remove the line that prints out <<<cobian_backup>>>, then it should work fine.
Cheers Jeronimo
Output from my Core server. Its weird because I can see the result, but the two debug commands from the documentation shows 0 services found.
Thats weird! Such code is not in my script.
I had a cobian_backup plugin installed in the core, but it was removed. On this server, it was never used.
I have no idea where is the <<<cobian_backup>>> coming from now.
What’s the output if you run the script manually?
I have added local prefix to the code, the cobian_backup message is gone and its working now!
Thanks a lot!
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.