Skip to content

retry_type periodic not working for http #4233

Description

@raulgupto

Describe the bug

https://docs.fluentd.org/output#retry_type As mentioned here we can control the retry_type as periodic too. I'm using output plugin with similar config here :

<match pattern>
   @type copy
   <store>
      @type http
      endpoint http://logserver.com:9000/api
      content_type application/json
# here in this section #
      <format>
        @type json
      </format>
      <buffer tag>
        @type file
        path /some/path
        retry_type periodic # tried adding this in store http config too in above section, but it was still exponential
        retry_wait 60s
        retry_forever true
        total_limit_size 10GB
        flush_interval 12s
        flush_thread_count 2 
      </buffer>
   </store>
  <store>
    @type prometheus
    <metric>
      name fluentd_output_status_num_records_total
      type counter
      desc The total number of outgoing records
      <labels>
        tag ${tag}
        hostname ${hostname}
      </labels>
    </metric>
  </store>
  
</match>

To Reproduce

You can try with basic bare-minimum output config. Please note I'm also using prometheus to count events

Expected behavior

It should be periodic or exponential as set by user.

Your Environment

- Fluentd version: 1.16.0
- TD Agent version:
- Operating system: RHEL6 / RHEL7
- Kernel version: 3.10.0-1160.90.1.el7.x86_64

Your Configuration

<match pattern>
   @type copy
   <store>
      @type http
      endpoint http://logserver.com:9000/api
      content_type application/json
# here in this section #
      <format>
        @type json
      </format>
      <buffer tag>
        @type file
        path /some/path
        retry_type periodic # tried adding this in store http config too in above section, but it was still exponential
        retry_wait 60s
        retry_forever true
        total_limit_size 10GB
        flush_interval 12s
        flush_thread_count 2 
      </buffer>
   </store>
  <store>
    @type prometheus
    <metric>
      name fluentd_output_status_num_records_total
      type counter
      desc The total number of outgoing records
      <labels>
        tag ${tag}
        hostname ${hostname}
      </labels>
    </metric>
  </store>
  
</match>

Your Error Log

I checked in fluentd prometheus metrics when my http target was down. output_status_retry_wait was growing exponentially.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions