Skip to content

Add: Supports Grafana Cloud Logs#56

Merged
guacamole merged 1 commit intomasterfrom
fluent-bit-loki-integration
Oct 28, 2021
Merged

Add: Supports Grafana Cloud Logs#56
guacamole merged 1 commit intomasterfrom
fluent-bit-loki-integration

Conversation

@jay-dee7
Copy link
Member

@jay-dee7 jay-dee7 commented Oct 28, 2021

Description

We need a simple and modern way to manage our logs so that when an issue
occurs, we can debug it easily. We now have a way to do this via
Fluent Bit Loki Plugin. Reasons for going with fluent-bit:

  • Very Very low memory footprint, this means we can run this service on
    a light machine and not have to worry about it, we can also share the
    host for main backend and fluent-bit.
  • Very customizable - Fluent Bit has tons of plugins, which means we can
    redirect our logs to a different log management service, receive logs
    in various ways, filter log messages, etc.
  • Support for multiple outputs - This is a strong feature of FluentBit.
    This lets us output our logs to Granfa Loki, Logzio, Datadog, StdOut, etc all
    at the same time.

Notes from this PR:

I've included an example config file for fluent-bit at telemetry/fluent-bit/fluent-bit.toml.example which we can use for deploying a sort of sidecar for logs.

  • Fluent Bit should be running before the main app launches
  • We send all the logs over HTTP to our local-to-server fluent-bit instance and FluentBit forwards those those logs to Grafana Loki (we can actually change the output to other providers too)

Signed-off-by: jay-dee7 [email protected]

@jay-dee7 jay-dee7 requested a review from guacamole October 28, 2021 14:10
@jay-dee7 jay-dee7 self-assigned this Oct 28, 2021
@jay-dee7
Copy link
Member Author

Conformance tests are passing locally:
pr-56-openregistry-conformance-tests

@jay-dee7
Copy link
Member Author

and logs are shipping to grafana cloud just fine
openregistry-to-grafana-cloud-logs

We need a simple and modern way to manage our logs so that when an issue
occurs, we can debug it easily. We now have a way to do this via
[Fluent Bit Loki Plugin](https://docs.fluentbit.io/manual/pipeline/outputs/loki). Reasons for going with fluent-bit:

* Very Very low memory footprint, this means we can run this service on
  a light machine and not have to worry about it, we can also share the
  host for main backend and fluent-bit.
* Very customizable - Fluent Bit has tons of plugins, which means we can
  redirect our logs to a different log management service, receive logs
  in various ways, filter log messages, etc.
* Support for multiple outputs - This is a strong feature of FluentBit.
  This lets us output our logs to Granfa Loki, Logzio, Datadog, StdOut, etc all
  at the same time.

Signed-off-by: jay-dee7 <[email protected]>
@jay-dee7 jay-dee7 force-pushed the fluent-bit-loki-integration branch from 6b3dc9a to 6f44167 Compare October 28, 2021 14:25
Copy link
Member

@guacamole guacamole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 💯

@guacamole guacamole merged commit 41be7b8 into master Oct 28, 2021
@guacamole guacamole deleted the fluent-bit-loki-integration branch October 28, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants