Ad Widget

Collapse

Using zabbix_sender to send to multiple zabbix-servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddb0faz
    Junior Member
    • Sep 2020
    • 4

    #1

    Using zabbix_sender to send to multiple zabbix-servers

    Zabbix <> 2.4.8
    OS <> Rhel 7.9
    I'm migrating from standalone to virtual (VMware). I want to send data to both existing and new zabbix servers for a period of time before cutover.

    My zabbix_agentd.conf file is configured as:
    Server=zbxsvr01
    ServerActive=zbxsvr01
    Include=[path]/agentdconf.d/

    In the agentdconf.d I have a file called [name].conf that contains
    Server=zbxsvr01,zbxsvr02,zbxsvr03
    ServerActive=zbxsvr01,zbxsvr02,zbxsvr03

    I have a script that uses zabbix_sender to push data to the zabbix_server
    [path2]/zabbix_sender -c [path2]/zabbix_agentd.conf -i filename

    QUESTION <> Will this send data to ALL zabbix servers?



  • ang3lwich
    Junior Member
    • Dec 2020
    • 7

    #2
    I am wondering if a zabbix_proxy might be of use.

    As far as I remember, if your client hosts have all zbxsvr(0X) in the conf file or in your case name.conf
    it should send data easy peasy to all servers as you desire.

    Comment

    • ddb0faz
      Junior Member
      • Sep 2020
      • 4

      #3
      I read that zabbix proxy can't do that. Nothing though on a server where the agent is installed and you are using zabbix_sender to push data.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        OPTIONS

        -c, --config config-fileUse config-file. Zabbix sender reads server details from the agentd configuration file. By default Zabbix sender does not read any configuration file. Only parameters Hostname, ServerActive, SourceIP, TLSConnect, TLSCAFile, TLSCRLFile, TLSServerCertIssuer, TLSServerCertSubject, TLSCertFile, TLSKeyFile, TLSPSKIdentity and TLSPSKFile are supported. All addresses defined in the agent ServerActive configuration parameter are used for sending data. If sending of batch data fails to one address, the following batches are not sent to this address.

        Taken from here ->https://www.zabbix.com/documentation.../zabbix_sender

        Comment

        • Tex74
          Junior Member
          • Dec 2021
          • 22

          #5
          Guy's,

          While setting up a new zabbix5 server, I modified my agent conf file and added my new server svrzbx5 to read:

          Server=svrzbx4,svrzbx5
          ServerActive=svrzbx4,svrzbx5

          What I can tell you is that all servers ussing zabbix-sender on my network only manage first address.
          In other words:

          Server=svrzbx4,svrzbx5
          ServerActive=svrzbx4,svrzbx5
          Transmit to svrzbx4

          Server=svrzbx5,svrzbx4
          ServerActive=svrzbx5,svrzbx4
          transmit to svrzbx5

          the command line is:
          zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k pg.db.dump[$DBNAME] -o $EXITPGDUMP > /dev/null

          Comment

          • vicbc
            Member
            • Nov 2021
            • 39

            #6
            Tex74 , Hi.

            In this case zabbix_sender will always read the first entry for zabbix server.

            As stated in the docs (share above by cyber )

            All addresses defined in the agent ServerActive configuration parameter are used for sending data. If sending of batch data fails to one address, the following batches are not sent to this address.
            That's why it's responding like that.
            If you want to use zabbix_sender with both of them, you can configure two remote commands to read the configuration file (with -c), and passing "-z <server4|5>".

            Let me know if that helped.

            Cheers,

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              Based on exactly, what you quoted from docs, it should send to both...
              Is there anything in agents logfile about failures?

              Comment

              Working...