|
1 | 1 | # TelemetryOps |
2 | 2 |
|
| 3 | +[](https://github.com/derekk024/TelemetryOps/actions/workflows/ci.yml) |
| 4 | + |
3 | 5 | TelemetryOps is a small C++20 telemetry pipeline for accepting simulated satellite events, storing them in SQLite, calculating rolling health metrics, and evaluating configurable alert thresholds. It is split into three HTTP services so ingestion, aggregation, and alert evaluation can be run and inspected independently. |
4 | 6 |
|
5 | 7 | ## Architecture |
@@ -31,7 +33,7 @@ Each service also exposes process-local request counters in the Prometheus text |
31 | 33 | - A C++20 compiler |
32 | 34 | - SQLite 3 development headers and library |
33 | 35 | - Git and network access during the first CMake configuration |
34 | | -- Python 3 to use the optional load generator |
| 36 | +- Python 3 to run the integration test or optional load generator |
35 | 37 | - `curl` to run the examples below |
36 | 38 |
|
37 | 39 | CMake fetches these pinned dependencies during configuration: |
@@ -72,6 +74,25 @@ build/services/aggregator/aggregator |
72 | 74 | build/services/controlplane/controlplane |
73 | 75 | ``` |
74 | 76 |
|
| 77 | +## Test |
| 78 | + |
| 79 | +The automated suite covers both domain rules and the running service pipeline: |
| 80 | + |
| 81 | +- JSON event validation and SQLite event-ID idempotency |
| 82 | +- weighted packet-drop aggregation, percentile interpolation, and link-quality averaging |
| 83 | +- alert threshold boundaries and aggregator failures |
| 84 | +- real ingest and aggregator processes using a temporary SQLite database, including validation errors, duplicate suppression, satellite/window filtering, aggregate responses, and Prometheus counters |
| 85 | + |
| 86 | +Build and run every test through CTest: |
| 87 | + |
| 88 | +```bash |
| 89 | +cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON |
| 90 | +cmake --build build --parallel |
| 91 | +ctest --test-dir build --output-on-failure |
| 92 | +``` |
| 93 | + |
| 94 | +GitHub Actions runs the same build and test sequence for pull requests and pushes to `main`. |
| 95 | + |
75 | 96 | ## Run locally |
76 | 97 |
|
77 | 98 | Start the services in order. The ingest service must create the database and schema before the aggregator opens that database in read-only mode. |
@@ -293,31 +314,37 @@ The final line reports responses received by the generator. It is a paced traffi |
293 | 314 | - No retention policy or database cleanup |
294 | 315 | - No durable control-plane configuration or alert history |
295 | 316 | - No alert delivery mechanism beyond the HTTP response and counters |
296 | | -- No automated test suite or continuous-integration workflow |
297 | 317 | - No container or multi-host deployment configuration |
298 | 318 | - Aggregation loads all matching window rows into memory before calculating percentiles |
299 | 319 | - One SQLite connection per data service, without an application-level connection pool |
300 | | -- `common/include/common/telemetry.hpp` is currently a placeholder; the services do not share a domain-model implementation |
301 | 320 |
|
302 | 321 | ## Project structure |
303 | 322 |
|
304 | 323 | ```text |
305 | 324 | . |
| 325 | +├── .github/workflows/ci.yml |
306 | 326 | ├── CMakeLists.txt |
307 | 327 | ├── common/ |
308 | | -│ └── include/common/telemetry.hpp |
| 328 | +│ └── include/common/ |
| 329 | +│ ├── aggregation.hpp |
| 330 | +│ ├── alerts.hpp |
| 331 | +│ └── telemetry.hpp |
309 | 332 | ├── scripts/ |
310 | 333 | │ └── load_test.py |
311 | | -└── services/ |
312 | | - ├── ingest/ |
313 | | - │ ├── CMakeLists.txt |
314 | | - │ └── main.cpp |
315 | | - ├── aggregator/ |
316 | | - │ ├── CMakeLists.txt |
317 | | - │ └── main.cpp |
318 | | - └── controlplane/ |
319 | | - ├── CMakeLists.txt |
320 | | - └── main.cpp |
| 334 | +├── services/ |
| 335 | +│ ├── ingest/ |
| 336 | +│ │ ├── CMakeLists.txt |
| 337 | +│ │ └── main.cpp |
| 338 | +│ ├── aggregator/ |
| 339 | +│ │ ├── CMakeLists.txt |
| 340 | +│ │ └── main.cpp |
| 341 | +│ └── controlplane/ |
| 342 | +│ ├── CMakeLists.txt |
| 343 | +│ └── main.cpp |
| 344 | +└── tests/ |
| 345 | + ├── CMakeLists.txt |
| 346 | + ├── domain_tests.cpp |
| 347 | + └── service_pipeline_test.py |
321 | 348 | ``` |
322 | 349 |
|
323 | 350 | ## License |
|
0 commit comments