Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Install and Enable EPEL Repo:

No Format
yum -y install epel-release

This installs files in /etc/yum.repos.d/ and enables the epel repository by default.

On some servers, leaving EPEL enabled may not be in keeping with best practices to keep as close to the distribution rpm set as possible, so you can set the EPEL repository to be disabled by default.

No Format
perl -npi -e 's/enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo

 

Installing Zabbix Agent

No Format
yum -y install zabbix22-agent

or if you have EPEL disabled:

No Format
yum --enablerepo=epel -y install zabbix20-agent


Configure Zabbix Agent to use monitor-pdc.rice.edu (10.143.195.18)

No Format
sed -i -e 's/Server=127.0.0.1/Server=10.143.195.18/' /etc/zabbix/zabbix_agentd.conf
sed -i -e "s/Hostname=Zabbix\ server/\#Hostname=$(hostname)/" /etc/zabbix/zabbix_agentd.conf


Start Service and Check Status

No Format
/sbin/chkconfig zabbix-agent on
/sbin/service zabbix-agent start
/sbin/service zabbix-agent status

Installing the Linux Zabbix Agent, getting the files from monitor.rice.edu

For servers in a closed network, the easiest way to install the Zabbix agent is probably
to download the files from monitor.rice.edu to a local workstation, then copy them over to
/tmp on your server and install from there.
This example assumes we downloaded the files and then copied to EA12.rice.edu:/tmp/

This installs just the Linux agent program; zabbix_agentd for monitoring. The default
config file will be placed at /etc/opt/zabbix/zabbix_agentd.conf. Everything else is specified
in the config file.

Table of Contents
maxLevel3

Download zabbix agent and files from monitor.rice.edu

From any section page on monitor
click the tab on the bottom labeled "Get the zabbix agents here"

  • Select from these options, and download the appropriate files
    No Format
    
    Linux agent
    RH5 32bit statically linked agent
    RH5 64bit statically linked agent
    Start/Stop script
    Win32 agent
    Win64 agent
    Config file 
    
    
  • Copy all files to client you are installing agent on, into /tmp/ZABBIX/

Setup Zabbix user/groups on the new client

You will need to sudo to root to do the following:

  • Verify/add Zabbix user/groups on Linux client:
No Format

egrep '^zabbix:' /etc/passwd >/dev/null || cat - >> /etc/passwd << EOF
zabbix:x:906:906:Zabbix User:/home/zabbix:/bin/bash
EOF
egrep '^zabbix:' /etc/group >/dev/null || cat - >> /etc/group << EOF
zabbix:x:906:
EOF
pwconv 
  • Setup Zabbix config file

Create a local configuration directory ONLY if you plan on customizing your zabbix_agentd.conf file. The default init script checks for /etc/opt/zabbix/zabbix_agentd.conf, and if found this file will be used instead of the default config file.

No Format

mkdir /etc/opt/zabbix
cp -p /tmp/ZABBIX/zabbix_agentd.conf /etc/opt/zabbix
  • Install/activate Zabbix init script:
No Format

cp -pi /tmp/ZABBIX/zabbix_agent_init /etc/init.d/zabbix_agent
chkconfig zabbix_agent on
chkconfig --list zabbix_agent
  • Create local var directory for log and pid files:
No Format

mkdir /var/opt/zabbix
chown -R zabbix:zabbix /var/opt/zabbix


Verify IPTABLES for Zabbix connections

Be sure IPTABLES /etc/sysconfig/iptables is updated to accept connections on port 10050, from monitor-pdc.rice.edu (10.129143.92195.52. May be already
done with sitedisk iptables when your system was first installed. Check for a line allowing
connections from 10.129.92.52 (monitor.rice.edu) to port 10050 on client.18). MDI systems should already have this.

A simple example is below:

No Format
No Format

## Add this IF needed to iptables
## accept Zabbix agent connections on port 10050, from zabbix server
## at 10.129.92.52
-A INPUT -p tcp -m tcp --dport 10050 -s 10.129143.92195.5218/32 -j ACCEPT
  • Update /etc/services file if necessary:

This may have already been added to /etc/services at initial install. Check for and
add if necessary.

No Format

## Zabbix services
zabbix_agent            10050/tcp               # Zabbix Agent
zabbix_trap             10051/tcp               # Zabbix Trap
#

Start zabbix_agent on client

Fire it up:

No Format

/etc/init.d/zabbix_agent start

 

 

...