Skip to content

Building Zabbix agent

aborkar-ibm edited this page Nov 8, 2017 · 54 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 1:2.4.7+dfsg-2ubuntu2.1
  • Ubuntu 17.04 has 1:3.0.7+dfsg-1

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

  • RHEL (6.9, 7.1, 7.2, 7.3, 7.4)
  • SLES (11 SP4, 12, 12 SP1, 12 SP2, 12 SP3)
  • Ubuntu (16.04, 17.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.9, 7.1, 7.2, 7.3, 7.4)

    sudo yum install tar wget make gcc pcre-devel    
  • SLES (11 SP4, 12, 12 SP1, 12 SP2, 12 SP3)

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

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

Step 2: Download and install Zabbix agent

  • Download Zabbix agent

     cd /<source_root>/
     wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.4.3/zabbix-3.4.3.tar.gz/download -O zabbix-3.4.3.tar.gz
     tar -xvf zabbix-3.4.3.tar.gz
  • Install Zabbix agent

     cd /<source_root>/zabbix-3.4.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

  • Enter Zabbix server IP address and Hostname in configuration file

  • 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/3.2/manual/installation/

Clone this wiki locally