Compare commits

...

9 Commits

35 changed files with 41834 additions and 118 deletions

View File

@ -22,7 +22,7 @@ prometheus_repo_opcache: tchivert
prometheus_repo_phpfpm: Lusitaniae prometheus_repo_phpfpm: Lusitaniae
prometheus_repo_postgres: prometheus-community prometheus_repo_postgres: prometheus-community
prometheus_repo_redis: oliver006 prometheus_repo_redis: oliver006
prometheus_repo_varnish: jonnenauha prometheus_repo_varnish: tchivert
## server ## server
prometheus_nodes_ip: prometheus_nodes_ip:
@ -64,3 +64,16 @@ prometheus_postgres_exporter_port: 5432
prometheus_redis_exporter_addr: "redis://localhost:6379" prometheus_redis_exporter_addr: "redis://localhost:6379"
prometheus_redis_exporter_user: "" prometheus_redis_exporter_user: ""
prometheus_redis_exporter_password: "" prometheus_redis_exporter_password: ""
## grafana
grafana_auth_anonymous_enabled: false
grafana_auth_anonymous_org_role: Editor # Viewer
grafana_auth_anonymous_org_name: 'Main Org.'
grafana_auth_disable_login_form: false
grafana_editors_can_admin: false
grafana_users_viewers_can_edit: false
grafana_log_level: error
grafana_router_logging: false
grafana_disable_sanitize_html: true
grafana_traefik_entrypoint: 'websecure'

View File

@ -0,0 +1,834 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 7,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 0
},
"id": 8,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "avg(apache_uptime_seconds_total{instance=~\"$host\"})",
"format": "time_series",
"intervalFactor": 2,
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Uptime",
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"decimals": 0,
"fill": 7,
"fillGradient": 0,
"gridPos": {
"h": 3,
"w": 20,
"x": 4,
"y": 0
},
"hiddenSeries": false,
"id": 5,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 3,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Apache Down",
"color": "#BF1B00"
},
{
"alias": "Apache Down",
"transform": "negative-Y"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "count(apache_up{instance=~\"$host\"} == 1)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Apache Up",
"range": true,
"refId": "A",
"step": 240
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "scalar(count(apache_up{instance=~\"$host\"} == 0))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Apache Down",
"range": true,
"refId": "B",
"step": 240
}
],
"thresholds": [],
"timeRegions": [],
"title": "Apache Up / Down",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": "1",
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "deckbytes"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 3
},
"id": 3,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-90231pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "rate(apache_sent_kilobytes_total{instance=~\"$host\"}[$__rate_interval])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "{{instance}}",
"range": true,
"refId": "B",
"step": 240
}
],
"title": "Current total kbytes sent",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 3
},
"id": 1,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-98030pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "rate(apache_accesses_total{instance=~\"$host\"}[$__rate_interval])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Current total apache accesses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 13
},
"id": 2,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-90231pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(apache_scoreboard{instance=~\"$host\"}) by (state)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ state }}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Apache scoreboard statuses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 23
},
"id": 7,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-90231pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(apache_workers{instance=~\"$host\"}) by (state)\n",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{ state }}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Apache worker statuses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 23
},
"id": 4,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-90231pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "apache_cpuload{instance=~\"$host\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Load on {{instance}}",
"range": true,
"refId": "A",
"step": 240
}
],
"title": "Apache CPU load",
"type": "timeseries"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"apache"
],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": [
"emzprdfront01",
"emzprdfront02",
"emzprdfront03"
],
"value": [
"emzprdfront01",
"emzprdfront02",
"emzprdfront03"
]
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": {
"query": "label_values(apache_up, instance)",
"refId": "prometheus-host-Variable-Query"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-24h",
"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": "Apache",
"uid": "Cl51dzxnz",
"version": 15,
"weekStart": ""
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
apiVersion: 1
providers:
- name: 'Dashboards'
orgId: 1
folder: ''
folderUid: ''
type: file
disableDeletion: false
editable: true
updateIntervalSeconds: 10
options:
path: /etc/grafana/provisioning/dashboards

View File

@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: yPhvsDP7k
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true

1083
files/dashboards/docker.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,924 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "Prometheus dashboard for memcached servers",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 37,
"graphTooltip": 0,
"id": 10,
"links": [],
"liveNow": false,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 1,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum (memcached_commands_total{instance=~\"$host\", status=\"miss\"}) / sum (memcached_commands_total{instance=~\"$host\"}) ",
"hide": false,
"intervalFactor": 2,
"legendFormat": "hit ratio",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "% Hit ratio",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"logBase": 1,
"max": 1,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {
"172.17.0.1:9150": "#0A437C"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 8,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum (memcached_current_connections{instance=~\"$host\"}) by (instance)",
"intervalFactor": 2,
"legendFormat": "{{instance}}",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Connections",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {
"ratio": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 16,
"y": 0
},
"hiddenSeries": false,
"id": 3,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum (memcached_commands_total{instance=~\"$host\", command=\"set\"}) / sum (memcached_commands_total{instance=~\"$host\", command=\"get\"})",
"intervalFactor": 2,
"legendFormat": "ratio",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Get / Set ratio",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"logBase": 1,
"max": 1,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum (memcached_commands_total{instance=~\"$host\"}) by (command)",
"intervalFactor": 2,
"legendFormat": "{{command}}",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Commands",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {
"evicts": "#890F02",
"memcached_items_evicted_total{instance=\"172.17.0.1:9150\",job=\"prometheus\"}": "#890F02",
"reclaims": "#3F6833"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 8,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "reclaims",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(memcached_items_evicted_total{instance=~\"$host\"})",
"intervalFactor": 2,
"legendFormat": "evicts",
"range": true,
"refId": "A",
"step": 2,
"target": ""
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(memcached_items_reclaimed_total{instance=~\"$host\"})",
"intervalFactor": 2,
"legendFormat": "reclaims",
"range": true,
"refId": "B",
"step": 2
}
],
"thresholds": [],
"timeRegions": [],
"title": "evicts / reclaims",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 0,
"y": 14
},
"hiddenSeries": false,
"id": 6,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "{instance=\"172.17.0.1:9150\",job=\"prometheus\"}",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(irate(memcached_read_bytes_total{instance=~\"$host\"}[5m]))",
"intervalFactor": 2,
"legendFormat": "read from network",
"range": true,
"refId": "A",
"step": 2,
"target": ""
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "irate(memcached_written_bytes_total{instance=~\"$host\"}[10m])",
"intervalFactor": 5,
"legendFormat": "written to network",
"range": true,
"refId": "B",
"step": 5,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Read / written bytes",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"logBase": 1,
"show": true
},
{
"format": "bytes",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 8,
"y": 14
},
"hiddenSeries": false,
"id": 7,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(memcached_current_bytes{instance=~\"$host\"}) / sum(memcached_limit_bytes{instance=~\"$host\"})",
"intervalFactor": 2,
"legendFormat": "% used memory used",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Total memory usage",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"logBase": 1,
"max": 1,
"min": 0,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editable": true,
"error": false,
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 8,
"x": 16,
"y": 14
},
"hiddenSeries": false,
"id": 5,
"isNew": true,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.4.0-102000pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum (memcached_current_items{instance=~\"$host\"})",
"intervalFactor": 2,
"legendFormat": "items ",
"range": true,
"refId": "A",
"step": 2,
"target": ""
}
],
"thresholds": [],
"timeRegions": [],
"title": "Items in cache",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"memcached"
],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": [
"emzprdcache01",
"emzprdcache02"
],
"value": [
"emzprdcache01",
"emzprdcache02"
]
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": {
"query": "label_values(memcached_up, instance)",
"refId": "Prometheus-node-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-24h",
"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": "browser",
"title": "Memcached",
"uid": "ZbM_Lid4k",
"version": 5,
"weekStart": ""
}

5139
files/dashboards/mysqld.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,850 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 1000000
},
{
"color": "red",
"value": 80000000
}
]
},
"unit": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 0
},
"id": 5,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": false,
"expr": "max(rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[1m]))",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Last download rate",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 0
},
"id": 20,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": false,
"expr": "sum(increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[$__range]))",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Total data downloaded",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 1000000
},
{
"color": "red",
"value": 80000000
}
]
},
"unit": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 0
},
"id": 11,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": false,
"expr": "max(rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[1m]))",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Last upload rate",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "yellow",
"value": null
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 0
},
"id": 24,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": false,
"expr": "sum(increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[$__range]))",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Total data uploaded",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "transmit (-) / receive (+)",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-red",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in下载"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "green",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_out上传"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "yellow",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_in下载"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "purple",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "purple",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out上传"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "/.*_transmit$/"
},
"properties": [
{
"id": "custom.transform",
"value": "negative-Y"
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 4
},
"id": 16,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"sum"
],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])",
"interval": "60m",
"intervalFactor": 1,
"legendFormat": "{{device}}_receive",
"metric": "",
"refId": "A",
"step": 600,
"target": ""
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])",
"hide": false,
"interval": "60m",
"intervalFactor": 1,
"legendFormat": "{{device}}_transmit",
"refId": "B",
"step": 600
}
],
"title": "Internet traffic per hour",
"type": "timeseries"
},
{
"collapsed": false,
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 11
},
"id": 7,
"panels": [],
"repeat": "device",
"title": "Network traffic on $device",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds",
"seriesBy": "max"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 1000000
},
{
"color": "red",
"value": 80000000
}
]
},
"unit": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 12
},
"id": 2,
"options": {
"legend": {
"calcs": [
"mean"
],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": true,
"expr": "rate(node_network_receive_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[$__rate_interval])",
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{device}}",
"refId": "A"
}
],
"title": "Download $device",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds",
"seriesBy": "max"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 1000010
},
{
"color": "red",
"value": 80000000
}
]
},
"unit": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 12
},
"id": 3,
"options": {
"legend": {
"calcs": [
"mean"
],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"exemplar": true,
"expr": "rate(node_network_transmit_bytes_total{instance=\"$node\",job=\"$job\",device=~\"$device\"}[$__rate_interval])",
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{device}}",
"refId": "A"
}
],
"title": "Upload $device",
"type": "timeseries"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"system"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "emzhc01",
"value": "emzhc01"
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(node_uname_info{job=\"$job\"}, instance)",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": false,
"name": "node",
"options": [],
"query": {
"query": "label_values(node_uname_info{job=\"$job\"}, instance)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"current": {
"selected": false,
"text": "node",
"value": "node"
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(node_uname_info, job)",
"hide": 2,
"includeAll": false,
"label": "Job",
"multi": false,
"name": "job",
"options": [],
"query": {
"query": "label_values(node_uname_info, job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(node_network_up{instance=\"$node\",job=\"$job\"}, device)",
"hide": 0,
"includeAll": true,
"label": "Device",
"multi": true,
"name": "device",
"options": [],
"query": {
"query": "label_values(node_network_up{instance=\"$node\",job=\"$job\"}, device)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/^(?!br|veth|lo|docker|fw|tap).*/",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Network",
"uid": "BoCr1WQnz",
"version": 5,
"weekStart": ""
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,785 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 14,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"color": "red",
"index": 0,
"text": "KO"
},
"1": {
"color": "green",
"index": 1,
"text": "OK"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 0
},
"id": 10,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "min(opcache_enabled{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Opcache enabled",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 10,
"x": 4,
"y": 0
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(opcache_memory_usage_used_memory{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "used memory",
"range": true,
"refId": "A"
}
],
"title": "Cache Size",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 10,
"x": 14,
"y": 0
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(opcache_statistics_hits{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "hits",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(opcache_statistics_misses{job=\"opcache\", instance=~\"$host\"})",
"hide": false,
"interval": "",
"legendFormat": "misses",
"range": true,
"refId": "B"
}
],
"title": "Hits/Misses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"color": "green",
"index": 1,
"text": "OK"
},
"1": {
"color": "red",
"index": 0,
"text": "KO"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 3
},
"id": 13,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "min(opcache_cache_full{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Cache full",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 10
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 6
},
"id": 14,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "avg(opcache_memory_usage_wasted_memory{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Memory wasted",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 40
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 0,
"y": 9
},
"id": 6,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "avg(opcache_statistics_hit_rate{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Hit rate",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 10,
"x": 4,
"y": 9
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(opcache_statistics_num_cached_scripts{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "cached scripts",
"range": true,
"refId": "A"
}
],
"title": "Cached scripts",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 10,
"x": 14,
"y": 9
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(opcache_statistics_num_cached_keys{job=\"opcache\", instance=~\"$host\"})",
"interval": "",
"legendFormat": "cached keys",
"range": true,
"refId": "A"
}
],
"title": "Cached keys",
"type": "timeseries"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"php-fpm",
"opcache"
],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": [
"emzprdback01",
"emzprdback02",
"emzprdfront01",
"emzprdfront02",
"emzprdfront03"
],
"value": [
"emzprdback01",
"emzprdback02",
"emzprdfront01",
"emzprdfront02",
"emzprdfront03"
]
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(opcache_exporter_build_info{job=\"opcache\"}, instance)",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": {
"query": "label_values(opcache_exporter_build_info{job=\"opcache\"}, instance)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Opcache",
"uid": "suDqlaAnk",
"version": 8,
"weekStart": ""
}

View File

@ -0,0 +1,721 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 25,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 30,
"gradientMode": "hue",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 0
},
"id": 28,
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.4.0-90864pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(rate(cloudflare_zone_requests_total{}[$__interval]))",
"interval": "",
"intervalFactor": 10,
"legendFormat": "total",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(rate(cloudflare_zone_requests_cached{}[$__interval]))",
"interval": "",
"intervalFactor": 10,
"legendFormat": "cached",
"range": true,
"refId": "B"
}
],
"title": "Cloudflare Requests / second",
"type": "timeseries"
},
{
"columns": [],
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"description": "\n\nCurrEstab: The number of TCP connections whose current status is ESTABLISHED or CLOSE-WAIT.",
"fontSize": "80%",
"gridPos": {
"h": 24,
"w": 24,
"x": 0,
"y": 8
},
"id": 24,
"showHeader": true,
"sort": {
"col": 31,
"desc": false
},
"styles": [
{
"$$hashKey": "object:1600",
"alias": "Hostname",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 1,
"link": false,
"linkTooltip": "",
"linkUrl": "",
"mappingType": 1,
"pattern": "nodename",
"thresholds": [],
"type": "string",
"unit": "bytes"
},
{
"$$hashKey": "object:1602",
"alias": "Memory",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"link": false,
"mappingType": 1,
"pattern": "Value #B",
"thresholds": [],
"type": "number",
"unit": "bytes"
},
{
"$$hashKey": "object:1603",
"alias": "CPU Cores",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"mappingType": 1,
"pattern": "Value #C",
"thresholds": [],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:1604",
"alias": " Uptime",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #D",
"thresholds": [],
"type": "number",
"unit": "s"
},
{
"$$hashKey": "object:1605",
"alias": "Partition used%*",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #E",
"thresholds": [
"70",
"85"
],
"type": "number",
"unit": "percent"
},
{
"$$hashKey": "object:1606",
"alias": "CPU used%",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #F",
"thresholds": [
"70",
"85"
],
"type": "number",
"unit": "percent"
},
{
"$$hashKey": "object:1607",
"alias": "Memory used%",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #G",
"thresholds": [
"70",
"85"
],
"type": "number",
"unit": "percent"
},
{
"$$hashKey": "object:1608",
"alias": "Disk read*",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #H",
"thresholds": [
"10485760",
"20485760"
],
"type": "number",
"unit": "Bps"
},
{
"$$hashKey": "object:1609",
"alias": "Disk write*",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #I",
"thresholds": [
"10485760",
"20485760"
],
"type": "number",
"unit": "Bps"
},
{
"$$hashKey": "object:1610",
"alias": "Download*",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #J",
"thresholds": [
"30485760",
"104857600"
],
"type": "number",
"unit": "bps"
},
{
"$$hashKey": "object:1611",
"alias": "Upload*",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #K",
"thresholds": [
"30485760",
"104857600"
],
"type": "number",
"unit": "bps"
},
{
"$$hashKey": "object:1612",
"alias": "5m load",
"align": "auto",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #L",
"thresholds": [],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:1613",
"alias": "CurrEstab",
"align": "auto",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value #M",
"thresholds": [
"1000",
"1500"
],
"type": "string",
"unit": "short"
},
{
"$$hashKey": "object:1614",
"alias": "TCP_tw",
"align": "center",
"colorMode": "cell",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"mappingType": 1,
"pattern": "Value #N",
"thresholds": [
"5000",
"20000"
],
"type": "number",
"unit": "short"
},
{
"$$hashKey": "object:1615",
"alias": "",
"align": "right",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "hidden",
"unit": "short"
}
],
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "node_uname_info{job=~\"$job\"} - 0",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "主机名",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "sum(time() - node_boot_time_seconds{job=~\"$job\"})by(instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "运行时间",
"refId": "D"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "node_memory_MemTotal_bytes{job=~\"$job\"} - 0",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "总内存",
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "count(node_cpu_seconds_total{job=~\"$job\",mode='system'}) by (instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "总核数",
"refId": "C"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "node_load5{job=~\"$job\"}",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "5分钟负载",
"refId": "L"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "(1 - avg(rate(node_cpu_seconds_total{job=~\"$job\",mode=\"idle\"}[$__rate_interval])) by (instance)) * 100",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "CPU使用率",
"refId": "F"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "(1 - (node_memory_MemAvailable_bytes{job=~\"$job\"} / (node_memory_MemTotal_bytes{job=~\"$job\"})))* 100",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "内存使用率",
"refId": "G"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "max((node_filesystem_size_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}) *100/(node_filesystem_avail_bytes {job=~\"$job\",fstype=~\"ext.?|xfs\"}+(node_filesystem_size_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",fstype=~\"ext.?|xfs\"})))by(instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "分区使用率",
"refId": "E"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "max(rate(node_disk_read_bytes_total{job=~\"$job\"}[$__rate_interval])) by (instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "最大读取",
"refId": "H"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "max(rate(node_disk_written_bytes_total{job=~\"$job\"}[$__rate_interval])) by (instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "最大写入",
"refId": "I"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "node_netstat_Tcp_CurrEstab{job=~\"$job\"} - 0",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "连接数",
"refId": "M"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "node_sockstat_TCP_tw{job=~\"$job\"} - 0",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "TIME_WAIT",
"refId": "N"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "max(rate(node_network_receive_bytes_total{job=~\"$job\"}[$__rate_interval])*8) by (instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "下载带宽",
"refId": "J"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"editorMode": "code",
"expr": "max(rate(node_network_transmit_bytes_total{job=~\"$job\"}[$__rate_interval])*8) by (instance)",
"format": "table",
"hide": false,
"instant": true,
"interval": "",
"legendFormat": "上传带宽",
"refId": "K"
}
],
"title": "Resource Overview",
"transform": "table",
"type": "table-old"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"system"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "node",
"value": "node"
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(node_uname_info, job)",
"hide": 2,
"includeAll": false,
"label": "Job",
"multi": false,
"name": "job",
"options": [],
"query": {
"query": "label_values(node_uname_info, job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Overview",
"uid": "HHYqp7T4z",
"version": 6,
"weekStart": ""
}

View File

@ -0,0 +1,958 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "PHP-FPM aggregated data for multiple pools.",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 5714,
"graphTooltip": 1,
"id": 6,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"color": "red",
"index": 0,
"text": "KO"
},
"1": {
"color": "green",
"index": 1,
"text": "OK"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 0,
"y": 0
},
"id": 23,
"links": [],
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.4.0-102000pre",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "min(php_fpm_up{instance=~\"^$host\", socket_path=~\"$pool\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{socket_path}}",
"metric": "php_fpm_start_time_seconds",
"refId": "A",
"step": 1
}
],
"title": "Status",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 21,
"x": 3,
"y": 0
},
"id": 22,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (php_fpm_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"}) / sum by (socket_path) ( php_fpm_max_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ socket_path }}",
"refId": "A"
}
],
"title": "Pool Usage",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"description": "Total number of accepted connections",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 5
},
"id": 1,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (rate(php_fpm_accepted_connections_total{instance=~\"^$host\", socket_path=~\"$pool\"} [$__rate_interval]))",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{socket_path}}",
"refId": "A",
"step": 2
}
],
"title": "Accepted Connections Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"description": "Number of requests that exceed request_slowlog_timeout",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 12
},
"id": 8,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (rate(php_fpm_slow_requests{instance=~\"^$host\", socket_path=~\"$pool\"} [$__rate_interval]))",
"format": "time_series",
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{ socket_path }} ",
"refId": "A",
"step": 2
}
],
"title": "Slow Requests Rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 19
},
"id": 18,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum(php_fpm_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"}) by (socket_path )",
"format": "time_series",
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{ socket_path }} ",
"metric": "php_fpm_active_processes",
"refId": "B",
"step": 2
}
],
"title": "Active processes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 27
},
"id": 2,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (php_fpm_max_active_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{ socket_path }} ",
"refId": "A",
"step": 2
}
],
"title": "Max active processes",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 35
},
"id": 20,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (php_fpm_max_children_reached{instance=~\"^$host\", socket_path=~\"$pool\"})",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "{{ socket_path }} ",
"metric": "php_fpm_max_children_reached",
"refId": "D",
"step": 2
}
],
"title": "Max children reached",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 43
},
"id": 19,
"links": [],
"options": {
"legend": {
"calcs": [
"last",
"mean"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Mean",
"sortDesc": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-beta2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"expr": "sum by (socket_path) (php_fpm_idle_processes{instance=~\"^$host\", socket_path=~\"$pool\"})",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{ socket_path }} ",
"metric": "php_fpm_idle_processes",
"refId": "C",
"step": 2
}
],
"title": "Idle processes",
"type": "timeseries"
}
],
"refresh": "1m",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [
"php-fpm"
],
"templating": {
"list": [
{
"allFormat": "glob",
"current": {
"selected": true,
"text": [
"emzprdback01",
"emzprdback02",
"emzprdfront02",
"emzprdfront03"
],
"value": [
"emzprdback01",
"emzprdback02",
"emzprdfront02",
"emzprdfront03"
]
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": {
"query": "label_values(php_fpm_accepted_connections_total, instance)",
"refId": "prometheus-Host-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "yPhvsDP7k"
},
"definition": "label_values(php_fpm_accepted_connections_total{instance=~\"$host\"}, socket_path)",
"hide": 0,
"includeAll": true,
"label": "Pool",
"multi": true,
"name": "pool",
"options": [],
"query": {
"query": "label_values(php_fpm_accepted_connections_total{instance=~\"$host\"}, socket_path)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-24h",
"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": "browser",
"title": "PHP-FPM",
"uid": "D6TvmAZik",
"version": 7,
"weekStart": ""
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1429
files/dashboards/redis.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,95 +1,96 @@
--- ---
- name: 'prometheus | server | restart container' - name: 'grafana-prometheus-restart'
docker_container: systemd:
name: prometheus name: docker-compose@grafana-prometheus.service
restart: yes state: restarted
tags: ['prometheus'] enabled: yes
tags: ['grafana-prometheus']
- name: 'prometheus | node exporter | restart service' - name: 'node-exporter-restart'
systemd: systemd:
name: prometheus-node-exporter.service name: prometheus-node-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | mysqld exporter | restart service' - name: 'mysqld-exporter-restart'
systemd: systemd:
name: prometheus-mysqld-exporter.service name: prometheus-mysqld-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | mongodb exporter | restart service' - name: 'mongodb-exporter-restart'
systemd: systemd:
name: prometheus-mongodb-exporter.service name: prometheus-mongodb-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | postgres exporter restart service' - name: 'postgres-exporter-restart'
systemd: systemd:
name: prometheus-postgres-exporter.service name: prometheus-postgres-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | phpfpm exporter | restart service' - name: 'phpfpm-exporter-restart'
systemd: systemd:
name: prometheus-phpfpm-exporter.service name: prometheus-phpfpm-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | opcache exporter | restart service' - name: 'opcache-exporter-restart'
systemd: systemd:
name: prometheus-opcache-exporter.service name: prometheus-opcache-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | apache exporter | restart service' - name: 'apache-exporter-restart'
systemd: systemd:
name: prometheus-apache-exporter.service name: prometheus-apache-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | varnish exporter | restart service' - name: 'varnish-exporter-restart'
systemd: systemd:
name: prometheus-varnish-exporter.service name: prometheus-varnish-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | blackbox exporter | restart service' - name: 'blackbox-exporter-restart'
systemd: systemd:
name: prometheus-blackbox-exporter.service name: prometheus-blackbox-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | redis exporter | restart service' - name: 'redis-exporter-restart'
systemd: systemd:
name: prometheus-redis-exporter.service name: prometheus-redis-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | memcached exporter | restart service' - name: 'memcached-exporter-restart'
systemd: systemd:
name: prometheus-memcached-exporter.service name: prometheus-memcached-exporter.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | cloudflare exporter | restart service' - name: 'cloudflare-exporter-restart'
systemd: systemd:
name: docker-compose@cloudflare.service name: docker-compose@cloudflare.service
state: restarted state: restarted
enabled: yes enabled: yes
tags: ['prometheus'] tags: ['prometheus']
- name: 'prometheus | proxmox exporter | restart service' - name: 'proxmox-exporter-restart'
systemd: systemd:
name: prometheus-proxmox-exporter.service name: prometheus-proxmox-exporter.service
state: restarted state: restarted

View File

@ -37,8 +37,6 @@
- name: '{{ exporter }} exporter | get latest release from GitHub' - name: '{{ exporter }} exporter | get latest release from GitHub'
shell: curl --silent "https://api.github.com/repos/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/latest" | jq -r .tag_name | sed "s/v//" shell: curl --silent "https://api.github.com/repos/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/latest" | jq -r .tag_name | sed "s/v//"
args:
warn: false
register: prometheus_exporter_latest_version register: prometheus_exporter_latest_version
run_once: true run_once: true
when: not stat_result.stat.exists or exporter_upgrade == "yes" when: not stat_result.stat.exists or exporter_upgrade == "yes"
@ -48,6 +46,7 @@
get_url: get_url:
url: "https://github.com/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/download/v{{ prometheus_exporter_latest_version.stdout }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz" url: "https://github.com/{{ prometheus_repo }}/{{ exporter }}_exporter/releases/download/v{{ prometheus_exporter_latest_version.stdout }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz"
dest: /tmp/prometheus_exporter/{{ exporter }}/ dest: /tmp/prometheus_exporter/{{ exporter }}/
ignore_errors: '{{ ansible_check_mode }}'
when: not stat_result.stat.exists or exporter_upgrade == "yes" when: not stat_result.stat.exists or exporter_upgrade == "yes"
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
@ -57,6 +56,7 @@
src: /tmp/prometheus_exporter/{{ exporter }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz src: /tmp/prometheus_exporter/{{ exporter }}/{{ exporter }}_exporter-{{ prometheus_exporter_latest_version.stdout }}.{{ prometheus_os }}-{{ prometheus_arch }}.tar.gz
dest: /tmp/prometheus_exporter/{{ exporter }}/ dest: /tmp/prometheus_exporter/{{ exporter }}/
when: not stat_result.stat.exists or exporter_upgrade == "yes" when: not stat_result.stat.exists or exporter_upgrade == "yes"
ignore_errors: '{{ ansible_check_mode }}'
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
- name: '{{ exporter }} exporter | move to /usr/local/bin' - name: '{{ exporter }} exporter | move to /usr/local/bin'
@ -68,9 +68,10 @@
group: root group: root
mode: 0755 mode: 0755
notify: notify:
- 'prometheus | {{ exporter }} exporter | restart service' - '{{ exporter }}-exporter-restart'
when: not stat_result.stat.exists or exporter_upgrade == "yes" when: not stat_result.stat.exists or exporter_upgrade == "yes"
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
ignore_errors: '{{ ansible_check_mode }}'
- name: '{{ exporter }} exporter | cleanup temp path' - name: '{{ exporter }} exporter | cleanup temp path'
file: file:
@ -85,8 +86,9 @@
group: root group: root
mode: 0600 mode: 0600
notify: notify:
- 'prometheus | {{ exporter }} exporter | restart service' - '{{ exporter }}-exporter-restart'
when: not stat_result.stat.exists or exporter_upgrade == "yes" when: not stat_result.stat.exists or exporter_upgrade == "yes"
ignore_errors: '{{ ansible_check_mode }}'
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
- name: '{{ exporter }} exporter | systemd | enable service' - name: '{{ exporter }} exporter | systemd | enable service'

View File

@ -26,7 +26,7 @@
group: root group: root
mode: 0644 mode: 0644
notify: notify:
- 'prometheus | {{ exporter }} exporter | restart service' - '{{ exporter }}-exporter-restart'
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
- name: '{{ exporter }} exporter | systemd | install unit file' - name: '{{ exporter }} exporter | systemd | install unit file'
@ -37,7 +37,7 @@
group: root group: root
mode: 0600 mode: 0600
notify: notify:
- 'prometheus | {{ exporter }} exporter | restart service' - '{{ exporter }}-exporter-restart'
tags: [ 'prometheus_{{ exporter }}' ] tags: [ 'prometheus_{{ exporter }}' ]
- name: '{{ exporter }} exporter | systemd | enable service' - name: '{{ exporter }} exporter | systemd | enable service'

View File

@ -11,5 +11,5 @@
mode: 0600 mode: 0600
register: prometheus_blackbox_exporter_configuration register: prometheus_blackbox_exporter_configuration
notify: notify:
- 'prometheus | blackbox exporter | restart service' - 'blackbox-exporter-restart'
tags: ['prometheus_blackbox_exporter'] tags: ['prometheus_blackbox_exporter']

View File

@ -11,7 +11,7 @@
group: root group: root
mode: 0755 mode: 0755
notify: notify:
- 'prometheus | mongodb exporter | restart service' - 'mongodb-exporter-restart'
when: when:
- prometheus_mongodb_exporter_latest_version.stdout < '0.2' - prometheus_mongodb_exporter_latest_version.stdout < '0.2'
tags: ['prometheus_mongodb_exporter'] tags: ['prometheus_mongodb_exporter']
@ -24,5 +24,5 @@
group: root group: root
mode: 0600 mode: 0600
notify: notify:
- 'prometheus | mongodb exporter | restart service' - 'mongodb-exporter-restart'
tags: ['prometheus_mongodb_exporter'] tags: ['prometheus_mongodb_exporter']

View File

@ -13,5 +13,5 @@
- prometheus_mysqld_exporter_user is defined - prometheus_mysqld_exporter_user is defined
register: prometheus_mysqld_exporter_configuration register: prometheus_mysqld_exporter_configuration
notify: notify:
- 'prometheus | mysqld exporter | restart service' - 'mysqld-exporter-restart'
tags: ['prometheus_mysqld_exporter'] tags: ['prometheus_mysqld_exporter']

View File

@ -11,5 +11,5 @@
mode: 0600 mode: 0600
register: prometheus_opcache_exporter_configuration register: prometheus_opcache_exporter_configuration
notify: notify:
- 'prometheus | opcache exporter | restart service' - 'opcache-exporter-restart'
tags: ['prometheus_opcache_exporter'] tags: ['prometheus_opcache_exporter']

View File

@ -10,5 +10,5 @@
group: root group: root
mode: 0600 mode: 0600
notify: notify:
- 'prometheus | phpfpm exporter | restart service' - 'phpfpm-exporter-restart'
tags: ['prometheus_phpfpm_exporter'] tags: ['prometheus_phpfpm_exporter']

View File

@ -11,5 +11,5 @@
mode: 0600 mode: 0600
register: prometheus_postgres_exporter_configuration register: prometheus_postgres_exporter_configuration
notify: notify:
- 'prometheus | postgres exporter | restart service' - 'postgres-exporter-restart'
tags: ['prometheus_postgres_exporter'] tags: ['prometheus_postgres_exporter']

View File

@ -23,7 +23,7 @@
mode: 0600 mode: 0600
register: prometheus_proxmox_exporter_configuration register: prometheus_proxmox_exporter_configuration
notify: notify:
- 'prometheus | proxmox exporter | restart service' - 'proxmox-exporter-restart'
tags: ['prometheus_proxmox'] tags: ['prometheus_proxmox']
- name: 'proxmox exporter | systemd | copy unit file' - name: 'proxmox exporter | systemd | copy unit file'
@ -34,7 +34,7 @@
group: root group: root
mode: 0600 mode: 0600
notify: notify:
- 'prometheus | proxmox exporter | restart service' - 'proxmox-exporter-restart'
#when: not stat_result.stat.exists or exporter_upgrade == "yes" #when: not stat_result.stat.exists or exporter_upgrade == "yes"
tags: ['prometheus_proxmox'] tags: ['prometheus_proxmox']

View File

@ -11,5 +11,5 @@
mode: 0600 mode: 0600
register: prometheus_redis_exporter_configuration register: prometheus_redis_exporter_configuration
notify: notify:
- 'prometheus | redis exporter | restart service' - 'redis-exporter-restart'
tags: ['prometheus_redis_exporter'] tags: ['prometheus_redis_exporter']

View File

@ -7,9 +7,18 @@
## prometheus server install ## prometheus server install
- name: 'server install' - name: 'server install'
include_tasks: 'server/prometheus.yml' include_tasks: "server/{{ item }}"
loop:
- grafana-prometheus.yml
- grafana-provisioning.yml
when: when:
- prometheus_server_enable == "true" - prometheus_server_enable == "true"
tags:
- prometheus
- prometheus_server
- grafana
- grafana_server
- grafana_prometheus
## include exporter install ## include exporter install
- name: 'exporters install' - name: 'exporters install'

View File

@ -0,0 +1,63 @@
---
- name: 'prometheus | server | assert | check mandatory vars are defined'
assert:
that:
- "prometheus_server_monitor is defined"
- name: 'prometheus | server | create prometheus directory to /etc'
file:
path: /etc/prometheus
state: directory
mode: '0755'
- name: 'prometheus | server | copy config prometheus yml'
template:
src: conf/prometheus.yml.j2
dest: /etc/prometheus/prometheus.yml
owner: root
group: root
mode: 0644
notify:
- 'grafana-prometheus-restart'
- name: "grafana-prometheus | create docker-compose directory"
file:
path: /opt/docker-compose/grafana-prometheus
state: directory
mode: '0755'
- name: "grafana-prometheus | copy docker-compose file"
template:
src: compose/grafana-prometheus.yml.j2
dest: /opt/docker-compose/grafana-prometheus/docker-compose.yml
owner: root
group: root
mode: 0644
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | create grafana.ini file"
file:
path: /opt/docker-compose/grafana-prometheus/grafana.ini
owner: '1000'
group: '1000'
mode: '0750'
state: touch
notify: "grafana-prometheus-restart"
ignore_errors: '{{ ansible_check_mode }}'
- name: "grafana-prometheus | install unit file to systemd"
vars:
exporter: "grafana-prometheus"
template:
src: systemd/docker-compose.service.j2
dest: /etc/systemd/system/docker-compose@grafana-prometheus.service
owner: root
group: root
mode: 0600
- name: "grafana-prometheus | enable service"
systemd:
daemon_reload: yes
name: docker-compose@grafana-prometheus
enabled: true
ignore_errors: '{{ ansible_check_mode }}'

View File

@ -0,0 +1,196 @@
- name: "grafana-prometheus | import grafana provisioned datasources"
synchronize:
src: "{{ grafana_provisioned_datasources_path }}"
dest: /opt/docker-compose/grafana-prometheus/
when: grafana_provisioned_datasources_path is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana provisioned dashboards"
synchronize:
src: "{{ grafana_provisioned_dashboards_path }}"
dest: /opt/docker-compose/grafana-prometheus/
when: grafana_provisioned_datasources_path is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | create grafana provisioning directories"
file:
path: "/opt/docker-compose/grafana-prometheus/{{ item }}"
state: directory
owner: '1000'
group: '1000'
mode: '0755'
loop:
- datasources
- dashboards
when: grafana_provisioned_datasources_path is not defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana provisioned datasources conf"
copy:
src: dashboards/datasources.yaml
dest: /opt/docker-compose/grafana-prometheus/datasources/datasources.yaml
owner: '1000'
group: '1000'
mode: '0750'
when: grafana_provisioned_datasources_path is not defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana provisioned dashboards conf"
copy:
src: dashboards/dashboard.yaml
dest: /opt/docker-compose/grafana-prometheus/dashboards/dashboard.yaml
owner: '1000'
group: '1000'
mode: '0750'
when: grafana_provisioned_dashboards_path is not defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana apache dashboard"
copy:
src: dashboards/apache.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/apache.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_apache_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana cloudflare dashboard"
copy:
src: dashboards/cloudflare.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/cloudflare.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_cloudflare_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana docker dashboard"
copy:
src: dashboards/docker.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/docker.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_docker_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana haproxy dashboard"
copy:
src: dashboards/haproxy.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/haproxy.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_haproxy_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana memcached dashboard"
copy:
src: dashboards/memcached.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/memcached.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_memcached_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana mysqld dashboard"
copy:
src: dashboards/mysqld.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/mysqld.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_mysqld_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana network dashboard"
copy:
src: dashboards/network.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/network.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_node_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana node-exporter dashboard"
copy:
src: dashboards/node-exporter.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/node-exporter.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_node_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana opcache dashboard"
copy:
src: dashboards/opcache.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/opcache.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_opcache_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana overview dashboard"
copy:
src: dashboards/overview.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/overview.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_node_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana plateform-overview dashboard"
copy:
src: dashboards/plateform-overview.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/plateform-overview.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_node_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana phpfpm dashboard"
copy:
src: dashboards/phpfpm.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/phpfpm.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_phpfpm_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana proxmox dashboard"
copy:
src: dashboards/proxmox.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/proxmox.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_proxmox_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana redis dashboard"
copy:
src: dashboards/redis.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/redis.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_redis_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana varnish dashboard"
copy:
src: dashboards/varnish.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/varnish.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_varnish_exporter_targets is defined
notify: "grafana-prometheus-restart"

View File

@ -1,64 +0,0 @@
---
- name: 'prometheus | server | assert | check mandatory vars are defined'
assert:
that:
- "prometheus_server_monitor is defined"
tags: ['prometheus_server']
- name: 'prometheus | server | create docker network'
docker_network:
name: '{{ prometheus_docker_network }}'
tags: ['prometheus_server']
- name: 'prometheus | server | create docker volume data'
docker_volume:
name: prometheus_data
register: register_docker_volume_prometheus__prometheus_data
tags: ['prometheus_server']
- name: 'prometheus | server | create prometheus directory to /etc'
file:
path: /etc/prometheus
state: directory
mode: '0755'
tags: ['prometheus_server']
- name: 'prometheus | server | copy config prometheus yml'
template:
src: conf/prometheus.yml.j2
dest: /etc/prometheus/prometheus.yml
owner: root
group: root
mode: 0644
tags: ['prometheus_server']
notify:
- 'prometheus | server | restart container'
- name: 'prometheus | server | deploy container'
docker_container:
name: prometheus
hostname: '{{ inventory_hostname }}'
image: prom/prometheus:{{ prometheus_server_version }}
volumes:
- /etc/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time={{ prometheus_retention_time }}'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-admin-api'
networks:
- name: '{{ prometheus_docker_network }}'
ports:
- "9090:9090"
log_driver: syslog
log_options:
tag: docker_prometheus
restart_policy: 'unless-stopped'
pull: '{{ prometheus_docker_pull }}'
etc_hosts: '{{ prometheus_nodes_ip }}'
tags: ['prometheus_server']
notify:
- 'prometheus | server | restart container'

View File

@ -0,0 +1,104 @@
version: "3"
networks:
grafana:
name: grafana
{% if grafana_traefik_enable is defined %}
traefik:
external: true
{% endif %}
volumes:
prometheus-data:
grafana-data:
services:
grafana:
image: grafana/grafana:{{ grafana_version | default('latest') }}
container_name: grafana
user: "1000:1000"
restart: unless-stopped
volumes:
- grafana-data:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini
- ./dashboards:/etc/grafana/provisioning/dashboards/
- ./datasources:/etc/grafana/provisioning/datasources/
environment:
GF_AUTH_ANONYMOUS_ENABLED: "{{ grafana_auth_anonymous_enabled|string|lower }}"
GF_AUTH_ANONYMOUS_ORG_ROLE: "{{ grafana_auth_anonymous_org_role }}"
GF_AUTH_ANONYMOUS_ORG_NAME: "{{ grafana_auth_anonymous_org_name }}"
GF_AUTH_DISABLE_LOGIN_FORM: "{{ grafana_auth_disable_login_form|string|lower }}"
GF_AUTH_EDITORS_CAN_ADMIN: "{{ grafana_editors_can_admin|string|lower }}"
{% if grafana_admin_password is defined %}
GF_SECURITY_ADMIN_PASSWORD: "{{ grafana_admin_password }}"
{% endif %}
GF_USERS_VIEWERS_CAN_EDIT: "{{ grafana_users_viewers_can_edit|string|lower }}"
{% if grafana_admin_password is defined %}
GF_ROOT_URL: "{{ grafana_domain }}"
{% endif %}
GF_LOG_LEVEL: "{{ grafana_log_level|string }}"
GF_ROUTER_LOGGING: "{{ grafana_router_logging|string|lower }}"
GF_PANELS_DISABLE_SANITIZE_HTML: "{{ grafana_disable_sanitize_html|string|lower }}"
{% if grafana_install_plugins is defined %}
GF_INSTALL_PLUGINS: "{{ grafana_install_plugins|string|lower }}"
{% endif %}
{% if grafana_smtp_enabled is defined %}
GF_SMTP_ENABLED: "{{ grafana_smtp_enabled|string|lower }}"
GF_SMTP_HOST: "{{ grafana_smtp_host|string }}"
GF_SMTP_FROM_ADDRESS: "{{ grafana_smtp_from_address|string }}"
GF_SMTP_FROM_NAME: "{{ grafana_smtp_from_name|string }}"
GF_SMTP_SKIP_VERIFY: "{{ grafana_smtp_skip_verify|string|lower }}"
{% else %}
GF_SMTP_ENABLED: "false"
{% endif %}
networks:
- grafana
{% if grafana_traefik_enable is defined %}
- traefik
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.grafana.rule: Host(`{{ grafana_domain|default(omit) }}`)
traefik.http.routers.grafana.tls: true
traefik.http.routers.grafana.tls.certresolver: letsencrypt
traefik.http.routers.grafana.entrypoints: "{{ grafana_traefik_entrypoint }}"
traefik.http.services.grafana.loadbalancer.server.port: 3000
{% else %}
ports:
- "{{ grafana_port | default(3000) }}:3000"
{% endif %}
prometheus:
container_name: prometheus
image: prom/prometheus:{{ grafana_prometheus_version | default('latest') }}
volumes:
- /etc/prometheus/:/etc/prometheus/
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time={{ prometheus_retention_time }}'
- '--web.enable-lifecycle'
networks:
- grafana
{% if prometheus_traefik_enable is defined %}
- traefik
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.prometheus.rule: Host(`{{ prometheus_domain|default(omit) }}`)
traefik.http.routers.prometheus.tls: true
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
traefik.http.routers.prometheus.entrypoints: websecure
traefik.http.services.prometheus.loadbalancer.server.port: 9090
{% else %}
ports:
- "{{ prometheus_port | default(9090) }}:9090"
{% endif %}
{% if prometheus_nodes_ip is defined %}
extra_hosts:
{% for key, value in prometheus_nodes_ip.items() %}
- "{{ key }}:{{ value }}"
{% endfor %}
{% endif %}
restart: unless-stopped

View File

@ -46,8 +46,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9100' regex: '(.*):9100'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_mysqld_exporter_targets is defined %} {% if prometheus_mysqld_exporter_targets is defined %}
# mysql exporter # # mysql exporter #
- job_name: mysql - job_name: mysql
@ -74,8 +74,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9104' regex: '(.*):9104'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_mongodb_exporter_targets is defined %} {% if prometheus_mongodb_exporter_targets is defined %}
# mongoDB exporter # # mongoDB exporter #
- job_name: mongodb - job_name: mongodb
@ -97,8 +97,8 @@ scrape_configs:
- {{ target }}:9216 - {{ target }}:9216
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %}
{% endif %}
{% if prometheus_postgres_exporter_targets is defined %} {% if prometheus_postgres_exporter_targets is defined %}
# postgresql exporter # # postgresql exporter #
- job_name: postgresql - job_name: postgresql
@ -120,8 +120,8 @@ scrape_configs:
- {{ target }}:9187 - {{ target }}:9187
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %}
{% endif %}
{% if prometheus_phpfpm_exporter_targets is defined %} {% if prometheus_phpfpm_exporter_targets is defined %}
# PHP-FPM exporter # # PHP-FPM exporter #
- job_name: phpfpm - job_name: phpfpm
@ -137,8 +137,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9253' regex: '(.*):9253'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_opcache_exporter_targets is defined %} {% if prometheus_opcache_exporter_targets is defined %}
# opcache exporter # # opcache exporter #
- job_name: opcache - job_name: opcache
@ -154,8 +154,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9101' regex: '(.*):9101'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_apache_exporter_targets is defined %} {% if prometheus_apache_exporter_targets is defined %}
# apache exporter # # apache exporter #
- job_name: apache - job_name: apache
@ -171,8 +171,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9117' regex: '(.*):9117'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_haproxy_exporter_targets is defined %} {% if prometheus_haproxy_exporter_targets is defined %}
# haproxy exporter # # haproxy exporter #
- job_name: haproxy - job_name: haproxy
@ -188,8 +188,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):8404' regex: '(.*):8404'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_varnish_exporter_targets is defined %} {% if prometheus_varnish_exporter_targets is defined %}
# Varnish exporter # # Varnish exporter #
- job_name: varnish - job_name: varnish
@ -205,8 +205,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9131' regex: '(.*):9131'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_blackbox_exporter is defined %} {% if prometheus_blackbox_exporter is defined %}
# blackbox # # blackbox #
{% if prometheus_blackbox_exporter_http is defined %} {% if prometheus_blackbox_exporter_http is defined %}
@ -250,8 +250,8 @@ scrape_configs:
- target_label: __address__ - target_label: __address__
replacement: {{ prometheus_blackbox_exporter_host }}:9115 replacement: {{ prometheus_blackbox_exporter_host }}:9115
{% endif %} {% endif %}
{% endif %}
{% endif %}
{% if prometheus_redis_multi_instances_exporter_targets is defined %} {% if prometheus_redis_multi_instances_exporter_targets is defined %}
# Redis exporter # # Redis exporter #
- job_name: 'redis_exporter_targets' - job_name: 'redis_exporter_targets'
@ -270,8 +270,8 @@ scrape_configs:
target_label: __address__ target_label: __address__
regex: 'redis://(.*):63..' regex: 'redis://(.*):63..'
replacement: '${1}:9121' replacement: '${1}:9121'
{% endif %}
{% endif %}
{% if prometheus_redis_exporter_targets is defined %} {% if prometheus_redis_exporter_targets is defined %}
# Redis exporter # # Redis exporter #
- job_name: redis - job_name: redis
@ -287,8 +287,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9121' regex: '(.*):9121'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_proxysql_exporter_targets is defined %} {% if prometheus_proxysql_exporter_targets is defined %}
# ProxySQL exporter # # ProxySQL exporter #
- job_name: proxysql - job_name: proxysql
@ -304,8 +304,8 @@ scrape_configs:
regex: '(.*):6070' regex: '(.*):6070'
replacement: '${1}' replacement: '${1}'
{% endfor %} {% endfor %}
{% endif %}
{% endif %}
{% if prometheus_kong_exporter_targets is defined %} {% if prometheus_kong_exporter_targets is defined %}
# Kong exporter # # Kong exporter #
- job_name: kong - job_name: kong
@ -320,8 +320,8 @@ scrape_configs:
{% for target in prometheus_kong_exporter_targets %} {% for target in prometheus_kong_exporter_targets %}
- {{ target }} - {{ target }}
{% endfor %} {% endfor %}
{% endif %}
{% endif %}
{% if prometheus_memcached_exporter_targets is defined %} {% if prometheus_memcached_exporter_targets is defined %}
# Memcached exporter # # Memcached exporter #
- job_name: memcached - job_name: memcached
@ -337,8 +337,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9150' regex: '(.*):9150'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_docker_exporter_targets is defined %} {% if prometheus_docker_exporter_targets is defined %}
# Docker exporter # # Docker exporter #
- job_name: docker - job_name: docker
@ -354,8 +354,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):9323' regex: '(.*):9323'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_cadvisor_exporter_targets is defined %} {% if prometheus_cadvisor_exporter_targets is defined %}
# cadvisor # # cadvisor #
- job_name: cadvisor - job_name: cadvisor
@ -370,8 +370,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):8080' regex: '(.*):8080'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_cloudflare_exporter_targets is defined %} {% if prometheus_cloudflare_exporter_targets is defined %}
# cloudflare # # cloudflare #
- job_name: cloudflare - job_name: cloudflare
@ -386,8 +386,8 @@ scrape_configs:
target_label: instance target_label: instance
regex: '(.*):8082' regex: '(.*):8082'
replacement: '${1}' replacement: '${1}'
{% endif %}
{% endif %}
{% if prometheus_pve_exporter_targets is defined %} {% if prometheus_pve_exporter_targets is defined %}
# proxmox # # proxmox #
- job_name: pve - job_name: pve