Hello, I need to carry out a POC using Grafana Lok...
# fluent-bit
a
Hello, I need to carry out a POC using Grafana Loki, Grafana, and Fluent Bit agents. I need to open the data transfer flows. Does anyone have a diagram showing the ports and protocols used?
p
Did you check the docs? https://docs.fluentbit.io/manual/data-pipeline/outputs/loki Fluent Bit communication to Loki is over the HTTP URI I believe but down to your specific infra configuration. I can't really say what Loki-Grafana does all internally, you need to check their docs or ask their support
a
Thank u Pat. Yes, I looked at the documentation, but it's not very clear.
p
how so?
Fluent Bit will just push to Loki via the HTTP URI you configure so any networking required are down to the infrastructure you run on, e.g. if you self host Loki that will be different to using Grafana cloud
a
Indeed, Loki is hosted within my infrastructure. According to the Loki documentation, the listening port is 3100. But on the Fluent Bit side, on the server, which port do the logs pass through?
p
Ah I see, yes that port I believe but it can be configured as a service in K8S to map that port and I think you can also specify the port in the URI. You can also change the Loki listening port as well so again, down to what you've configured.
a
Actually, I'm not using Kubernetes for my POC. So there's no specific port for sending logs? Fluent Bit sends logs to Loki via HTTP. On the Fluent Bit side, there's no dedicated outbound port — it acts as an HTTP client and initiates the connection to Loki, is that correct?
p
You can specify host and port but defaults are 3100: https://github.com/fluent/fluent-bit/blob/0def4e6adaffeb2287ad470f1eece250e41705ef/plugins/out_loki/loki.h#L33 https://github.com/fluent/fluent-bit/blob/0def4e6adaffeb2287ad470f1eece250e41705ef/plugins/out_loki/loki.c#L1154 You can get full list of config options from the binary or container by using
-o loki --help
,e.g.:
Copy code
$ docker run --rm -it fluent/fluent-bit:4.1.1 -o loki --help
...
The docs do cover it as well: https://docs.fluentbit.io/manual/data-pipeline/outputs/loki
host
: Loki base hostname or IP address. Don't include the sub-path, only the base hostname or URL. Default:
127.0.0.1
uri
: Specify a custom HTTP URI. It must start with a forward slash (
/
). Default:
/loki/api/v1/push
port
: The Loki TCP port. Default:
3100
a
Thank you so much, I’ll dig into that further.