Packetwatch.net

Zabbix Agent in Solaris



Last modified: Nov. 10, 2010

Contents
1 - Summary
2 - Zabbix Agent installation
3 - Service configuration
4 - Service check


1 - Summary

This guide will show how to install the Zabbix Agent in Solaris. The Zabbix
Agent is the client software that installs on the servers and sends information
to the Zabbix server. Zabbix is an open source monitoring solution. This has
been tested in Solaris 9.


2 - Zabbix Agent installation

Download the zabbix agent Solaris 9 package at http://www.zabbix.com/.
# cd ~
# mkdir zabbix
# cd zabbix/
# wget http://www.zabbix.com/downloads/$rel/zabbix_agents_$rel.solaris9.sparc.tar.gz
# gunzip zabbix_agents_$rel.solaris9.sparc.tar.gz
# tar -xvf zabbix_agents_$rel.solaris9.sparc.tar.gz
# sudo chown root:bin bin/zabbix_*
Password:
# sudo chown root:bin sbin/zabbix_agent*
Password:
# sudo cp bin/zabbix_* /usr/bin/
Password:
# sudo cp sbin/zabbix_agent* /usr/sbin/
Password:
# cd ~
# rm -fr zabbix/

Create a group and user named zabbix.
# sudo groupadd -g 122 zabbix
Password:
# sudo useradd -c 'Zabbix' -d / -g zabbix -s /usr/bin/false zabbix
Password:


3 - Service configuration

Find where the configuration file should be put.
# strings /usr/sbin/zabbix_agentd | grep zabbix_agentd.conf
/etc/zabbix/zabbix_agentd.conf

You can create your own configuration file. Here is a simple example.
  Hostname=server.test.com
  ServerPort=10051
  Server=zabbix.test.com
# sudo mkdir /etc/zabbix/
Password:
# sudo vim /etc/zabbix/zabbix_agentd.conf
Password:
# sudo chown root:root /etc/zabbix/zabbix_agentd.conf
Password:

Enable the zabbix agent service so that it will start when the system starts up.
Here is a script I created to start and stop the zabbix agent daemon.
  #!/bin/sh

  CONFIG=/etc/zabbix/zabbix_agentd.conf
  DAEMON=/usr/sbin/zabbix_agentd

  case "$1" in
          start)
                  if [ -f $CONFIG -a -f $DAEMON ]; then
                          echo 'Starting zabbix_agentd.'
                          $DAEMON
                  fi
                  ;;
          stop)
                  echo 'Stopping zabbix_agentd.'
                  pkill -TERM -x zabbix_agentd
                  ;;
          *)
                  echo "Usage: $0 { start | stop }"
                  exit 1
                  ;;
  esac
# sudo vim /etc/init.d/zabbix_agentd
Password:
# sudo chown root:sys /etc/init.d/zabbix_agentd
Password:
# sudo chmod 744 /etc/init.d/zabbix_agentd
Password:
# sudo cp /etc/init.d/zabbix_agentd /etc/rc3.d/S99zabbix_agentd
Password:
# sudo chown root:sys /etc/rc3.d/S99zabbix_agentd
Password:

Before starting the service, make sure that tcp port 10050 is open in case you
are running firewall software.

Start the zabbix agent service.
# sudo /etc/init.d/zabbix_agentd start
Password:
Starting zabbix_agentd.
# sudo pgrep -d ' ' zabbix_agentd
Password:
28114 28111 28116 28113 28112 28115


4 - Service check

Reboot your computer. Log in like normal and check to see that the zabbix
agent service is running. That's it, now you have the zabbix agent running in
Solaris.
# sudo shutdown -y -g 0 -i 6
Password:
# sudo pgrep -d ' ' zabbix_agentd
Password:
261 263 259 273 274 275


Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2024.