Skip to content

Commit

Permalink
Merge pull request #1636 from mesg-foundation/feature/monitoring-dash…
Browse files Browse the repository at this point in the history
…board

Reorganise monitoring configs and add default dashboards
  • Loading branch information
Nicolas Mahé authored Feb 4, 2020
2 parents 99bd7ea + 6dd63d9 commit 4a64a43
Show file tree
Hide file tree
Showing 6 changed files with 1,648 additions and 3 deletions.
17 changes: 15 additions & 2 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,21 @@ function start_engine {
fi

if $monitor; then
docker service create -p 3001:3000 --network=engine --name=engine-grafana --mount type=bind,source=$(pwd)/scripts/datasource.yml,destination=/etc/grafana/provisioning/datasources/datasource.yml grafana/grafana
docker service create -p 9090:9090 --network=engine --name=engine-prometheus --mount type=bind,source=$(pwd)/scripts/prometheus.yml,destination=/etc/prometheus/prometheus.yml prom/prometheus
docker service create \
-p 3001:3000 \
--network=engine \
--name=engine-grafana \
--mount type=bind,source=$(pwd)/scripts/monitoring/datasource.yml,destination=/etc/grafana/provisioning/datasources/datasource.yml \
--mount type=bind,source=$(pwd)/scripts/monitoring/dashboard.yml,destination=/etc/grafana/provisioning/dashboards/dashboard.yml \
--mount type=bind,source=$(pwd)/scripts/monitoring/dashboards,destination=/var/lib/grafana/dashboards \
grafana/grafana

docker service create \
-p 9090:9090 \
--network=engine \
--name=engine-prometheus \
--mount type=bind,source=$(pwd)/scripts/monitoring/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
prom/prometheus
fi

mkdir -p $MESG_PATH
Expand Down
24 changes: 24 additions & 0 deletions scripts/monitoring/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: 1

providers:
# <string> an unique provider name
- name: 'dashboard'
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string, required> name of the dashboard folder. Required
folder: ''
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# <string, required> provider type. Required
type: file
# <bool> disable dashboard deletion
disableDeletion: false
# <bool> enable dashboard editing
editable: true
# <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 10
# <bool> allow updating provisioned dashboards from the UI
allowUiUpdates: false
options:
# <string, required> path to dashboard files on disk. Required
path: /var/lib/grafana/dashboards
Loading

0 comments on commit 4a64a43

Please sign in to comment.