Hi @robin.gierse, thanks for your reply. I’m not sure if I’m being a bit stupid or what, so let me describe in more detail what happens if I follow your instructions:
First, I cleaned up totally (‘mkp remove uname; mkp remove hello_world; rm /usr/lib/check_mk_agent/local/*’; navigate to Monitor–>All Hosts–>chifferi–>Host (menu)–>Service Configuration–>Fix All to fix the two vanished services).
Instruction #1:
chifferi# omd su default
OMD[default]:~$ wget -q https://exchange.checkmk.com/packages/hello-world/687/hello_world-0.1.3.mkp
OMD[default]:~$ mkp install hello_world-0.1.3.mkp
OMD[default]:~$
I went to my main dashboard and wait for an alert for host chifferi for ‘1 unmonitored service’ but it does not come. Perhaps that’s okay; I still have three instructions to go
Instruction #2:
I navigated to Monitor–>All Hosts–>chifferi–>Host (menu)–>Service Configuration. There are ‘No pending changes’, so I can’t Activate Changes.
Instruction #3:
I skipped this because I’ve installed the plugin on the Checkmk server itself, which Checkmk is monitoring. (But I do understand that if I was trying to monitor this service on a remote host then I would need to do it.)
Instruction #4:
I don’t find anything like ‘Discover services’ on the ‘Services of host chifferi’ screen. The nearest is Hosts (menu)–>Services Configuration and then Actions (menu)–>Remove Old And Find New, which causes one activatable change:
2021-11-29 19:31:27 alexis Refreshed check configuration of host ‘chifferi’
So I activate that and then go back to the main dashboard and wait for new services to be detected. But again they are not.
A bit more research:
If I run check-mk-agent directly then it is clear it is not running the new check:
chifferi# /usr/bin/check_mk_agent | grep -i hello | grep -v grep
chifferi#
(My ‘grep -v grep’ is necessary because Checkmk is installed in an LXC container and so the ‘grep -i hello’ process would be displayed by check_mk_agent otherwise.)
But if I make the symlink (this time I’ll symlink the plugin to the plugin directory, which is probably more correct than symlinking it to the checks directory) and rerun check_mk_agent the agent now calls the plugin:
chifferi# /usr/bin/check_mk_agent | grep -i hello | grep -v grep
<<<hello_world>>>
hello_world 32.24537433085952
chifferi#
Now I go back to the main dashboard but, as before, I still don’t get an alert for host chifferi for ‘1 unmonitored service’.
So now I repeat your instruction #2 then ‘Hello World’ is now listed as an undecided service and I can click ‘Fix All’ to fix this and now everything works.
So it seems to me the instructions should be:
- install the plugin
- symlink it to where check_mk_agent will find it
- discover services
Any assistance you or anyone else can give would be appreciated! Thanks!
Alexis