Error message: custom scripts are not discovered in check_mk services
Hi, I have installed check_mk 2.0.0p23 (CFE) on monitoring server and downloaded check_mk_agent.solaris 2.0.0p23 version and configured by adding the necessary folders such as /usr/lib/check_mk_agent/local , /usr/lib/check_mk_agent/plugins , /etc/check_mk, /var/lib/check_mk_agent etc.,
I have added some custom scripts to my local folder i.e. /usr/lib/check_mk_agent/local with executable permission, but the same is not reflecting on the discovered services while other services are discovered and showing.
Can someone help here please? All my custom scripts for other Linux servers are pretty much showing.
I did not add the .pkg. I copied a check_mk_agent.solaris file to /usr/bin folder.
Could that be the reason? Should I add the .pkg file on all Solaris agents and try?
Agent folders I created are:
/usr/lib/check_mk_agent/local
/usr/lib/check_mk_agent/plugins
/etc/check_mk
/var/lib/check_mk_agent
Script to check Clearcase service running:
#!/bin/bash
status=$(/etc/init.d/clearcase status | grep “running”)
if [[ $status == “running” ]]; then
echo “0 “Clearcase Service” - Clearcase is running”
else
echo “2 “Clearcase Service” - Clearcase is NOT running”
fi
Hi @robin.gierse - Sorry for the late response. I was unavailable.
Locally when I run the script, it outputs the expected result. But when I run /usr/bin/check_mk_agent, I cannot see <> scripts in the output.
When I use service discovery from WATO, I cannot see the running local script.
Is there any other alternative approach to discover the scripts? The reason why I am writing a local script is because we need to monitor some services for which there is no plugin available and also we need to monitor some specific folders.
No, the rule set checks for a running process. So you could check, if the Clearcase program from your script is running, without needing a custom script. There is also a service discovery rule set, which checks for Linux services, which might serve you even better.
Also, I cannot help but recognize, that you did not share the permissions of the script.
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.