https://github.com/subconsciouscompute/tetragon-grpc-client
a gRPC client for tetragon
https://github.com/subconsciouscompute/tetragon-grpc-client
grpc library rust rust-lang tetragon tonic
Last synced: about 2 months ago
JSON representation
a gRPC client for tetragon
- Host: GitHub
- URL: https://github.com/subconsciouscompute/tetragon-grpc-client
- Owner: SubconsciousCompute
- Created: 2024-03-12T07:50:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-22T08:47:32.000Z (over 2 years ago)
- Last Synced: 2025-02-23T05:22:39.282Z (over 1 year ago)
- Topics: grpc, library, rust, rust-lang, tetragon, tonic
- Language: Rust
- Homepage: https://tetragon.io/docs/reference/grpc-api/
- Size: 75.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tetragon-grpc demo
How to use tetragon grpc server in Rust!
## Demo
_This may be outdated. `cargo run` should launch the demo._

## Cloning
```sh
git clone https://github.com/SubconsciousCompute/tetragon-grpc-client.git
```
## Running Policy Manager
```sh
$ cargo run --example policy --
```
### Options:
- `list`
- `add`
- `remove`
Create a file with some content `cat foo2thebar > /tmp/tetragon`. \
cat the said file and see some output. \
Then add the policy `cargo run --example policy -- add`. \
cat the said file again and see cat gets killed before it can read. \
Run `cargo run --example policy -- list` to list the policies. \
Then remove the policy `cargo run --example policy -- remove`. \
cat said file again to see that it works.
# Running demo
This demo mimic command `sudo tetra --server-address unix:///var/run/tetragon/tetragon.sock getevents`
> *NOTE:* Requires Root. The program will ask for sudo password.
```sh
$ cargo run
```
## Troubleshooting
If you're requests aren't happening as you expect, try checking the [tetra cli code](https://github.com/cilium/tetragon/blob/main/cmd/tetra/main.go)
and how they create their request objects.