Update Fluent Bit documentation and configuration for OneUptime telemetry ingestion

This commit is contained in:
Simon Larsen
2024-12-06 11:58:40 +00:00
parent 26f6a14e93
commit dc5e2c0d40
2 changed files with 66 additions and 8 deletions

View File

@@ -47,9 +47,50 @@ Once you created a token, click on "View" to view the token.
## Configuration
You can use the following configuration to send the telemetry data to the OneUptime OpenTelemetry HTTP Collector. You can add this configuration to the fluentbit configuration file. The configuration file is usually located at `/etc/fluent-bit/fluent-bit.yaml`.
You can use the following configuration to send the telemetry data to the OneUptime OpenTelemetry HTTP Collector. You can add this configuration to the fluentbit configuration file. The configuration file is usually located at `/etc/fluent-bit/fluent-bit.yaml`. Here's how an outputs section of the configuration file would look like:
```yaml
outputs:
- name: stdout
match: '*'
- name: opentelemetry
match: '*'
host: 'oneuptime.com'
port: 443
metrics_uri: '/otlp/v1/metrics'
logs_uri: '/otlp/v1/logs'
traces_uri: '/otlp/v1/traces'
tls: On
tls.verify: Off
header:
- x-oneuptime-token YOUR_TELEMETRY_INGESTION_TOKEN
```
Please make sure you have opentelemetry_envelope in your input section. Here's an example of how the input section would look like:
```yaml
pipeline:
inputs:
# Your inputs
processors:
logs:
- name: opentelemetry_envelope
- name: content_modifier
context: otel_resource_attributes
action: upsert
key: service.name
# Please replace YOUR_SERVICE_NAME with the name of your service
value: YOUR_SERVICE_NAME
```
Here is the example complete configuration file:
```yaml
service:
flush: 1
@@ -69,7 +110,6 @@ pipeline:
context: otel_resource_attributes
action: upsert
key: service.name
# Please have your service name here
value: YOUR_SERVICE_NAME
outputs:
@@ -77,19 +117,37 @@ pipeline:
match: '*'
- name: opentelemetry
match: '*'
host: 'oneuptime.com' # OneUptime OpenTelemetry HTTP Collector
host: 'oneuptime.com'
port: 443
metrics_uri: '/otlp/v1/metrics'
logs_uri: '/otlp/v1/logs'
traces_uri: '/otlp/v1/traces'
port: 443
tls: On
tls.verify: Off
header:
- x-oneuptime-token YOUR_SERVICE_TOKEN
- x-oneuptime-token YOUR_TELEMETRY_INGESTION_TOKEN
```
**If you're self hosting OneUptime**: If you're self hosting OneUptime you can replace the `host` with the host of your OneUptime instance. If you're hosting on http server and not https, you can replace the `port` with the port of your OneUptime instance (likely port 80).
In this case the configuration would look like:
```yaml
outputs:
- name: stdout
match: '*'
- name: opentelemetry
match: '*'
host: 'your-oneuptime-instance.com'
port: 80
metrics_uri: '/otlp/v1/metrics'
logs_uri: '/otlp/v1/logs'
traces_uri: '/otlp/v1/traces'
header:
- x-oneuptime-token YOUR_TELEMETRY_INGESTION_TOKEN
```
## Usage
Once you have added the configuration to the fluentbit configuration file, you can restart the fluentd service. Once the service is restarted, the telemetry data will be sent to the OneUptime HTTP Source. You can now start seeing the telemetry data in the OneUptime dashboard. If you have any questions or need help with the configuration, please reach out to us at support@oneuptime.com
Once you have added the configuration to the fluentbit configuration file, you can restart the fluentbit service. Once the service is restarted, the telemetry data will be sent to the OneUptime HTTP Source. You can now start seeing the telemetry data in the OneUptime dashboard. If you have any questions or need help with the configuration, please reach out to us at support@oneuptime.com

View File

@@ -31,7 +31,7 @@ pipeline:
tls: On
tls.verify: Off
header:
- x-oneuptime-token 9ae975b0-b333-11ef-92d2-9fe012af0314
- x-oneuptime-token 1e603f70-b3c8-11ef-9018-bdd11a3584d1