Containerlab
The purpose of this deployment is to collect gNMI data and use Prometheus remote write API to push it to different monitoring systems like Prometheus, Mimir, CortexMetrics, VictoriaMetrics, Thanos...
This deployment example includes a single gnmic
instance, a Prometheus Server, and a Grafana server.
Deployment files:
The deployed SR Linux nodes are discovered using Docker API and are loaded as gNMI targets. Edit the subscriptions section if needed.
Deploy it with:
git clone https://github.com/openconfig/gnmic.git
cd gnmic/examples/deployments/1.single-instance/6.prometheus-write-output/containerlab
sudo clab deploy -t prometheus.clab.yaml
+----+-------------------------+--------------+------------------------------+-------+---------+-----------------+--------------+
| # | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address |
+----+-------------------------+--------------+------------------------------+-------+---------+-----------------+--------------+
| 1 | clab-lab16-consul-agent | 10054b55e722 | consul:latest | linux | running | 172.19.19.3/24 | N/A |
| 2 | clab-lab16-gnmic | 1eeab0771731 | ghcr.io/openconfig/gnmic:latest | linux | running | 172.19.19.5/24 | N/A |
| 3 | clab-lab16-grafana | fd09146937ef | grafana/grafana:latest | linux | running | 172.19.19.2/24 | N/A |
| 4 | clab-lab16-leaf1 | 0c8f5bf7bafb | ghcr.io/nokia/srlinux | srl | running | 172.19.19.11/24 | N/A |
| 5 | clab-lab16-leaf2 | a33868bef0a3 | ghcr.io/nokia/srlinux | srl | running | 172.19.19.9/24 | N/A |
| 6 | clab-lab16-leaf3 | 3fb3b459cd48 | ghcr.io/nokia/srlinux | srl | running | 172.19.19.10/24 | N/A |
| 7 | clab-lab16-leaf4 | bb2cbc064b05 | ghcr.io/nokia/srlinux | srl | running | 172.19.19.6/24 | N/A |
| 8 | clab-lab16-prometheus | 63b6fb1551de | prom/prometheus:latest | linux | running | 172.19.19.4/24 | N/A |
| 9 | clab-lab16-spine1 | 76853ab9c4a8 | ghcr.io/nokia/srlinux | srl | running | 172.19.19.8/24 | N/A |
| 10 | clab-lab16-spine2 | fdf42ca0fec1 | ghcr.io/nokia/srlinux | srl | running | 172.19.19.7/24 | N/A |
+----+-------------------------+--------------+------------------------------+-------+---------+-----------------+--------------+
Check the Prometheus Remote Write output documentation page for more configuration options.