Hello, this is my first post. I'm doing an Zabbix implementation to monitor serveral mixed servers (Linux, Windows, phyisical, virtual...), and I found some guides a little bit outdated.
This is my Linux - Ubuntu adapted - way to compile and install the Zabbix Agent.
Be advice that it is possible to install from repository up to 1.8 branch at 12.04 LTS.
Based on: http://www.zabbix.com/wiki/howto/mon...installonlinux
This is the updated agent install guide:
1. Before we install the agent, let’s start by setting up the host in Zabbix.
In the Zabbix web-interface, go to Configuration –> Hosts –> Create Host.
Let’s call our new host: Mail_Server [We need this later in the zabbix_agentd.conf]
DNS name: ms1-ny.mydomain.net [example dns name only]
IP address: 192.168.16.2 [example ip address]
Port: 10050
Status: Not Monitored [We will change this after installing the agent]
Link with Template: Template_Linux
then Save.
Now go to Configuration –> Triggers –> Host: Mail_Server and disable all the triggers, otherwise they will trigger as soon as you enable the host.
2. Install the Zabbix-Agent on the Linux server that you want to monitor.
[root@mail]# tar -xzf zabbix-2.0.2.tar.gz
[root@mail]# cd zabbix-2.0.2/
[root@mail zabbix-2.0.2/]# ./configure --enable-agent
[root@mail zabbix-2.0.2]# make -j$[$(cat /proc/cpuinfo| grep -c '^processor')+1]
[root@mail zabbix-2.0.2]# make install
Possible errors = Lack of required package or compiler (gcc or make, for example).
3. Configure the Zabbix-Agent.
First we need to add the zabbix user.
[root@mail zabbix-2.0.2]# adduser zabbix
Copy the sample configs to /usr/local/etc for the agentd.
[root@mail zabbix-2.0.2]# cp conf/zabbix_agentd.conf /usr/local/etc
Now go to /etc/zabbix/zabbix_agentd.conf, and edit (at least):
Server=192.168.0.69
ServerActive=192.168.0.69 [Example IP address of the Zabbix Server]
Hostname=Mail_Server [Exactly the same name as our zabbix host name – See #1 above. NOTE:This name is case sensitive!]
ListenIP=192.168.0.100 [Example IP address of the current Zabbix Agent installation]. Necessary for Active Checks
Next, configure /etc/init.d/
[root@mail zabbix-2.0.2]# cp misc/init.d/debian/zabbix-agent /etc/init.d/zabbix-agent
Now set the correct permissions and set ZABBIX to start when the machine boots:
root@mail zabbix-2.0.2]# chmod 755 /etc/init.d/zabbix-agent
root@mail zabbix-2.0.2]# chmod 755 /usr/local/sbin/zabbix_agentd
root@mail zabbix-2.0.2]# update-rc.d zabbix-agent defaults
Start the agent:
root@mail zabbix-2.0.2]# /etc/init.d/zabbix-agent start
Now check to make sure that they are running:
root@mail zabbix-2.0.2]# ps aux | grep zabbix
You should see multiple instances of zabbix_agentd running if everything has gone ok.
Check the zabbix_agentd log to see if all is okay!
root@mail:/# cat /tmp/zabbix_agentd.log
31224:20120813:100348.334 Starting Zabbix Agent [mail]. Zabbix 2.0.2 (revision 29214).
31225:20120813:100348.336 agent #0 started [collector]
31226:20120813:100348.336 agent #1 started[listener]
31227:20120813:100348.337 agent #2 started[listener]
31228:20120813:100348.337 agent #3 started[listener]
31229:20120813:100348.337 agent #4 started [active checks]
Now go back to the Zabbix Server web-interface and enable the Mail_Server host. After a few moments you should be able to see data in Monitoring –> Latest data.
Before enabling the Triggers, check Configuration –> Items and disable any item that is shown as ‘Unsupported’, and any item that you don’t need (e.g. FTP server, etc.).
Remember to clean up the downloaded file and the extracted folder.
root@mail:/# rm -R zabbix-2.0.2/
root@mail:/# rm zabbix-2.0.2.tar.gz
TOO EASY!
This is my Linux - Ubuntu adapted - way to compile and install the Zabbix Agent.
Be advice that it is possible to install from repository up to 1.8 branch at 12.04 LTS.
Based on: http://www.zabbix.com/wiki/howto/mon...installonlinux
This is the updated agent install guide:
1. Before we install the agent, let’s start by setting up the host in Zabbix.
In the Zabbix web-interface, go to Configuration –> Hosts –> Create Host.
Let’s call our new host: Mail_Server [We need this later in the zabbix_agentd.conf]
DNS name: ms1-ny.mydomain.net [example dns name only]
IP address: 192.168.16.2 [example ip address]
Port: 10050
Status: Not Monitored [We will change this after installing the agent]
Link with Template: Template_Linux
then Save.
Now go to Configuration –> Triggers –> Host: Mail_Server and disable all the triggers, otherwise they will trigger as soon as you enable the host.
2. Install the Zabbix-Agent on the Linux server that you want to monitor.
[root@mail]# tar -xzf zabbix-2.0.2.tar.gz
[root@mail]# cd zabbix-2.0.2/
[root@mail zabbix-2.0.2/]# ./configure --enable-agent
[root@mail zabbix-2.0.2]# make -j$[$(cat /proc/cpuinfo| grep -c '^processor')+1]
[root@mail zabbix-2.0.2]# make install
Possible errors = Lack of required package or compiler (gcc or make, for example).
3. Configure the Zabbix-Agent.
First we need to add the zabbix user.
[root@mail zabbix-2.0.2]# adduser zabbix
Copy the sample configs to /usr/local/etc for the agentd.
[root@mail zabbix-2.0.2]# cp conf/zabbix_agentd.conf /usr/local/etc
Now go to /etc/zabbix/zabbix_agentd.conf, and edit (at least):
Server=192.168.0.69
ServerActive=192.168.0.69 [Example IP address of the Zabbix Server]
Hostname=Mail_Server [Exactly the same name as our zabbix host name – See #1 above. NOTE:This name is case sensitive!]
ListenIP=192.168.0.100 [Example IP address of the current Zabbix Agent installation]. Necessary for Active Checks
Next, configure /etc/init.d/
[root@mail zabbix-2.0.2]# cp misc/init.d/debian/zabbix-agent /etc/init.d/zabbix-agent
Now set the correct permissions and set ZABBIX to start when the machine boots:
root@mail zabbix-2.0.2]# chmod 755 /etc/init.d/zabbix-agent
root@mail zabbix-2.0.2]# chmod 755 /usr/local/sbin/zabbix_agentd
root@mail zabbix-2.0.2]# update-rc.d zabbix-agent defaults
Start the agent:
root@mail zabbix-2.0.2]# /etc/init.d/zabbix-agent start
Now check to make sure that they are running:
root@mail zabbix-2.0.2]# ps aux | grep zabbix
You should see multiple instances of zabbix_agentd running if everything has gone ok.
Check the zabbix_agentd log to see if all is okay!
root@mail:/# cat /tmp/zabbix_agentd.log
31224:20120813:100348.334 Starting Zabbix Agent [mail]. Zabbix 2.0.2 (revision 29214).
31225:20120813:100348.336 agent #0 started [collector]
31226:20120813:100348.336 agent #1 started[listener]
31227:20120813:100348.337 agent #2 started[listener]
31228:20120813:100348.337 agent #3 started[listener]
31229:20120813:100348.337 agent #4 started [active checks]
Now go back to the Zabbix Server web-interface and enable the Mail_Server host. After a few moments you should be able to see data in Monitoring –> Latest data.
Before enabling the Triggers, check Configuration –> Items and disable any item that is shown as ‘Unsupported’, and any item that you don’t need (e.g. FTP server, etc.).
Remember to clean up the downloaded file and the extracted folder.
root@mail:/# rm -R zabbix-2.0.2/
root@mail:/# rm zabbix-2.0.2.tar.gz
TOO EASY!
Comment