https://github.com/simlay/fluent-bit-exercise
https://github.com/simlay/fluent-bit-exercise
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simlay/fluent-bit-exercise
- Owner: simlay
- Created: 2023-08-25T21:33:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T01:27:45.000Z (almost 2 years ago)
- Last Synced: 2026-01-02T21:39:56.071Z (6 months ago)
- Language: Rust
- Size: 188 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://codecov.io/gh/simlay/fluent-bit-exercise)
# Overview
This is an exercise in listening on `127.0.0.1:4242` for some simple json messages from `fluent-bit`.
# Running
```
fluent-bit -i random -o tcp://127.0.0.1:4242 -p format=json_lines &
cargo run
```
There are also options for:
* `--addr` - the bind address to listen on. Defaults to `127.0.0.1:4242`
* `--sleep-timeout` - The amount of seconds to wait between web requests. Defaults to `60` seconds.
* `--out-file` - Where to write url response from the post requests. Defaults to `/dev/stdout`.
* `--max-count` - The number of web requests this process should do before quitting. Defaults to `u64::MAX`.
# Testing
`./tests.sh` is a non comprehensive test script. This project is about counting
even and odd values from the random data from `fluent-bit` and then sending a
`POST` request to `paste.c-net.org`