Ad Widget

Collapse

Agent install on Linux (Ubuntu)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tomcat.cdm
    Junior Member
    • Jul 2012
    • 3

    #1

    Agent install on Linux (Ubuntu)

    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!
  • cosysco
    Junior Member
    • Feb 2013
    • 1

    #2
    Thanks for your help with this post. Works like a charm!.

    Thanks for your help with this post. Works like a charm!.

    Comment

    • AlexD1979
      Junior Member
      • Mar 2013
      • 2

      #3
      Hello,
      I installed the Agent on a Ubuntu 12.04 from this manual http://www.zabbix.com/forum/register...24c09c9b78a462
      and get the error in log:
      671:20130311:120906.649 Starting Zabbix Agent [tecracer-zabbix-client]. Zabbix 2.0.5 (revision 33558).
      671:20130311:120906.650 listener failed: bind() for [[xxx.xxx.xxx.xxx]:10050] failed: [99] Cannot assign requested address
      where xxx is the public internet-facing ip address.
      What is wrong?

      Comment

      • heaje
        Senior Member
        Zabbix Certified Specialist
        • Sep 2009
        • 325

        #4
        Is that public address actually bound on your machine? That error message would probably be produced for either of two reasons:

        1. That Address is not on the machine and zabbix can therefore not bind to it.

        2. The port you are trying to use is already being used by something else.

        Comment

        Working...