Create local checks on the checkmk Site

hello,

i am monitoring my checkmk site with the installed bash agent on it.
i would like to create a local check on the checkmk site itself but because i have a checkmk enterprise free edition i’m not able to create a file under the LocalDirectory: /usr/lib/check_mk_agent/local.

is there a possibility to do so?

thank you in advance.

The agent has absolute nothing to do with the edition you are running. The agents are all the same in all editions.
If, for whatever reason the dir is not there, simply create it manually

1 Like

i dont know if you now it, but in the enterprise free edition the root user is deactivated and can not be activated.

OMD[MON01]:/usr/lib/check_mk_agent/local$ ll
total 4
-rwxrwxr-x 1 root root 1094 Jan 13  2018 cma_user_cgroup_memory*
OMD[MON01]:/usr/lib/check_mk_agent/local$
OMD[MON01]:/usr/lib/check_mk_agent/local$
OMD[MON01]:/usr/lib/check_mk_agent/local$
OMD[MON01]:/usr/lib/check_mk_agent/local$
OMD[MON01]:/usr/lib/check_mk_agent/local$
OMD[MON01]:/usr/lib/check_mk_agent/local$ touch mynewlocalcheck.sh
touch: cannot touch 'mynewlocalcheck.sh': Permission denied
OMD[MON01]:/usr/lib/check_mk_agent/local$ sudo touch mynewlocalcheck.sh
sudo: unable to resolve host cma: Name or service not known
[sudo] password for MON01:
MON01 is not in the sudoers file.  This incident will be reported.
OMD[MON01]:/usr/lib/check_mk_agent/local$

You are talking about the appliance demo, right? The “normal” free edition (.cfe) is just an application package for your Linux system which does (of course!) not fiddle with your system’s root user in any way.

what i understood is the appliance root user, has nothing to do with the checkmk site Root-User.
if it’s so : how can i enable the root user on my site to access the /usr/lib/check_mk_agent/local:
the first time i created my site… i never had to create a root user… it was only the checkmk site user.
thank you

Just wanted to solve that confusion between “free edition” and “no root access” which is not true per se, just in the appliance.

I’m not really using the appliance myself, so I might be wrong. But since you have the Enterprise features available anyway, perhaps you could use the Agent bakery to include your local plugin.

thank you for the explination - yes i got it now.

deploying agents… or installing new packages is also not possible with my normal checkmk site user… i need root privileges. iam able to monitor the site itself because there was already an agent installed on it.

OMD[MON01]:/usr/bin$
OMD[MON01]:/usr/bin$
OMD[MON01]:/usr/bin$ ll | grep check_mk_agent
-rwxrwxr-x 1 root root       63653 Jun 21 17:59 check_mk_agent*

as you see he is owned by root which i never used before.

please have a look at the docs:

(section 6.4. Activating root access via SSH)

1 Like

already tried it out.
image

Well, that sounds definite, sorry.

If you have some experience in Linux system administration, you might be better off installing Checkmk on a normal Linux system instead of using the appliance.

3 Likes

Or boot from CD and hack it :wink:

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.