HTTP

    HTTP output plugin supports TTL/SSL, for more details about the properties available and general configuration, please refer to the TLS/SSL section.

    Getting Started

    In order to insert records into a HTTP server, you can run the plugin from the command line or through the configuration file:

    The http plugin, can read the parameters from the command line in two ways, through the -p argument (property) or setting them directly through the service URI. The URI format is the following:

    1. $ fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something -m '*'

    In your main configuration file, append the following Input & Output sections:

    By default, the URI becomes tag of the message, the original tag is ignored. To retain the tag, multiple configuration sections have to be made based and flush to different URIs.

    Another approach we also support is the sending the original message tag in a configurable header. It’s up to the receiver to do what it wants with that header field: parse it and use it as the tag for example.

    1. Name http
    2. Match *
    3. Host 192.168.2.3
    4. Port 80
    5. Format json
    6. header_tag FLUENT-TAG

    Provided you are using Fluentd as data receiver, you can combine in_http and out_rewrite_tag_filter to make use of this HTTP header.

    Notice how we override the tag, which is from URI path, with our custom header

    Example : Add a header

    1. [OUTPUT]
    2. Match *
    3. Host 127.0.0.1
    4. Port 9000
    5. Header X-Key-A Value_A
    6. URI /something

    Example : Sumo Logic HTTP Collector

    Suggested configuration for Sumo Logic using json_lines with iso8601 timestamps. The PrivateKey is specific to a configured HTTP collector.

    1. _sourcecategory="my_fluent_bit"
    2. | json "cpu_p" as cpu