mirror of https://github.com/istio/tools.git
|
…
|
||
|---|---|---|
| .. | ||
| README.md | ||
| export_grafana_snapshot.py | ||
| redeploy.sh | ||
| requirements.txt | ||
| root-transition.sh | ||
| setup_cluster.sh | ||
| update_dns.py | ||
README.md
export_grafana_snapshot
Description
The script run at specified interval to export the selected snapshots url to google cloud datastore with extra attributes such as time, tags. User can then search snapshots by different attributes on datastore console. The dashboard name and snapshot interval can be set through command line.
Due to limitation of grafana snapshot API, the implementation is done with selenium, so there is some uncertain latency.
Dependency
pip3 install -r ./requirements.txt
Setup
- Verify grafana working, reference: https://istio.io/docs/tasks/telemetry/metrics/using-istio-dashboard/
- Set
grafana_api_tokenenv variable. Navigate to local running grafana url to get the API key, if no one exists, generate a new one with admin permission - Set
GOOGLE_APPLICATION_CREDENTIALSenv variable. Follow the instruction here: https://cloud.google.com/docs/authentication/getting-started - Setup google cloud datastore, go to google cloud console and enable datastore in datastore mode.
- If you do not have ChromeDriver in your PATH, download corresponding release to PATH from here: http://chromedriver.chromium.org/downloads
Command Line Arguments
--period: interval to export the snapshot url, default=1--dashboard_name: name of dashboard to export, default="istio performance"
TODO
- Add multiple dashboards support