-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HTTP input to Fluent Bit configuration and expose port 8889 for t…
…elemetry ingestion
- Loading branch information
Showing
6 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Fluentd | ||
|
||
This guide will help you test fluent-bit logs with OneUptime. | ||
|
||
## Prerequisites | ||
|
||
- Filuentd docker container running on your system (essentially this folder should be running). | ||
You can run the container using the command `npm run dev fluent-bit` | ||
- OneUptime account | ||
- OneUptime project | ||
- Telemetry Ingestion Key (Create one from the OneUptime dashboard, Click on More -> Project Settings -> Telemetry Ingestion Key) | ||
|
||
|
||
## Configuration and Testing | ||
|
||
- Please make sure the correct token and url is in the configuration file located at `FluentBut/etc/fluent-bit.yaml`. | ||
- Build the docker image using the command `npm run force-build fluent-bit` | ||
- Run the docker image using the command `npm run dev fluent-bit` | ||
- Send logs to the Fluentd container using the curl command | ||
|
||
```bash | ||
curl -X POST -H "Content-Type: application/json" -d '{"log": "This is a test log message"}' http://localhost:8889 | ||
``` | ||
|
||
You should be able to see the logs in the OneUptime dashboard. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
service: | ||
flush: 1 | ||
log_level: info | ||
http_server: true | ||
http_listen: 0.0.0.0 | ||
http_port: 2020 | ||
|
||
pipeline: | ||
inputs: | ||
- name: random | ||
- name: http | ||
listen: 0.0.0.0 | ||
port: 8889 | ||
|
||
outputs: | ||
- name: stdout | ||
match: '*' | ||
match: '*' | ||
- name: opentelemetry | ||
match: '*' | ||
host: 'otel-collector' | ||
port: 4318 | ||
header: | ||
- x-oneuptime-token aaa670e0-ac15-11ef-9e8b-0bf23dab1c65 | ||
- x-oneuptime-service-name fluent-bit | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters