Ad Widget

Collapse

How to split zabbix components into 3 different servers

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • derli1988
    Member
    • Apr 2021
    • 60

    #1

    How to split zabbix components into 3 different servers

    I have a production Zabbix with the server, MySQL and Apache into one single VM

    I have segregated them into a staging environment for better performance.

    ld-infra-zabbix-se-01 = 192.168.4.201
    ld-infra-zabbix-fe-01 = 192.168.4.202
    ld-infra-zabbix-db-01 = 192.168.4.203
    I am a little bit experience in zabbix and have configured all 3 parts into each machine.

    FE = FrontEnd (apache and php)
    DB​ = MySQL
    SE = Zabbix server

    However, after installing all components separately, I'm a little confused as to where the URL should be:



    the host on the part should be the Apache web server, right?

    Any cookbook there or best practices when it comes to splitting these 3 components.?
  • Answer selected by derli1988 at 11-09-2023, 16:36.
    derli1988
    Member
    • Apr 2021
    • 60

    Originally posted by tim.mooney

    Yes, your URL should be http://id-infra-zabbix-fe-01/zabbix

    Assuming the install was done correctly, on id-infra-zabbix-fe-01, the generated zabbix/conf/zabbix.conf.php (probably in /usr/share if you're using official packages) should have
    Code:
    $DB['SERVER'] = 'id-infra-zabbix-db-01'
    as well as correct settings for TYPE, PORT, DATABASE, etc. In addition, that file should have
    Code:
    $ZBX_SERVER = 'id-infra-zabbix-se-01'
    .

    Your clients that use the Zabbix Agent or Agent2 will need
    Code:
    SERVER=id-infra-zabbix-se-01
    and/or
    Code:
    SERVERACTIVE
    . It's fine to use an IP address instead for those settings, if you prefer.

    Make sure all 3 of your systems have good time synchronization set up.

    I also recommend you set up Let's Encrypt or some other server certificate and use https for your web front-end and an encrypted connection to the database, from both the front-end and from the server.
    Good morning, Tim.

    That's very detailed explanation, I just came to work and checked in your answer.

    I'll have a look on my setup, but I do know I have installed packaged from zabbix.com download page instruction and i'm sure the FE server doesn't have ythe zabbix.conf php, but I can create one.

    I'll have to use https any time soon because I want to hook up the frontend with Azure, but I won't use encryption to the database as to not overload or overcomplicate my current setup, I do use encryption for agents connecting to the server when not in the same DC and Proxies, as well.

    thanks a lot for your patience and if your answer works, I'm going to mark as answer!

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #2
      Originally posted by derli1988
      However, after installing all components separately, I'm a little confused as to where the URL should be:

      Yes, your URL should be http://id-infra-zabbix-fe-01/zabbix

      Assuming the install was done correctly, on id-infra-zabbix-fe-01, the generated zabbix/conf/zabbix.conf.php (probably in /usr/share if you're using official packages) should have
      Code:
      $DB['SERVER'] = 'id-infra-zabbix-db-01'
      as well as correct settings for TYPE, PORT, DATABASE, etc. In addition, that file should have
      Code:
      $ZBX_SERVER = 'id-infra-zabbix-se-01'
      .

      Your clients that use the Zabbix Agent or Agent2 will need
      Code:
      SERVER=id-infra-zabbix-se-01
      and/or
      Code:
      SERVERACTIVE
      . It's fine to use an IP address instead for those settings, if you prefer.

      Make sure all 3 of your systems have good time synchronization set up.

      I also recommend you set up Let's Encrypt or some other server certificate and use https for your web front-end and an encrypted connection to the database, from both the front-end and from the server.

      Comment

      • derli1988
        Member
        • Apr 2021
        • 60

        #3
        Originally posted by tim.mooney

        Yes, your URL should be http://id-infra-zabbix-fe-01/zabbix

        Assuming the install was done correctly, on id-infra-zabbix-fe-01, the generated zabbix/conf/zabbix.conf.php (probably in /usr/share if you're using official packages) should have
        Code:
        $DB['SERVER'] = 'id-infra-zabbix-db-01'
        as well as correct settings for TYPE, PORT, DATABASE, etc. In addition, that file should have
        Code:
        $ZBX_SERVER = 'id-infra-zabbix-se-01'
        .

        Your clients that use the Zabbix Agent or Agent2 will need
        Code:
        SERVER=id-infra-zabbix-se-01
        and/or
        Code:
        SERVERACTIVE
        . It's fine to use an IP address instead for those settings, if you prefer.

        Make sure all 3 of your systems have good time synchronization set up.

        I also recommend you set up Let's Encrypt or some other server certificate and use https for your web front-end and an encrypted connection to the database, from both the front-end and from the server.
        Good morning, Tim.

        That's very detailed explanation, I just came to work and checked in your answer.

        I'll have a look on my setup, but I do know I have installed packaged from zabbix.com download page instruction and i'm sure the FE server doesn't have ythe zabbix.conf php, but I can create one.

        I'll have to use https any time soon because I want to hook up the frontend with Azure, but I won't use encryption to the database as to not overload or overcomplicate my current setup, I do use encryption for agents connecting to the server when not in the same DC and Proxies, as well.

        thanks a lot for your patience and if your answer works, I'm going to mark as answer!

        Comment

        • derli1988
          Member
          • Apr 2021
          • 60

          #4
          I'd like to thank you as your solution worked just fine.

          I have created the file myself, and the only thing missing from my end was to run this command on the zabbix server dnf module switch-to php:7.4

          Comment

          Working...