Refactor Markdown class to convert tags > and < to &gt; and &lt;

This commit is contained in:
Simon Larsen
2024-10-28 11:44:26 +00:00
parent 296791ed25
commit 3865f6cb06
11 changed files with 78 additions and 37 deletions

View File

@@ -4,4 +4,7 @@ FROM fluentd
USER root
# Install bash and curl.
RUN apk add bash curl
RUN apk add bash curl
EXPOSE 24224
EXPOSE 8888

View File

@@ -10,5 +10,18 @@ This guide will help you test fluentd logs with OneUptime.
- Telemetry Ingestion Key (Create one from the OneUptime dashboard, Click on More -> Project Settings -> Telemetry Ingestion Key)
## Configuration
## Configuration and Testing
- Please make sure the correct token and url is in the configuration file located at `Fluentd/fluent.conf`.
- Build the docker image using the command `npm run force-build fluentd`
- Run the docker image using the command `npm run dev fluentd`
- Send logs to the Fluentd container using the curl command
```bash
curl -X POST -d 'json={"action":"login","user":2}' http://localhost:8888/test.tag.here;
```
You should be able to see the logs in the OneUptime dashboard.

View File

@@ -10,15 +10,23 @@
bind 0.0.0.0
</source>
<source>
@type http
port 8888
bind 0.0.0.0
body_size_limit 32m
keepalive_timeout 10s
</source>
# Match all patterns
<match **>
@type http
# endpoint http://ingestor:3400/ingestor/fluentd/v1/logs # This is if you're testing in local development
endpoint http://ingestor:3400/ingestor/fluentd/v1/logs # This is for test environment
endpoint https://oneuptime.com/fluentd/logs # This is for prod environment
open_timeout 2
headers {"x-oneuptime-token":"6e16cfd0-5071-11ef-a5d5-e16a17b3db89", "x-oneuptime-service-name": "fluentd"}
# Please make sure you change the token and service name to your own
headers {"x-oneuptime-token":"caf42a30-8ace-11ef-b10a-eb9302809cb8", "x-oneuptime-service-name": "fluentd-logs"}
content_type application/json
json_array true