-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
520212f
commit 6768936
Showing
8 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.3' | ||
services: | ||
|
||
prometheus: | ||
build: './prometheus' | ||
container_name: 'prometheus' | ||
ports: | ||
- '9090:9090' | ||
|
||
grafana: | ||
build: './grafana' | ||
container_name: 'grafana' | ||
ports: | ||
- '3000:3000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM grafana/grafana:5.0.4 | ||
ADD ./provisioning /etc/grafana/provisioning | ||
ADD ./config.ini /etc/grafana/config.ini | ||
ADD ./dashboards /var/lib/grafana/dashboards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[paths] | ||
provisioning = /etc/grafana/provisioning | ||
|
||
[server] | ||
enable_gzip = true |
220 changes: 220 additions & 0 deletions
220
metrics-sample/docker/grafana/dashboards/mydashboard.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": "-- Grafana --", | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"editable": true, | ||
"gnetId": null, | ||
"graphTooltip": 0, | ||
"id": null, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"aliasColors": {}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"datasource": "prometheus", | ||
"fill": 1, | ||
"gridPos": { | ||
"h": 9, | ||
"w": 12, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"legend": { | ||
"avg": false, | ||
"current": false, | ||
"max": false, | ||
"min": false, | ||
"show": false, | ||
"total": false, | ||
"values": false | ||
}, | ||
"lines": true, | ||
"linewidth": 1, | ||
"links": [], | ||
"nullPointMode": "null", | ||
"percentage": false, | ||
"pointradius": 5, | ||
"points": false, | ||
"renderer": "flot", | ||
"seriesOverrides": [], | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"targets": [ | ||
{ | ||
"expr": "system_cpu_usage", | ||
"format": "time_series", | ||
"intervalFactor": 1, | ||
"refId": "A" | ||
} | ||
], | ||
"thresholds": [], | ||
"timeFrom": "10m", | ||
"timeShift": null, | ||
"title": "CPU Usage", | ||
"tooltip": { | ||
"shared": true, | ||
"sort": 0, | ||
"value_type": "individual" | ||
}, | ||
"type": "graph", | ||
"xaxis": { | ||
"buckets": null, | ||
"mode": "time", | ||
"name": null, | ||
"show": true, | ||
"values": [] | ||
}, | ||
"yaxes": [ | ||
{ | ||
"decimals": 0, | ||
"format": "percentunit", | ||
"label": "", | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
}, | ||
{ | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": false | ||
} | ||
] | ||
}, | ||
{ | ||
"aliasColors": {}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"datasource": "prometheus", | ||
"fill": 1, | ||
"gridPos": { | ||
"h": 9, | ||
"w": 12, | ||
"x": 12, | ||
"y": 0 | ||
}, | ||
"id": 4, | ||
"legend": { | ||
"avg": false, | ||
"current": false, | ||
"max": false, | ||
"min": false, | ||
"show": false, | ||
"total": false, | ||
"values": false | ||
}, | ||
"lines": true, | ||
"linewidth": 1, | ||
"links": [], | ||
"nullPointMode": "null", | ||
"percentage": false, | ||
"pointradius": 5, | ||
"points": false, | ||
"renderer": "flot", | ||
"seriesOverrides": [], | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"targets": [ | ||
{ | ||
"expr": "jvm_memory_used_bytes", | ||
"format": "time_series", | ||
"intervalFactor": 1, | ||
"refId": "A" | ||
} | ||
], | ||
"thresholds": [], | ||
"timeFrom": "10m", | ||
"timeShift": null, | ||
"title": "Memory usage", | ||
"tooltip": { | ||
"shared": true, | ||
"sort": 0, | ||
"value_type": "individual" | ||
}, | ||
"type": "graph", | ||
"xaxis": { | ||
"buckets": null, | ||
"mode": "time", | ||
"name": null, | ||
"show": true, | ||
"values": [] | ||
}, | ||
"yaxes": [ | ||
{ | ||
"format": "decbytes", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
}, | ||
{ | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": false | ||
} | ||
] | ||
} | ||
], | ||
"schemaVersion": 16, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": { | ||
"refresh_intervals": [ | ||
"5s", | ||
"10s", | ||
"30s", | ||
"1m", | ||
"5m", | ||
"15m", | ||
"30m", | ||
"1h", | ||
"2h", | ||
"1d" | ||
], | ||
"time_options": [ | ||
"5m", | ||
"15m", | ||
"1h", | ||
"6h", | ||
"12h", | ||
"24h", | ||
"2d", | ||
"7d", | ||
"30d" | ||
] | ||
}, | ||
"timezone": "", | ||
"title": "Basic Dashboard", | ||
"uid": "aOXo8gmmk", | ||
"version": 1 | ||
} |
6 changes: 6 additions & 0 deletions
6
metrics-sample/docker/grafana/provisioning/dashboards/all.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- name: 'default' | ||
org_id: 1 | ||
folder: '' | ||
type: 'file' | ||
options: | ||
folder: '/var/lib/grafana/dashboards' |
9 changes: 9 additions & 0 deletions
9
metrics-sample/docker/grafana/provisioning/datasources/all.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
datasources: | ||
- name: 'prometheus' | ||
type: 'prometheus' | ||
access: 'proxy' | ||
org_id: 1 | ||
url: 'http://prometheus:9090' | ||
is_default: true | ||
version: 1 | ||
editable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM prom/prometheus | ||
ADD prometheus.yml /etc/prometheus/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
global: | ||
scrape_interval: 2s | ||
scrape_timeout: 1s | ||
evaluation_interval: 15s | ||
alerting: | ||
alertmanagers: | ||
- static_configs: | ||
- targets: [] | ||
scheme: http | ||
timeout: 10s | ||
scrape_configs: | ||
- job_name: prometheusdocker build -t my-prometheus . | ||
scrape_interval: 2s | ||
scrape_timeout: 1s | ||
metrics_path: /metrics | ||
scheme: http | ||
static_configs: | ||
- targets: | ||
- docker.for.mac.host.internal:8080 |