2018-06-09 08:29:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#set -e
|
|
|
|
|
|
|
|
# ADD INFLUXDB DATASOURCE
|
2018-06-10 13:44:52 +00:00
|
|
|
curl -s -H "Content-Type: application/json" \
|
2018-06-17 11:05:55 +00:00
|
|
|
-XPOST http://admin:nimda321@localhost:3000/api/datasources \
|
2018-06-09 08:29:15 +00:00
|
|
|
-d @- <<EOF
|
|
|
|
{
|
|
|
|
"name": "influxdb",
|
|
|
|
"type": "influxdb",
|
|
|
|
"access": "proxy",
|
|
|
|
"url": "http://influxdb:8086",
|
|
|
|
"database": "telegraf",
|
|
|
|
"user":"telegraf",
|
2018-06-17 11:05:55 +00:00
|
|
|
"password":"nimda321",
|
2018-06-09 08:29:15 +00:00
|
|
|
"basicAuth":false
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
## ADD PROMETHEUS DATASOURCE
|
2018-06-10 13:44:52 +00:00
|
|
|
curl -s -H "Content-Type: application/json" \
|
2018-06-17 11:05:55 +00:00
|
|
|
-XPOST http://admin:nimda321@localhost:3000/api/datasources \
|
2018-06-09 08:29:15 +00:00
|
|
|
-d @- <<EOF
|
|
|
|
{
|
|
|
|
"name": "prometheus",
|
|
|
|
"type": "prometheus",
|
|
|
|
"access": "proxy",
|
|
|
|
"url": "http://prometheus:9090"
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|