Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Distributed Computing
Common
vagrant-prometheus
Commits
629c6869
Commit
629c6869
authored
Aug 16, 2019
by
k.elaammari
Browse files
idempotenz datasource del & create, dashboard override
parent
cc32c80e
Changes
2
Hide whitespace changes
Inline
Side-by-side
provision/grafana/config/datasources/ds_prom.json
deleted
100644 → 0
View file @
cc32c80e
{
"name"
:
"promeheus"
,
"type"
:
"prometheus"
,
"url"
:
"http://10.0.0.100:9090"
,
"access"
:
"proxy"
,
"basicAuth"
:
false
}
\ No newline at end of file
provision/grafana/setup_grafana.sh
View file @
629c6869
...
...
@@ -38,10 +38,9 @@ apitoken="${temp#\"}"
key=
"
$(
sed
-e
's/\r//'
$cacertpath
)
"
# set correct tlsCACert to verify signing
json=
"
$(
jq
--arg
value
"
$key
"
'.secureJsonData.tlsCACert = $value'
$provision
/config/datasources/ds_influx.json
)
"
curl -X DELETE https
://localhost:3000/api/datasources/name/InfluxDB
-H
"Accept: application/json"
-H
"Content-Type: application/json"
-H
"Authorization: Bearer
$apitoken
"
--cacert
$cacertpath
2> /dev/null
curl -X POST https
://localhost:3000/api/datasources
-H
"Accept: application/json"
-H
"Content-Type: application/json"
-H
"Authorization: Bearer
$apitoken
"
--data
"
$json
"
--cacert
$cacertpath
2> /dev/null
echo
"Grafana datasources influx. "
#curl -X POST https
://localhost:3000/api/datasources
-H
"Accept: application/json"
-H
"Content-Type: application/json"
-H
"Authorization: Bearer
$apitoken
"
--data-binary
"
$provision
/config/datasources/ds_prom.json"
--cacert
$cacertpath
2> /dev/null
#echo
"Grafana datasources prometheus. "
# Dashboard
curl -X POST https
://localhost:3000/api/dashboards/db
-H
"Accept: application/json"
-H
"Content-Type: application/json"
-H
"Authorization: Bearer
$apitoken
"
--data-binary
"@
$provision
/config/dashboards/dash_production.json"
--cacert
$cacertpath
2> /dev/null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment