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

Compare with Current View Page History

« Previous Version 20 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

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

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 Zabbix LOCAL config file, only if needed

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.

mkdir /etc/opt/zabbix
cp -p /tmp/ZABBIX/zabbix_agentd.conf /etc/opt/zabbix/
chown -R 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_ctl /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

 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) 

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