mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 17:53:28 +00:00
91b4a663b9
* Add prometheus endpoint to expose system stats * Add heealthz endpoint * Add gops endpoint for real time troubleshooting * Deprecate httprof endpoint
25 lines
635 B
Bash
Executable file
25 lines
635 B
Bash
Executable file
#!/bin/bash
|
|
|
|
until $(curl --output /dev/null --silent --head --fail http://grafana:3000); do
|
|
echo 'waiting for grafana to respond'
|
|
sleep 5
|
|
done
|
|
|
|
echo "grafana is up setting up dashboards and data sources"
|
|
|
|
curl -s -H "Content-Type: application/json" \
|
|
-XPOST http://admin:admin@grafana:3000/api/datasources \
|
|
-d @- <<EOF
|
|
{
|
|
"name": "InfluxDB",
|
|
"type": "influxdb",
|
|
"access": "proxy",
|
|
"url": "http://influxdb:8086",
|
|
"database": "telegraf"
|
|
}
|
|
EOF
|
|
|
|
curl -X POST -d @/mnt/health-dashboard.json 'http://admin:admin@grafana:3000/api/dashboards/db' --header 'Content-Type: application/json'
|
|
|
|
echo "all done!"
|