Ad Widget

Collapse

Installing Zabbix 3.2 on Amazon Linux AMI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onallion
    Senior Member
    • Mar 2016
    • 131

    #1

    Installing Zabbix 3.2 on Amazon Linux AMI

    Hey all,

    I want to install Zabbix 3.2 on the latest Amazon Linux AMI. Following the RHEL/CentOS steps does not work (dependencies like systemd are missing), so I guess this is not compatible.

    Has anyone had success doing this and can guide me perhaps, or link to a resource? I already have MySQL on RDS.

    Thanks
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by onallion
    Has anyone had success doing this and can guide me perhaps, or link to a resource? I already have MySQL on RDS.
    Yes but it is not as same as with using DB engine on fully controlled system where you can do binary snapshot of the database.
    Zabbix with Amazon RDS will be working up to only some scale because beyond some scale cost of running Amazon RDSeson scale required by zabbix are way higher than cost of HW + powering, cooling and management if you know how to do this.
    Kye factor to have descend speed of the zabbix DB backend is have enough big memory to cache last +half day data + indexes cached in memory.
    With database used by zabbix stack +2k NVPS it mean use +64GB RAM used by DB backend. Try to check price of such instances per hour.
    Sharing the same hardware with other EC2 or RDS instances on the hardware which cannot guarantee CPU caches partitioning means as well very unstable performance (at the moment only CPU capable to provide such functionality is M5/M7 USparc hardware)

    Using AWS RDS is OK in case very small or small databases used mainly in RO. Usually zabbix DB is not such case where you have constant RW flow with high demand well cased data where impact delivery of desync SELECT data to the DB frontend app is null.
    In case AWS MySQL RDS Amazon is not able to change engine transaction semantics
    settings to READ-COMMITTED (transaction-isolation=READ-COMMITTED) which is key settings minimize write operations impact on blocking reads. In other words cost of running DB in AWS RDS are even faster growing with growing minimum required performance (using even faster HW is only way to guarantee enough write ops latency).
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      Are you trying to install packages for RHEL 7 on Amazon Linux?

      Amazon Linux should be based on RHEL 6, so you can not use for RHEL 7.
      However, compatibility with RHEL 6 may not be maintained because each package or library has been updated considerably from RHEL 6.
      Also, SMTP authentication can not be used for packages for RHEL 6.

      The package installation procedure for RHEL 6 will be as follows.

      Code:
      $ sudo yum install http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
      $ sudo yum install zabbix-agent
      $ sudo yum --enablerepo=zabbix-deprecated install zabbix-server-mysql
      $ sudo yum --enablerepo=zabbix-deprecated install zabbix-web-mysql
      It is necessary to specify and install httpd and PHP separately.

      ex.
      Code:
      $ sudo yum install httpd24 php56 php56-gd php56-bcmath php56-mbstring php56-xml php56-ldap php56-mysqlnd
      $ sudo chown -R apache:apache /usr/share/zabbix/
      $ sudo chown -R apache:apache /etc/zabbix/web/
      It is also necessary to arrange the setting file for httpd.

      ex.
      Code:
      $ sudo cp /usr/share/doc/zabbix-web-3.2.6/httpd24-example.conf /etc/httpd/conf.d/zabbix.conf

      Comment

      • onallion
        Senior Member
        • Mar 2016
        • 131

        #4
        Originally posted by kloczek
        Yes but it is not as same as with using DB engine on fully controlled system where you can do binary snapshot of the database.
        Zabbix with Amazon RDS will be working up to only some scale because beyond some scale cost of running Amazon RDSeson scale required by zabbix are way higher than cost of HW + powering, cooling and management if you know how to do this.
        Kye factor to have descend speed of the zabbix DB backend is have enough big memory to cache last +half day data + indexes cached in memory.
        With database used by zabbix stack +2k NVPS it mean use +64GB RAM used by DB backend. Try to check price of such instances per hour.
        Sharing the same hardware with other EC2 or RDS instances on the hardware which cannot guarantee CPU caches partitioning means as well very unstable performance (at the moment only CPU capable to provide such functionality is M5/M7 USparc hardware)

        Using AWS RDS is OK in case very small or small databases used mainly in RO. Usually zabbix DB is not such case where you have constant RW flow with high demand well cased data where impact delivery of desync SELECT data to the DB frontend app is null.
        In case AWS MySQL RDS Amazon is not able to change engine transaction semantics
        settings to READ-COMMITTED (transaction-isolation=READ-COMMITTED) which is key settings minimize write operations impact on blocking reads. In other words cost of running DB in AWS RDS are even faster growing with growing minimum required performance (using even faster HW is only way to guarantee enough write ops latency).
        Thanks for the insight. In this case I am at a client and that database was already established in RDS. Regardless, this will be a small installation, probably max 200nvps...so I don't worry too much.

        I ended up just installing RHEL7, btw. Thanks for the help

        Comment

        • bachancellor
          Junior Member
          • Feb 2018
          • 2

          #5
          Installing Zabbix Agent on Amazon Linux AMI

          Prereq: Open port 10050 TCP inbound via Security Group in EC2

          rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rh...el6.x86_64.rpm
          rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rh...el6.x86_64.rpm

          vim /etc/zabbix/zabbix_agentd.conf

          Find and change both values:
          Server=127.0.0.1 to you Zabbix Server IP
          ServerActive=127.0.0.1 to your Zabbix Server IP

          To run zabbix on boot run the following command
          chkconfig zabbix-agent on

          service zabbix-agent restart x2 <typically fails first try>
          I had better luck just rebooting the machine.

          Run netstat to verify listening port:
          netstat -ltpn | grep 10050

          netstat -ltpn | grep 10050
          tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 4198/zabbix_agentd
          tcp 0 0 :::10050 :::* LISTEN 4198/zabbix_agentd

          If you need help setting up the host in Zabbix server just make sure to use the agent server hostname or ip in the Agent Interfaces

          Comment

          • njader
            Junior Member
            • Mar 2018
            • 5

            #6
            Originally posted by Atsushi
            Are you trying to install packages for RHEL 7 on Amazon Linux?

            Amazon Linux should be based on RHEL 6, so you can not use for RHEL 7.
            However, compatibility with RHEL 6 may not be maintained because each package or library has been updated considerably from RHEL 6.
            Also, SMTP authentication can not be used for packages for RHEL 6.

            The package installation procedure for RHEL 6 will be as follows.

            Code:
            $ sudo yum install http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
            $ sudo yum install zabbix-agent
            $ sudo yum --enablerepo=zabbix-deprecated install zabbix-server-mysql
            $ sudo yum --enablerepo=zabbix-deprecated install zabbix-web-mysql
            It is necessary to specify and install httpd and PHP separately.

            ex.
            Code:
            $ sudo yum install httpd24 php56 php56-gd php56-bcmath php56-mbstring php56-xml php56-ldap php56-mysqlnd
            $ sudo chown -R apache:apache /usr/share/zabbix/
            $ sudo chown -R apache:apache /etc/zabbix/web/
            It is also necessary to arrange the setting file for httpd.

            ex.
            Code:
            $ sudo cp /usr/share/doc/zabbix-web-3.2.6/httpd24-example.conf /etc/httpd/conf.d/zabbix.conf
            Hi Atsushi, do you mean it is not possible to use email notification (SMTP). I followed the command you posted. Zabbix is now working but I can't send email notification. Error says "Support for SMTP authentication was not compiled in". To enable SMTP authentication on zabbix, should I reinstall it zabbix to Amazon Linux the other way? How? Thank you

            Comment


            • Atsushi
              Atsushi commented
              Editing a comment
              Hi njader,
              It is necessary to compile from sources on Amazon Linux.

            • njader
              njader commented
              Editing a comment
              I downloaded zabbix-4.0.0alpha3.tar.gz and tried to compile zabbix but error as well.

              ./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
              make install error shows:

              db.c:27:20: fatal error: mysql.h: No such file or directory
              # include "mysql.h"
              ^
              compilation terminated.
              make[3]: *** [libzbxdb_a-db.o] Error 1
              make[3]: Leaving directory `/home/ec2-user/zabbix-4.0.0alpha3/src/libs/zbxdb'
              make[2]: *** [install-recursive] Error 1
              make[2]: Leaving directory `/home/ec2-user/zabbix-4.0.0alpha3/src/libs'
              make[1]: *** [install-recursive] Error 1
              make[1]: Leaving directory `/home/ec2-user/zabbix-4.0.0alpha3/src'
              make: *** [install-recursive] Error 1

            • Atsushi
              Atsushi commented
              Editing a comment
              The fact that mysql.h can not be found means that MySQL developer package is not installed.
              Please install the package mysql-devel.
          Working...