CheckMK Remote Ping via Agent

Hey,

I was wondering if anyone managed to setup a remote ping via agents. For example I’ve got a jumpbox with CheckMK agent install (Ubuntu 24.04) which I would like to ping my Core Router from. Is there anyway that this can be done as when trying to add the core to CheckMK it pings from the server not the jump box.

Hi Aydan,

you can do that with the Feature MRPE. But for that, you need to deploy the check_icmp Nagios Plugin to the remote Server, then you can set up a Service name and the Path with Params to check_icmp in /etc/checkmk/mrpe.cfg. And Checkmk then will Discover that Ping.

Oh awesome, do you by any chance have a guide that shows the basics of setting this up? Sorry not used MRPE before :slight_smile:

Don’t worry, thats easy to solve.
It’s here point 9:

/etc/check_mk/mrpe.cfg

Foo_Application /usr/local/bin/check_foo -w 60 -c 80
Bar_Extender /usr/local/bin/check_bar -s -X -w 4:5

The check_icmp you will find in your site:
~/lib/nagios/plugins/check_icmp

so copy it to the server, create the mrpe.cfg like:

PING /your/path/check_icmp -H yourhost

1 Like

Hi @WhyAydan,

I built myself a simple local check for this use case. Worked pretty good and it was quite easy. MRPE is also another (maybe better) solution for this. :slight_smile:

Regards
Norm

For anyone who comes across this, this is how I resolved it:

On the side with the agent run the following:

sudo apt-get update
sudo apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext
git clone https://github.com/nagios-plugins/nagios-plugins.git
cd nagios-plugins
sudo ./tools/setup
sudo ./configure
sudo make
sudo make install
sudo nano /etc/check_mk/mrpe.cfg

Then you enter the following into the mrpe.cfg

ServiceName /usr/local/nagios/libexec/check_icmp -H IP

For my example it would be:

Core /usr/local/nagios/libexec/check_icmp -H 172.16.0.1

Now that you have saved that file you can go back to the CheckMK server and discover services on the host you setup as the jumpbox. It will then show you the new service created under the name you picked. So for my example it will be Core.

1 Like

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.