Skip to content

Commit 36b0127

Browse files
committed
promtorture: more
1 parent bfbf539 commit 36b0127

File tree

6 files changed

+875
-7
lines changed

6 files changed

+875
-7
lines changed

testcases/promtorture/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Make prometheus feel really bad. For science.
1111
sleep 10
1212
1313
./scripts/resources
14-
./scripts/promapi -m tsdb | yq .data.headStats
14+
./scripts/promapi -m tsdb-head
1515
./scripts/promapi -m tsdb -l 100
1616
1717
```
@@ -44,3 +44,37 @@ go build
4444
- [`get-promtool`](./scripts/get-promtool): download the `promtool` binary from a prometheus release,
4545
for if you want to run `promtool` over SOCKS5 or port-forward rather than in the prom container, e.g
4646
for `promtool debug` dump generation.
47+
48+
## Handy tips
49+
50+
### Use `k8s-insider` to talk to the services
51+
52+
See https://github.com/TrueGoric/k8s-insider
53+
54+
Assuming Ubuntu 24.04:
55+
56+
```
57+
sudo apt install wireguard
58+
kubectl insider install --pod-cidr 10.244.0.18/16
59+
kubectl insider create network
60+
kubectl insider connect
61+
resolvectl domain insider0 cluster.local
62+
```
63+
64+
This will give you the ability to directly query kube services like `prometheus-k8s.monitoring.svc.cluster.local` or visit http://grafana.monitoring.svc.cluster.local:3000 directly in a browser.
65+
66+
### Grafana dashboard
67+
68+
See [`resources`](./resources/grafana-dashboards/promtorture.json).
69+
70+
There's no script to auto-load it yet, import it yourself.
71+
72+
### Use `promtool` to run promql, inspect labels etc
73+
74+
e.g.
75+
76+
```
77+
scripts/promcmd promtool query instant http://localhost:9090 'up{job="monitoring/promtorture"}'
78+
```
79+
80+
Other tips in `scripts/promcmd` comments.

0 commit comments

Comments
 (0)