|
1 | 1 | # cmk-rustik |
2 | 2 |
|
3 | | -A currently-unofficial re-implementation of |
4 | | -[checkmk_kube_agent](https://github.com/Checkmk/checkmk_kube_agent/) in Rust. |
5 | | - |
6 | | -**Currently a work-in-progress/experiment.** |
7 | | - |
8 | | -Right now a focus is matching the Python implementation pretty-darn-close to |
9 | | -1:1. This means: not modifying the "wire protocols" (i.e. the JSON schemas) |
10 | | -sent and expected. |
11 | | - |
12 | | -This makes each individual component drop-in. |
13 | | - |
14 | | -## Components |
15 | | - |
16 | | -#### `metrics-cache` _(aka: `cluster_collector` in the Python original)_ |
17 | | - |
18 | | -This is effectively an in-memory cache server that functions over HTTP and |
19 | | -authenticates requests against the Kubernetes cluster in which it is running. |
20 | | - |
21 | | -Because the cache is embedded (not some external service), **one instance** |
22 | | -is expected to be running per cluster. (In the future, we could allow for an |
23 | | -external backing cache or some kind of tiered L1/L2 layered caching and then |
24 | | -permit multiple instances of `metrics-cache` to run for HA.) |
25 | | - |
26 | | -Requests are expected to have a ServiceAccount token as a Bearer token. This is |
27 | | -validated by Kubernetes (internally, a `TokenReview` is sent to Kubernetes and |
28 | | -the result is validated and then checked against the allowlist which is |
29 | | -configured by `metrics-cache`'s CLI arguments). |
30 | | - |
31 | | -There are/will be three internally-maintained caches in total: |
32 | | - |
33 | | -* Container metrics (for metrics coming from cAdvisor) |
34 | | -* Machine sections (for storing a copy of the `check_mk_agent` output to gather |
35 | | - *node* information) |
36 | | -* `metrics-fetcher` metadata (for storing metadata about the `metics-fetcher` |
37 | | - instances sending data to the `metrics-cache`). |
38 | | - |
39 | | -#### `metrics-fetcher` _(aka: `node_collector` in the Python original)_ |
40 | | - |
41 | | -A "metrics fetcher", as the name suggests, fetches metrics from some source. It |
42 | | -then forwards those to the metrics cache instance for consumption by Checkmk. |
43 | | - |
44 | | -The metrics fetcher is one binary that can be run in two different modes: |
45 | | - |
46 | | -* "cAdvisor mode" - fetch container metrics from a cAdvisor instance |
47 | | -* "cmk-agent mode" - run and collect sections from a `check_mk_agent` script |
48 | | - |
| 3 | +WIP Kubernetes experiments with Checkmk. |
49 | 4 |
|
50 | 5 | ## License |
51 | 6 |
|
52 | | -GPLv2, same as the Python original. |
| 7 | +GPLv2 |
0 commit comments