Execute Checks on Linux maschines without Agent?

i only have the inetd directory. would u like to send me the config file thank you

Do not use any inetd if you want to execute the agent script via restricted SSH as stated in the beginning:

  1. Install the agent script to /usr/bin/check_mk_agent, mode 0755 or 0500
  2. Configure an SSH key for restricted root login (one command only)

That’s all.

i do not use inetd and i did not create anything…yet… am trying to get it through the bash agent first…
so far everything worked fine … omd[mysite]: ssh root@remoteserverip is executing the bash script and closing the connection … i added the remoteserver in the GUI with its hostname and the ip adress and configured the checkmk agent to API integrations ifconfigured, else Checkmk agent


do i have to register the shell agent too like the normal agent?

No, you do not have to register. You have to fill in “Individual program call instead of agent access”, 6.4 (deep link). The macro $HOSTNAME$ is used that you can create a rule that matches all hosts with SSH only access, but for your first host you can just specify root@IP-address.

1 Like

As mentioned by mschlenker, inted is complementary to the ssh option. Please use either way.

Add below to according files:

/etc/services
check_mk        6556/tcp        # Check_MK monitoring agent
/etc/inetd.conf
check_mk        stream  tcp     nowait  root    /usr/bin/check_mk_agent
1 Like

thanks. it works now fine. i also created the /etc/check_mk/mrpe.cfg on the remote machine and a simple bash script under /usr/local/bin and script is shown also with other services in the GUI.

1 Like

Great. I just learned we probably should create some more step by step instructions for rather common tasks like this one (“We need to monitor with minimal software installation and no new open port”). Especially for Checkmk newbies pulling smaller sections from the content of two articles is not ideal.

2 Likes

that will be very helpfull… because to fulfill my task i had like to jump from one page to the other one …and read stuff that has not really something to do with my task… which make it for checkmk newbies a bit difficult… it would be so much easier if there is a step by step documentation for this kind of tasks.

Hello one question …

is it also possible to bake the Script agent?

i would like to use the “text logifle rule” to monitor some logifles.
but it seems the agent bakery is creating baked normal agents. does checkmk apply the changes of bakering also to the bash script agent? if yes were can i download it?

thanks in advanced

Hello, you need the agent plugin mk_logwatch.
In agent bakery you have the rule Text logfiles (Linux, Windows) to deploy the plugin.

BR

MF

so i dont have to re"install" the Script Agent after making the bakery agent?

what i did is : i download the mk_logwatch.py plugin , placed it in usr/lib/check_mk_agent/plugins and configure the “text logfiles rule” but nothing is shown in the discovery.

if i have to deploy (install) the Script Agent once again the question is where can i find the new agent script with the text logfiles rule in it? or is it always the same agent script?

my understanding is :
the default agents are directly under /omd/sites/sitename/share/check_mk/agents
and when i bake the agent… checkmk create a new folder with new agents…like:
/omd/sites/checkmkmo/share/check_mk/agents/BakedAgentsomthing. and unter this folder i can download the new bash script agent with the logwatch rule.

Hello,

I would recommend that you first read the documentation to understand how checkmk is working.

If you still have questions, feel free to start a new thread. This one you closed already and its a different Topic

BR

MF

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.