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

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

The Zabbix Agent SitePkg contains the agent programs used by Zabbix clients. It leaves out the much larger server programs that are only needed on the Zabbix server.
The recommended agent program is the daemon, zabbix_agentd. Its default config file is /usr/site/zabbix_agent-VERSION/etc/zabbix_agentd.conf. Everything else is specified in the config file.

No Format

# Grab zabbix_agent and its required packages:
divsite -l sandmant zabbix_agent

Verify/add Zabbix user/groups:

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 

...

/zabbix/zabbix_agentd.conf

...

No Format

mkdir /etc/opt/zabbix
cp -p /usr/site/zabbix_agent/share/etc
sed -i -e "s/Hostname=Zabbix\ server/\#Hostname=$(hostname)/" /etc/zabbix/zabbix_agentd.conf /etc/opt/zabbix


Create local var directory for log and pid files:Start Service and Check Status

No Format

mkdir /varsbin/opt/zabbix
chown -R zabbix:zabbix /var/opt/zabbix
chkconfig zabbix-agent on
/sbin/service zabbix-agent start
/sbin/service zabbix-agent status


Verify IPTABLES for Zabbix connections

Be sure /etc/sysconfig/iptables Be sure 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.18). MDI systems should already have this.

A simple example is below:

No Format
No Format

## 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

Install/activate init script:

No Format

cp -pi /usr/site/zabbix_agent/share/install/init/zabbix_agent /etc/init.d/zabbix_agent
chkconfig zabbix_agent on
chkconfig --list zabbix_agent

Update services file:

No Format

cat /usr/site/zabbix_agent/share/install/services/zabbix >> /etc/services

Fire it up:

...

 

 

...