Difference between revisions of "Zabbix agent setup"

(Created page with "Category:Linux I'm using the Zabbix monitoring solution [http://www.zabbix.com/]. So I have to install a ''Zabbix agent'' on my client distribution to retrieve data. >>...")
(No difference)

Revision as of 09:28, 12 June 2014


I'm using the Zabbix monitoring solution [1]. So I have to install a Zabbix agent on my client distribution to retrieve data.

>> The Zabbix documentation is really complete! Don't forget to check it out if you're using a different version |and|or| want to know more about the installation details. See https://www.zabbix.com/documentation/


Zabbix agent installation

Source: https://www.zabbix.com/documentation/2.2/manual/installation/install_from_packages


Add zabbix repository

wget http://repo.zabbix.com/zabbix/2.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.2-1+trusty_all.deb
dpkg -i zabbix-release_2.2-1+trusty_all.deb
apt-get update


Install zabbit agent

apt-get install zabbix-agent



Zabbix agent configuration

See https://www.zabbix.com/documentation/2.2/manual/appendix/config/zabbix_agentd for parameters details.


Edit the Zabbix agent configuration file:

vim /etc/zabbix/zabbix_agentd.conf


Adjust the following settings:

# List of passive zabbix server (comma separation)    ~ line 85
Server=172.16.50.3

# List of active zabbix server (comma separation)    ~ line 126
ServerActive=172.16.50.3

# Do not override a default hostname, use the O.S hostname instead. 
# You MUST comment the Hostname instruction           ~ line 137
#Hostname=Zabbix server



NetBoot client specifics

When you're using NetBoot and tmpfs you'll run into specifics issues. The following part is my return of experience.


Zabbix launcher script

The application requires some files and folders to run. Without these it will always failed to start.


Problem: in our case these files are mount in tmpfs = they will not exist by default. You have to adjust the zabbix startup script to create it!


Edit the Zabbix agent configuration file:

vim /etc/init.d/zabbix-agent


Add the following commands around line 18.

LOG_DIR=/var/log/zabbix
LOG_FILE=$LOG_DIR/zabbix_agentd.log

if test ! -d "$LOG_DIR"; then
   mkdir "$LOG_DIR"
   touch "$LOG_FILE"
   chown -R zabbix:zabbix "$LOG_DIR"
fi



Sources

Zabbix documentation


Zabbix bug reporting