The Tetragonsidekick project is a Kubernetes operator designed to process logs emitted by Tetragon pods, enhance the logs using an LLM (Large Language Model), and forward them to an OpenSearch server for future analysis. This project uses Redpands as the central data platform for event streaming, ensuring scalability and real-time processing.
- Log Streaming: Captures logs from Tetragon pods in the
kube-systemnamespace and streams them into a Redpanda topic. - Protobuf Serialization: Processes Tetragon logs using the official
events.protodefinitions. - Event Enhancement: Uses an LLM (e.g., OpenAI GPT-4) to analyze and enhance events.
- OpenSearch Integration: Forward enhanced logs to OpenSearch for indexing and analytics.
- Scalable Architecture: Built on Redpanda for efficient and scalable data processing.
- Tetragon Pods:
- Emit structured logs in protobuf format.
- Custom Kubernetes Controller:
- Captures logs from Tetragon pods.
- Serializes logs using Tetragon’s protobuf definitions.
- Streams logs to Redpands.
- Stream Processor:
- Enhances logs using an LLM.
- Writes enhanced logs back to a separate Redpands topic.
- OpenSearch Sink:
- Consumes enhanced logs from Redpands.
- Indexes them in OpenSearch.
The official Tetragon protobuf for events provides a structured way to work with Tetragon logs. By leveraging this, you can deserialize and process events effectively, ensuring compatibility with Tetragon's data structure. Below is a detailed implementation plan using the protobuf definitions and integrating Redpands for a data-driven architecture. Sample event.json.
- Kubernetes Cluster: A running Kubernetes cluster (v1.29 or higher).
- Linux kernel >= 4.19 (for eBPF)
- Redpands: Installed in the cluster.
- OpenSearch: Running in the cluster or externally.
- Operator SDK: Installed on your development machine.
- Protobuf Compiler:
protocmust be installed.
todo
todo
todo
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Mitchell Murphy - @mitchellmurphy | mitchmurphy.io
Project Link: https://github.com/mkm29/tetragonsidekick
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!