Skip to content

Building Zabbix agent

aborkar-ibm edited this page Jan 9, 2019 · 46 revisions

Building Zabbix agent

Below versions of Zabbix agent are available in respective distributions at the time of creation of these build instructions:

  • Ubuntu 16.04 has 2.4.7
  • Ubuntu 18.04 has 3.0.12

The instructions provided below specify the steps to build Zabbix agent version 4.0.3 on Linux on IBM Z for following distributions:

  • RHEL (6.10, 7.4, 7.5, 7.6)
  • SLES (12 SP3, 15)
  • Ubuntu (16.04, 18.04)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.

  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Step 1: Install dependencies

  • RHEL (6.10, 7.4, 7.5, 7.6)

    sudo yum install -y tar wget make gcc pcre-devel
  • SLES (12 SP3, 15)

    sudo zypper install -y tar wget make gcc awk pcre-devel
  • Ubuntu (16.04, 18.04)

    sudo apt-get update
    sudo apt-get -y install tar wget make gcc libpcre3-dev

Step 2: Download and install Zabbix agent

  • Download Zabbix agent

     cd /<source_root>/
     wget https://versaweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.0.3/zabbix-4.0.3.tar.gz
     tar -xvf zabbix-4.0.3.tar.gz
  • Install Zabbix agent

     cd /<source_root>/zabbix-4.0.3
     ./configure --enable-agent
     make
     sudo make install

Step 3: Post installation steps

  • Create a 'zabbix' user required to start Zabbix agent daemon

     sudo /usr/sbin/groupadd zabbix
     sudo /usr/sbin/useradd -g zabbix zabbix
  • Edit Zabbix agent configuration file /usr/local/etc/zabbix_agentd.conf

  • Add Zabbix server IP address beside Server= and enter server hostname beside Hostname=

  • Start Zabbix agent

     export PATH=$PATH:/usr/local/sbin/
     zabbix_agentd

Note: If you get an error " cannot open "/tmp/zabbix_agentd.log" ", change file permissions of Zabbix agent log file using the command sudo chmod 766 /tmp/zabbix_agentd.log and start Zabbix agent again.

  • Verify the installed Zabbix agent version with the following command:

     zabbix_get -s <host_ip> -k "agent.version"

Reference:

https://www.zabbix.com/documentation/4.0/manual/installation

Clone this wiki locally