You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 28 Next »

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/ZABBIX/ on your server and install from there.
This example assumes we downloaded the files and then copied to EA12.rice.edu:/tmp/ZABBIX/

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.

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

Get the appropriate version of zabbix_agentd binary:

Linux agent/
RH4 32bit dynamically linked agent/ (1.6.5)
RH5 32bit statically linked agent/
RH5 64bit statically linked agent/
And for each type, get the:
- Start/Stop script (zabbix_agentd_ctl )
- config files (zabbix_agentd.conf )
Win32 agent/
Win64 agent/

Or, scp the files desired from monitor

[smcclure@fms09 MONITOR]$ scp monitor.rice.edu:/usr/site/zabbix/public_html/agents/RH4_32bit/zabbix_agentd .

[smcclure@fms09 MONITOR]$  scp monitor.rice.edu:/usr/site/zabbix/public_html/agents/linux/zabbix_agentd.conf .

[smcclure@fms09 MONITOR]$ scp monitor.rice.edu:/usr/site/zabbix/public_html/agents/linux/zabbix_agentd_ctl .

Copy zabbix files from workstation or open client, to your CLOSED client

  • make /tmp/ZABBIX on (closed) client
    mkdir /tmp/ZABBIX

Copy all files to the (closed) client you are installing agent on, into /tmp/ZABBIX/

[smcclure@fms09 ZABBIX]$ scp -p * fms04.rice.edu:/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

This may already have been done as part of the initial install. Verify and do setup
if necessary.

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 

Do Local setup and modifications for Zabbix

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

Make home dir for zabbix

Wherever the local admins accounts are, make one for Zabbix. Copy zabbix_agentd
binary into home.

mkdir /home/zabbix 
cp -p /tmp/ZABBIX/zabbix_x64_static_agentd /home/zabbix/zabbix_agentd
chmod ugo+x /home/zabbix/zabbix_agentd
chown -R zabbix:zabbix /home/zabbix

*Setup local Zabbix config directory and file

Create a local configuration directory and copy the conf file there. The default init script checks for /etc/opt/zabbix/zabbix_agentd.conf at startup.

mkdir /etc/opt/zabbix
cp -p /tmp/ZABBIX/zabbix_agentd.conf /etc/opt/zabbix/
chown -R zabbix:zabbix /etc/opt/zabbix

Create local var directory for Zabbix log and pid files

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

Verify IPTABLES for Zabbix connections

Be sure IPTABLES is updated to accept connections on port 10050, from 10.129.92.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.

## Add this IF needed to /etc/sysconfig/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.129.92.52/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.

Update services file:

cat - >> /etc/services << EOF
## Zabbix services
zabbix_agent            10050/tcp               # Zabbix Agent
zabbix_trap             10051/tcp               # Zabbix Trap
##
EOF

Install/activate Zabbix init script

cp -pi /tmp/ZABBIX/zabbix_agent_init /etc/init.d/zabbix_agent
chown root:root /etc/init.d/zabbix_agent
chmod ug+x /etc/init.d/zabbix_agent

chkconfig zabbix_agent on
chkconfig --list zabbix_agent

Start zabbix_agent on client

Fire it up:

/etc/init.d/zabbix_agent start

Checking the /var/opt/zabbix/zabbix_agentd.log you should see this

tail /var/opt/zabbix/zabbix_agentd.log

  2728:20100811:135911.054 Zabbix Agent started. Zabbix 1.8.2 (revision 11211).
  2730:20100811:135911.054 zabbix_agentd collector started
  2733:20100811:135911.055 zabbix_agentd listener started
  2734:20100811:135911.055 zabbix_agentd listener started
  2735:20100811:135911.055 zabbix_agentd listener started
zabbix_agentd.log (END) 

Troubleshooting zabbix connectivity issues

Once your zabbix_agentdd is started successfully you should see the host on monitor.rice.edu,
and it should say Status = "Monitored" and the Z under Availability should be Blue (not red)

If not, check out connectivity issues like so

Connectivity Checks from new client

root@fms06:/etc/sysconfig> telnet monitor.rice.edu 10051

Trying 10.129.92.52...
Connected to monitor.rice.edu.
Escape character is '^]'.

root@fms11:/etc/sysconfig> netstat -an | grep 1005

tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN
tcp 0 0 10.142.93.6:10050 10.129.92.52:54553 TIME_WAIT
tcp 0 0 10.142.93.6:10050 10.129.92.52:53015 TIME_WAIT
tcp 0 0 10.142.93.6:10050 10.129.92.52:52757 TIME_WAIT
tcp 0 0 10.142.93.6:10050 10.129.92.52:54537 TIME_WAIT
tcp 0 0 10.142.93.6:10050 10.129.92.52:53557 TIME_WAIT

Connectivity Checks from Monitor.rice.edu

root@monitor:/opt/opt.CORE/zabbix-1.8.3/rhel5/public_html/agents> telnet fms06.rice.edu 10050

Trying 10.142.93.4...
Connected to fms06.rice.edu.
Escape character is '^]'.

agent.version

ZBXD�1.6.5Connection closed by foreign host.

Define monitoring for new client on monitor.rice.edu

(warning) The monitoring setup is done by the owner/admin of the applications running on the client.
The application owners know best what services they will need to monitor, who to notify,
and what hours of operations they need notifications done for.

See the wiki:
[ Zabbix Monitoring | https://docs.rice.edu/confluence/x/kwKlAQ ]

  • No labels