How to monitor Linux Servers with zabbix

Monitoring Linux Servers with zabbix

Installing the Zabbix Agent on a Linux Server

1. Before we install the agent, let’s start by setting up the host in Zabbix.

In the Zabbix web-interface, go to Configuration –> Hosts –> Create Host.

Let’s call our new host: Mail_Server
DNS name: [example dns name only]
IP address: [example ip address]
Port: 10050
Status: Not Monitored [We will change this after installing the agent]
Link with Template: Template_Linux

then Save.

Now go to Configuration –> Triggers –> Host: Mail_Server and disable all the triggers, otherwise they will trigger as soon as you enable the host.

2. Install the Zabbix-Agent on the Linux server that you want to monitor. Follow the steps to install agent on linux server:

# Download the source code


#  Create zabbix user and group

groupadd zabbix

useradd -c ‘Zabbix’ -d /home/zabbix -g zabbix -s /bin/bash zabbix

chown -R zabbix.zabbix /home/zabbix

# Untar the sources

tar -zxvf zabbix-1.1beta8.tar.gz

mv zabbix-1.1beta8 zabbix

cd zabbix

chown -R zabbix.zabbix .

# Configure compile and install the agent

./configure –prefix=/usr –with-mysql –with-net-snmp –enable-agent


make install

mkdir /etc/zabbix

cp misc/conf/zabbix_agentd.conf /etc/zabbix/

# Point to Zabbix server on the client machine config file

echo ‘Server=’ >> /etc/zabbix/zabbix_agentd.conf

# Prepare the rest of the system

echo ‘zabbix_agent 10050/tcp’ >> /etc/services

echo ‘zabbix_trap 10051/tcp’ >> /etc/services

# Prepare startup of zabbix client on bootup

cp /opt/zabbix/misc/init.d/redhat/zabbix_agentd_ctl /etc/init.d/zabbix_agentd

echo ‘# chkconfig: 345 95 95’ >> /etc/init.d/zabbix_agentd

echo ‘# description: Zabbix Agentd’ >> /etc/init.d/zabbix_agentd

echo ‘BASEDIR=/usr’ >> /etc/init.d/zabbix_agentd

chkconfig zabbix_agentd on

# Start the zabbix services

service  zabbix_agentd start


About Manish Jha

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Monitoring. Bookmark the permalink.

One Response to How to monitor Linux Servers with zabbix

  1. Pingback: The National Security Agency’s Guide to Securing a Linux Server | Lost Packets

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s