Custom scripts in local folder for Solaris not discovered in check_mk services

CMK version: 2.0.0p23
OS version: solaris

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 am still looking for a solution. Any help here?

Why are you creating the folders manually ?

If you just the .pkg on your Solaris server, it should create all of them automatically.
Have you tried running the local check manually ?

1 Like

Please share a listing of the agent folders and the content of one of the scripts.

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:

Script to check Clearcase service running:


status=$(/etc/init.d/clearcase status | grep ‚Äúrunning‚ÄĚ)
if [[ $status == ‚Äúrunning‚ÄĚ ]]; then
echo ‚Äú0 ‚ÄúClearcase Service‚ÄĚ - Clearcase is running‚ÄĚ
echo ‚Äú2 ‚ÄúClearcase Service‚ÄĚ - Clearcase is NOT running‚ÄĚ

I would install the agent via the .pkg file, as @davidwayne suggested.

Apart from that: What happens if you run your script manually, as @davidwayne also suggested?

Lastly: Why not use the service or process discovery instead of a local script?

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.

What are the permissions of the script? They need to allow execution of the script.

If you search for ‚Äėprocess discovery‚Äô in the Setup, it might get clearer, what I am suggesting.

@robin.gierse So I should add the script as below??


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.