|
…
|
||
|---|---|---|
| .. | ||
| README.md | ||
| objectstorage-secret.yaml | ||
| thanos-query.yaml | ||
| tidb-monitor-with-additional-volumes.yaml | ||
| tidb-monitor.yaml | ||
README.md
TidbMonitor with Thanos
This document is to show how to integrate TidbMonitor with Thanos.
Install TidbMonitor
The following commands is assumed to be executed in this directory.
Install the monitor with thanos sidecar:
> kubectl -n <namespace> apply -f tidb-monitor.yaml
Wait for the monitor Pod ready:
watch kubectl -n <namespace> get pod
If you need to store historical data, you can create the corresponding secret and configure the objectStorageConfig field:
> kubectl -n <namespace> apply -f objectstorage-secret.yaml
apiVersion: pingcap.com/v1alpha1
kind: TidbMonitor
metadata:
name: basic
spec:
clusters:
- name: basic
thanos:
baseImage: thanosio/thanos
version: v0.17.2
objectStorageConfig:
key: objectstorage.yaml
name: thanos-objectstorage
Of course, you can also not configure it.
Install Thanos
Install thanos query component to integrate tidbmonitor :
> kubectl -n <namespace> apply -f thanos-query.yaml
Explore the thanos query dashboards:
> kubectl port-forward svc/thanos-query 9090:9090
Browse localhost:9090.
Destroy
> kubectl -n <namespace> delete -f ./