How to Monitor Your Linux Server with Checkmk

Embedded Yuexiang Garden 2022-09-23 09:32:58 阅读数:317



Checkmk 是用于监控 Linux One of the most used and user-friendly applications for servers.It can be checked with yours Linux The server state of the server connection、负载、网络状态、应用程序、数据库、Cloud server load、Storage and other IoT devices.Checkmk 工具在 Linux work in a mixed manner.在 Linux After installing the tool on the machine,您可以通过 Web Browser easy access to all configuration and dashboard tabs.

Unlike other server monitoring tools,Checkmk Tools do not take up Linux a lot of system resources.在 Linux 上安装和使用 Checkmk Tools are simple and straightforward Linux.如果您是系统管理员,Then you must try this tool and enjoy all the features and plugins that can reduce the workload a little bit.

带有 Checkmk 的 Linux 服务器

如果您有 Linux Experience with servers and a small amount of experience,Then you probably already know CheckmkNagios One of the basic functions of server tools.Checkmk for Linux 工具是用 C++ 和 Python 编程语言编写的,This makes the application easy to configure on all major systems,And won't overwhelm your system with too much weight.

CheckmkHas a robust and easily accessible systemUI,All server data can be truly logged and retainedLinux服务器的日志.您可以使用 Checkmk 工具从Linux The server generates the report、Monitor your infrastructure and configure your extensions.在这篇文章中,我们将了解如何在 Linux 上安装和使用 Checkmk tool to check the server.

在 Linux 上安装 Checkmk

首先我们需要在我们的 Linux Install signed on your system Checkmk tool and configure it.在这里,我将描述 CheckmkDebianUbuntu 和基于 Red-Hat 的 Linux The installation method on the distribution for monitoring the server.如果您使用任何其他 Linux 发行版,请查看 Checkmk Installation guide on the website.

在 Ubuntu/Debian 上安装 Checkmk

DebianUbuntu 发行版中,我们将使用wget 命令下载 CheckmkDebian package to download .deb 包.Checkmk Linux The compiled files for the server tools will be stored in the home directory.



现在,在具有 root 权限的终端 shell 上运行以下 dpkgaptitude 命令,以在您的 Debian Linux 上完成 Checkmk 安装过程.


sudo dpkg -i *.deb
sudo apt-get install -f

在 Red hat/Fedora Linux 上安装 Checkmk

如果您是 Red HatFedora workstation user,This method is for you.要在您的 Linux 上获取 Checkmk 服务器工具,首先,You need to be on your machine Linux Download the latest of the extra packages EPEL 版本.

现在,在 shell Run the below mentioned command on your Linux 系统上启用 Checkmk 存储库.

# subscription-manager repos --enable "codeready-builder-for-rhel-8-x86_64-rpms"

如果您是基于 DNF 的用户,You may also need to be in the terminal shell 上执行以下命令.

# dnf config-manager --set-enabled powertools

安装 EPEL and after setting up the repository,We now need to allow the firewall ports on the system.您可以在 shell Run the following commands on to set up the firewall and reload the firewall daemon on the system.请确保在使用 Checkmk 加载 Linux Set up a firewall daemon before the server.

# setsebool -P httpd_can_network_connect 1
# firewall-cmd --zone=public --add-service=http
--permanent # firewall-cmd --reload

You can get it from the repository now Linux 系统上的 RPM 包.以下 SCP(安全复制)The command will get you there Linux obtained on the file system Checkmk 工具的 RPM 包.

# scp check-mk-raw-2.0.0p3-el8-38.x86_64.rpm

现在,依次执行 wgetrpm 导入命令,imported into the system Checkmk 包的公钥.

# wget
# rpm --import Check_MK-pubkey.gpg

最后,您现在可以通过 shell Verify the following commands on Linux 系统上的 Checkmk 包.

# rpm -K check-mk-raw-2.0.0p3-el8-38.x86_64.rpm
# yum install check-mk-raw-2.0.0p3-el8-38.x86_64.rpm

您现在可以通过omd命令检查 Checkmk 的版本.

# omd 版本

Create a project to test Checkmk

到目前为止,我们已经了解了如何在 Linux 上安装 Checkmk 工具,Time to test the tool on our server.为了使用 Checkmk 检查 Linux 服务器,We will create a demo project and run it on the system.You can now for yours Linux The server creates a test run project,to monitor the server status and pass the given below OMD 命令检查 Checkmk Whether the tool is running on your system.

sudo omd 创建 tr_test
sudo omd 开始 tr_test

成功创建项目后,我们现在可以从 Web 浏览器访问 Checkmk 仪表板.

在 Linux 上加载 Checkmk Web GUI

要在 Linux 上访问 Checkmk GUI-based system administration panel for the tool,You need to load the test project you created Web address or server address.就我而言,The address mentioned below will be the URL of the test project.


After the server is loaded successfully,You will need to log in with your login credentials.如果您还记得,You are with us Linux 机器上安装 Checkmk The login credentials were created while the server monitoring tool was in use.如果您忘记了它,您可以在htpasswd etc/htpasswd cmkadmin文件中找到它.

when you log in to the test server,You will see a nice dashboard,It shows all control panels、主机详细信息、监视器、设置、User section and others Checkmk 菜单.在这个阶段,We have not added any hosts to this server.

使用 Checkmk Add new hosts to Linux 服务器

在 Linux successfully logged in Checkmk After the server monitoring tool,You can now add new hosts.By clicking the Settings button,The Host Add menu will be found in the left column.After providing a valid host address,You can now use the following wget 命令进入终端 shell 加载主机.

wget <HOSTURL>

最后,Via the command mentioned below in yours Linux 系统上安装 Checkmk Server monitoring agent.这将允许您在 Linux The host details are loaded on the machine.

sudo dpkg -i check-mk-agent_2.0.0p9-1_all.dpkg


在整篇文章中,我们了解了如何在 Linux Install and get started Checkmk 工具.使用 Checkmk 工具检查 Linux Servers are more convenient.使用 Checkmk监视和检查Linux Servers are fun,Because it shows all the necessary data you might need to see.如果您是 Checkmk 的新手,请耐心等待.It may take a while to become familiar with the user interface.

copyright:author[Embedded Yuexiang Garden],Please bring the original link to reprint, thank you.