Movatterモバイル変換


[0]ホーム

URL:


Fluent Bit: Official Manual
Ctrlk
SlackGitHubCommunity MeetingsWebinars
Powered by GitBook
On this page

HTTP proxy

Enable traffic through a proxy server using the HTTP_PROXY environment variable.

Fluent Bit supports configuring an HTTP proxy for all egress HTTP/HTTPS traffic using theHTTP_PROXY orhttp_proxy environment variable.

The format for the HTTP proxy environment variable ishttp://USER:PASS@HOST:PORT, where:

  • USER is the username when using basic authentication.

  • PASS is the password when using basic authentication.

  • HOST is the HTTP proxy hostname or IP address.

  • PORT is the port the HTTP proxy is listening on.

To use an HTTP proxy with basic authentication, provide the username and password:

HTTP_PROXY='http://example_user:[email protected]:8080'

When no authentication is required, omit the username and password:

HTTP_PROXY='http://proxy.example.com:8080'

TheHTTP_PROXY environment variable is astandard way of setting a HTTP proxy in a containerized environment, and it's also natively supported by any application written in Go. Fluent Bit implements the same convention. Thehttp_proxy environment variable is also supported. When both theHTTP_PROXY andhttp_proxy environment variables are provided,HTTP_PROXY will be preferred.

TheHTTP output plugin also supports configuring an HTTP proxy. This configuration works, but shouldn't be used with theHTTP_PROXY orhttp_proxy environment variable. The environment variable-based proxy configuration is implemented by creating a TCP connection tunnel usingHTTP CONNECT. Unlike the plugin's implementation, this supports both HTTP and HTTPS egress traffic.

NO_PROXY

Use theNO_PROXY environment variable when traffic shouldn't flow through the HTTP proxy. Theno_proxy environment variable is also supported. When bothNO_PROXY andno_proxy environment variables are provided,NO_PROXY takes precedence.

The format for theno_proxy environment variable is a comma-separated list of host names or IP addresses.

A domain name matches itself and all of its subdomains (for example,example.com matches bothexample.com andtest.example.com):

NO_PROXY='foo.com,127.0.0.1,localhost'

A domain with a leading dot (.) matches only its subdomains (for example,.example.com matchestest.example.com but notexample.com):

As an example, you might useNO_PROXY when running Fluent Bit in a Kubernetes environment, where and you want:

  • All real egress traffic to flow through an HTTP proxy.

  • All local Kubernetes traffic to not flow through the HTTP proxy.

In this case, set:

Last updated

Was this helpful?


[8]ページ先頭

©2009-2025 Movatter.jp