Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Swarmprom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Globars Forks
Swarmprom
Commits
911b4546
Unverified
Commit
911b4546
authored
Mar 13, 2018
by
Stefan Prodan
Committed by
GitHub
Mar 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from hastarin/master
Update Grafana to 5.0.1 and update Prometheus dashboard.
parents
55f65270
6f948548
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
4782 additions
and
4747 deletions
+4782
-4747
docker-compose.yml
docker-compose.yml
+1
-1
grafana/.dockerignore
grafana/.dockerignore
+1
-0
grafana/Dockerfile
grafana/Dockerfile
+5
-6
grafana/dashboards/swarmprom-nodes-dash.json
grafana/dashboards/swarmprom-nodes-dash.json
+1663
-1661
grafana/dashboards/swarmprom-prometheus-dash.json
grafana/dashboards/swarmprom-prometheus-dash.json
+1236
-1163
grafana/dashboards/swarmprom-services-dash.json
grafana/dashboards/swarmprom-services-dash.json
+1852
-1840
grafana/datasources/prometheus.json
grafana/datasources/prometheus.json
+0
-1
grafana/datasources/prometheus.yaml
grafana/datasources/prometheus.yaml
+13
-0
grafana/docker-entrypoint.sh
grafana/docker-entrypoint.sh
+0
-75
grafana/swarmprom_dashboards.yml
grafana/swarmprom_dashboards.yml
+11
-0
No files found.
docker-compose.yml
View file @
911b4546
...
...
@@ -58,7 +58,7 @@ services:
memory
:
64M
grafana
:
image
:
stefanprodan/swarmprom-grafana:4.6.3
image
:
hastarin/swarmprom-grafana:5.0.1
networks
:
-
net
environment
:
...
...
grafana/.dockerignore
0 → 100644
View file @
911b4546
screens/
grafana/Dockerfile
View file @
911b4546
FROM
grafana/grafana:
4.6.3
FROM
grafana/grafana:
5.0.1
# https://hub.docker.com/r/grafana/grafana/tags/
COPY
d
ocker-entrypoint.sh /etc/grafana/docker-entrypoint.sh
COPY
datasources /etc/grafana/datasource
s/
COPY
d
atasources /etc/grafana/provisioning/datasources/
COPY
swarmprom_dashboards.yml /etc/grafana/provisioning/dashboard
s/
COPY
dashboards /etc/grafana/dashboards/
ENV
GF_SECURITY_ADMIN_PASSWORD=admin \
GF_SECURITY_ADMIN_USER=admin
ENTRYPOINT
["/etc/grafana/docker-entrypoint.sh"]
GF_SECURITY_ADMIN_USER=admin \
GF_PATHS_PROVISIONING=/etc/grafana/provisioning/
grafana/dashboards/swarmprom-nodes-dash.json
View file @
911b4546
{
"dashboard"
:
{
"annotations"
:
{
"list"
:
[]
},
"description"
:
"Docker Swarm nodes metrics"
,
"editable"
:
true
,
"gnetId"
:
null
,
"graphTooltip"
:
0
,
"hideControls"
:
true
,
"id"
:
null
,
"links"
:
[],
"refresh"
:
"30s"
,
"rows"
:
[
"annotations"
:
{
"list"
:
[
{
"collapse"
:
false
,
"height"
:
"130"
,
"panels"
:
[
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
1
,
"format"
:
"s"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"hideTimeOverride"
:
true
,
"id"
:
2
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"span"
:
3
,
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"topk(1, sum((node_time - node_boot_time) * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
}) by (node_name))"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
2
}
],
"thresholds"
:
""
,
"timeFrom"
:
"1m"
,
"timeShift"
:
null
,
"title"
:
"Uptime"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
0
,
"format"
:
"none"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"id"
:
1
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"span"
:
3
,
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"count(node_meta * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
})"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
20
}
],
"thresholds"
:
""
,
"title"
:
"Nodes"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
0
,
"format"
:
"short"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"hideTimeOverride"
:
true
,
"id"
:
4
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"span"
:
3
,
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"count(node_cpu{mode=
\"
idle
\"
} * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
})"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
2
}
],
"thresholds"
:
""
,
"timeFrom"
:
"1m"
,
"timeShift"
:
null
,
"title"
:
"CPUs"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
null
,
"format"
:
"percent"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
true
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"hideTimeOverride"
:
true
,
"id"
:
11
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"span"
:
3
,
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"sum(irate(node_cpu{mode=
\"
idle
\"
}[$interval]) * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
}) * 100 / count(node_cpu{mode=
\"
user
\"
} * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
}) "
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
2
}
],
"thresholds"
:
"10,25,100"
,
"timeFrom"
:
"1m"
,
"timeShift"
:
null
,
"title"
:
"CPU Idle"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
}
],
"repeat"
:
null
,
"repeatIteration"
:
null
,
"repeatRowId"
:
null
,
"showTitle"
:
false
,
"title"
:
"UPTIME & CPU STATS"
,
"titleSize"
:
"h6"
"$$hashKey"
:
"object:157"
,
"builtIn"
:
1
,
"datasource"
:
"-- Grafana --"
,
"enable"
:
true
,
"hide"
:
true
,
"iconColor"
:
"rgba(0, 211, 255, 1)"
,
"name"
:
"Annotations & Alerts"
,
"type"
:
"dashboard"
}
]
},
"description"
:
"Docker Swarm nodes metrics"
,
"editable"
:
true
,
"gnetId"
:
null
,
"graphTooltip"
:
0
,
"iteration"
:
1520585531240
,
"links"
:
[],
"panels"
:
[
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
"Prometheus"
,
"decimals"
:
1
,
"format"
:
"s"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"gridPos"
:
{
"h"
:
4
,
"w"
:
6
,
"x"
:
0
,
"y"
:
0
},
"hideTimeOverride"
:
true
,
"id"
:
2
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"topk(1, sum((node_time - node_boot_time) * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
}) by (node_name))"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
2
}
],
"thresholds"
:
""
,
"timeFrom"
:
"1m"
,
"timeShift"
:
null
,
"title"
:
"Uptime"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
0
,
"format"
:
"none"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"gridPos"
:
{
"h"
:
4
,
"w"
:
6
,
"x"
:
6
,
"y"
:
0
},
"id"
:
1
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"count(node_meta * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
})"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
20
}
],
"thresholds"
:
""
,
"title"
:
"Nodes"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"
],
"datasource"
:
null
,
"decimals"
:
0
,
"format"
:
"short"
,
"gauge"
:
{
"maxValue"
:
100
,
"minValue"
:
0
,
"show"
:
false
,
"thresholdLabels"
:
false
,
"thresholdMarkers"
:
true
},
"gridPos"
:
{
"h"
:
4
,
"w"
:
6
,
"x"
:
12
,
"y"
:
0
},
"hideTimeOverride"
:
true
,
"id"
:
4
,
"interval"
:
null
,
"links"
:
[],
"mappingType"
:
1
,
"mappingTypes"
:
[
{
"name"
:
"value to text"
,
"value"
:
1
},
{
"name"
:
"range to text"
,
"value"
:
2
}
],
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
"prefixFontSize"
:
"50%"
,
"rangeMaps"
:
[
{
"from"
:
"null"
,
"text"
:
"N/A"
,
"to"
:
"null"
}
],
"sparkline"
:
{
"fillColor"
:
"rgba(31, 118, 189, 0.18)"
,
"full"
:
false
,
"lineColor"
:
"rgb(31, 120, 193)"
,
"show"
:
false
},
"tableColumn"
:
""
,
"targets"
:
[
{
"expr"
:
"count(node_cpu{mode=
\"
idle
\"
} * on(instance) group_left(node_name) node_meta{node_id=~
\"
$node_id
\"
})"
,
"format"
:
"time_series"
,
"intervalFactor"
:
2
,
"legendFormat"
:
""
,
"refId"
:
"A"
,
"step"
:
2
}
],
"thresholds"
:
""
,
"timeFrom"
:
"1m"
,
"timeShift"
:
null
,
"title"
:
"CPUs"
,
"type"
:
"singlestat"
,
"valueFontSize"
:
"80%"
,
"valueMaps"
:
[
{
"op"
:
"="
,
"text"
:
"N/A"
,
"value"
:
"null"
}
],
"valueName"
:
"avg"
},
{
"cacheTimeout"
:
null
,
"colorBackground"
:
false
,
"colorValue"
:
false
,
"colors"
:
[
"rgba(245, 54, 54, 0.9)"
,
"rgba(237, 129, 40, 0.89)"
,
"rgba(50, 172, 45, 0.97)"