Filebeat with 2 kafka outputs











up vote
0
down vote

favorite












I have an issue with Filebeat when I try to send data logs to 2 Kafka nodes at the same time



The following is the Output Kafka section of the filebeat.yml file:



output.kafka:
enabled: true
hosts: [ "192.168.xxx.xx:9092", "192.168.zzz.zz:9092" ]
topic: "syslog"
timeout: 30s
max_message_bytes: 1000000


Both kafka services are running, but only the second node get data. I mean Only the Kafka node 192.168.zzz.zz get the data Filebeat have sent it.



If I exchange the IP adressess, occurs that the second IP address get the data log.



Why occurs that ? What other configurations are need to implement this use case? I need send the data to both kafka outputs.










share|improve this question
























  • Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
    – cricket_007
    2 days ago















up vote
0
down vote

favorite












I have an issue with Filebeat when I try to send data logs to 2 Kafka nodes at the same time



The following is the Output Kafka section of the filebeat.yml file:



output.kafka:
enabled: true
hosts: [ "192.168.xxx.xx:9092", "192.168.zzz.zz:9092" ]
topic: "syslog"
timeout: 30s
max_message_bytes: 1000000


Both kafka services are running, but only the second node get data. I mean Only the Kafka node 192.168.zzz.zz get the data Filebeat have sent it.



If I exchange the IP adressess, occurs that the second IP address get the data log.



Why occurs that ? What other configurations are need to implement this use case? I need send the data to both kafka outputs.










share|improve this question
























  • Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
    – cricket_007
    2 days ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have an issue with Filebeat when I try to send data logs to 2 Kafka nodes at the same time



The following is the Output Kafka section of the filebeat.yml file:



output.kafka:
enabled: true
hosts: [ "192.168.xxx.xx:9092", "192.168.zzz.zz:9092" ]
topic: "syslog"
timeout: 30s
max_message_bytes: 1000000


Both kafka services are running, but only the second node get data. I mean Only the Kafka node 192.168.zzz.zz get the data Filebeat have sent it.



If I exchange the IP adressess, occurs that the second IP address get the data log.



Why occurs that ? What other configurations are need to implement this use case? I need send the data to both kafka outputs.










share|improve this question















I have an issue with Filebeat when I try to send data logs to 2 Kafka nodes at the same time



The following is the Output Kafka section of the filebeat.yml file:



output.kafka:
enabled: true
hosts: [ "192.168.xxx.xx:9092", "192.168.zzz.zz:9092" ]
topic: "syslog"
timeout: 30s
max_message_bytes: 1000000


Both kafka services are running, but only the second node get data. I mean Only the Kafka node 192.168.zzz.zz get the data Filebeat have sent it.



If I exchange the IP adressess, occurs that the second IP address get the data log.



Why occurs that ? What other configurations are need to implement this use case? I need send the data to both kafka outputs.







apache-kafka filebeat






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 at 22:32









cricket_007

76.4k1042106




76.4k1042106










asked Nov 16 at 21:28









Dario R

314




314












  • Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
    – cricket_007
    2 days ago


















  • Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
    – cricket_007
    2 days ago
















Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
– cricket_007
2 days ago




Looking at your history of questions, you have accepted none of them. Please refer to What to do when someone answers
– cricket_007
2 days ago












1 Answer
1






active

oldest

votes

















up vote
1
down vote













Assuming both broker urls form the same cluster, only one address is used to bootstrap the rest of the cluster. If one of those addresses is not reachable, then the other is selected.



If Filebeat is creating messages with null keys, then messages should be evenly spread across partitions within the specified kafka topic for the cluster that is being connected to.



Data is only sent to the leader for the calculated partition (based on the message key), therefore, a single message cannot be sent to "two nodes (of the same cluster) at the same time". Also, if you had more than those two servers in the Kafka cluster, the one that gets the data could one that is not part of the those addresses you've listed.



I don't think Filebeat can output to more than one unique Kafka cluster at once, at least least not within a single output.kafka section. Logstash might work better for that use case






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345646%2ffilebeat-with-2-kafka-outputs%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Assuming both broker urls form the same cluster, only one address is used to bootstrap the rest of the cluster. If one of those addresses is not reachable, then the other is selected.



    If Filebeat is creating messages with null keys, then messages should be evenly spread across partitions within the specified kafka topic for the cluster that is being connected to.



    Data is only sent to the leader for the calculated partition (based on the message key), therefore, a single message cannot be sent to "two nodes (of the same cluster) at the same time". Also, if you had more than those two servers in the Kafka cluster, the one that gets the data could one that is not part of the those addresses you've listed.



    I don't think Filebeat can output to more than one unique Kafka cluster at once, at least least not within a single output.kafka section. Logstash might work better for that use case






    share|improve this answer



























      up vote
      1
      down vote













      Assuming both broker urls form the same cluster, only one address is used to bootstrap the rest of the cluster. If one of those addresses is not reachable, then the other is selected.



      If Filebeat is creating messages with null keys, then messages should be evenly spread across partitions within the specified kafka topic for the cluster that is being connected to.



      Data is only sent to the leader for the calculated partition (based on the message key), therefore, a single message cannot be sent to "two nodes (of the same cluster) at the same time". Also, if you had more than those two servers in the Kafka cluster, the one that gets the data could one that is not part of the those addresses you've listed.



      I don't think Filebeat can output to more than one unique Kafka cluster at once, at least least not within a single output.kafka section. Logstash might work better for that use case






      share|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        Assuming both broker urls form the same cluster, only one address is used to bootstrap the rest of the cluster. If one of those addresses is not reachable, then the other is selected.



        If Filebeat is creating messages with null keys, then messages should be evenly spread across partitions within the specified kafka topic for the cluster that is being connected to.



        Data is only sent to the leader for the calculated partition (based on the message key), therefore, a single message cannot be sent to "two nodes (of the same cluster) at the same time". Also, if you had more than those two servers in the Kafka cluster, the one that gets the data could one that is not part of the those addresses you've listed.



        I don't think Filebeat can output to more than one unique Kafka cluster at once, at least least not within a single output.kafka section. Logstash might work better for that use case






        share|improve this answer














        Assuming both broker urls form the same cluster, only one address is used to bootstrap the rest of the cluster. If one of those addresses is not reachable, then the other is selected.



        If Filebeat is creating messages with null keys, then messages should be evenly spread across partitions within the specified kafka topic for the cluster that is being connected to.



        Data is only sent to the leader for the calculated partition (based on the message key), therefore, a single message cannot be sent to "two nodes (of the same cluster) at the same time". Also, if you had more than those two servers in the Kafka cluster, the one that gets the data could one that is not part of the those addresses you've listed.



        I don't think Filebeat can output to more than one unique Kafka cluster at once, at least least not within a single output.kafka section. Logstash might work better for that use case







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 days ago

























        answered Nov 16 at 22:36









        cricket_007

        76.4k1042106




        76.4k1042106






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345646%2ffilebeat-with-2-kafka-outputs%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Paul Cézanne

            UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

            Angular material date-picker (MatDatepicker) auto completes the date on focus out