Installing the Check_MK Agent on CentOS/RHEL -- Manual Install

Step 1 : Download and uncompress the latest version of check_mk agent.

The check_mk agent for Linux consists of only two files : a shell script called 'check_mk_agent.linux' and a configuration file for 'xinetd.conf'. They both can be found in the downloaded archive.

Example :
# cd /tmp
# wget
# tar -xvzf check_mk-1.1.12p7.tar.gz

Step 2 : Installing 'xinetd'.

Make sure 'xinetd' is installed
# rpm -qa | grep -i xinetd
If 'xinetd' is not installed then install it.
# yum install xinetd
Step 3 : Copy the files and give the execute permissions for 'check_mk_agent'.
# cd /tmp/check_mk-x.x.x
# tar -xvzf agents.tar.gz
# cp check_mk_agent.linux /usr/bin/check_mk_agent
# cp xinetd.conf /etc/xinetd.d/check_mk
# chmod +x /usr/bin/check_mk_agent

Step 4 : Set the IP address of the monitoring server.

Set the IP in '/etc/xinetd.d/check_mk' file.
Add the IP to '/etc/hosts.allow'.
"check_mk_agent : IP_OF_MONITORING_SERVER"

Step 5 : Reload 'xinetd'.
# service xinetd reload
In case if 'xinetd' has just been installed :
# service xinetd stop && service xinetd start

Step 6 : Set the 'xinetd' to start at boot.
# chkconfig xinetd on

Step 7 : Check that 'xinetd' is listening to port 6556.
# netstat -lpn | grep 6556
Example :
# netstat -lpn | grep 6556
tcp 0 0 :::6556 :::* LISTEN 28273/xinetd

Step 8 : Add the rule to IPTABLES, if you use the firewall.
# vi /etc/sysconfig/iptables
Append the following line before the REJECT line, to open port 6556.
# iptables -I INPUT -p tcp --dport 6556 -j ACCEPT
Save and close the file. Restart the firewall.
# service iptables restart

HowTo : Disable The Iptables Firewall in CentOS/RHEL

Step 9 : Test the connection.

If the agent is running properly, you should be able to connect to your Linux host.

Test the connection locally.
# telnet localhost 6556
Version: 1.1.12p7
AgentOS: linux

Test the connection remotely from your monitoring server.
# telnet 6556
Version: 1.1.12p7
AgentOS: linux