Commit 3b83b052 authored by ale's avatar ale
Browse files

Merge branch 'grafana-elasticsearch' into 'master'

Add an ES datasource to Grafana, for annotations

See merge request !205
parents 9adda495 97465d6a
Pipeline #16615 passed with stage
in 8 minutes and 24 seconds
......@@ -20,7 +20,7 @@
variable_start_string: "[["
variable_end_string: "]]"
with_filetree: templates/grafana/
when: item.state == 'file'
when: "item.state == 'file' and (enable_elasticsearch or not item.src.endswith('elasticsearch.yml'))"
notify: restart grafana
- name: Create Grafana database directory
......
......@@ -9,20 +9,24 @@
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
},
{
"datasource": "elasticsearch",
"enable": true,
"hide": false,
"iconColor": "rgba(255, 96, 96, 1)",
"name": "restarts",
"query": "program:systemd AND \"$service.service\" AND (Succeeded OR Failed)",
"showIn": 0
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"iteration": 1614086490638,
"links": [
{
"icon": "external link",
"tags": [],
"type": "dashboards"
}
],
"id": 4,
"iteration": 1622209883116,
"links": [],
"panels": [
{
"collapsed": false,
......@@ -45,9 +49,7 @@
"dashes": false,
"datasource": "localhost",
"fieldConfig": {
"defaults": {
"custom": {}
},
"defaults": {},
"overrides": []
},
"fill": 0,
......@@ -77,7 +79,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.0",
"pluginVersion": "7.5.7",
"pointradius": 5,
"points": false,
"renderer": "flot",
......@@ -149,9 +151,7 @@
"dashes": false,
"datasource": "localhost",
"fieldConfig": {
"defaults": {
"custom": {}
},
"defaults": {},
"overrides": []
},
"fill": 1,
......@@ -181,7 +181,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.0",
"pluginVersion": "7.5.7",
"pointradius": 5,
"points": false,
"renderer": "flot",
......@@ -247,9 +247,7 @@
"dashes": false,
"datasource": "localhost",
"fieldConfig": {
"defaults": {
"custom": {}
},
"defaults": {},
"overrides": []
},
"fill": 1,
......@@ -279,7 +277,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.0",
"pluginVersion": "7.5.7",
"pointradius": 5,
"points": false,
"renderer": "flot",
......@@ -345,9 +343,7 @@
"dashes": false,
"datasource": "localhost",
"fieldConfig": {
"defaults": {
"custom": {}
},
"defaults": {},
"overrides": []
},
"fill": 1,
......@@ -377,7 +373,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.0",
"pluginVersion": "7.5.7",
"pointradius": 5,
"points": false,
"renderer": "flot",
......@@ -385,9 +381,9 @@
"repeatDirection": "h",
"scopedVars": {
"vhosts": {
"selected": false,
"text": "noblogs-cdn.autistici.org:443",
"value": "noblogs-cdn.autistici.org:443"
"selected": true,
"text": "admin.autistici.org:443",
"value": "admin.autistici.org:443"
}
},
"seriesOverrides": [],
......@@ -451,7 +447,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 11
"y": 16
},
"id": 12,
"panels": [],
......@@ -459,8 +455,8 @@
"scopedVars": {
"service": {
"selected": true,
"text": "docker-noblogs-http",
"value": "docker-noblogs-http"
"text": "docker-admin-dashboard-http",
"value": "docker-admin-dashboard-http"
}
},
"title": "Versions",
......@@ -473,9 +469,7 @@
"dashes": false,
"datasource": "localhost",
"fieldConfig": {
"defaults": {
"custom": {}
},
"defaults": {},
"overrides": []
},
"fill": 1,
......@@ -484,7 +478,7 @@
"h": 5,
"w": 24,
"x": 0,
"y": 12
"y": 17
},
"hiddenSeries": false,
"id": 14,
......@@ -504,16 +498,24 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.0",
"pluginVersion": "7.5.7",
"pointradius": 2,
"points": false,
"renderer": "flot",
"scopedVars": {
"service": {
"selected": true,
"text": "docker-admin-dashboard-http",
"value": "docker-admin-dashboard-http"
}
},
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": true,
"targets": [
{
"exemplar": false,
"expr": "count(container_digest{service=\"$service\"}) by (digest)",
"interval": "",
"legendFormat": "{{digest}}",
......@@ -541,6 +543,7 @@
},
"yaxes": [
{
"$$hashKey": "object:76",
"format": "short",
"label": null,
"logBase": 1,
......@@ -549,6 +552,7 @@
"show": true
},
{
"$$hashKey": "object:77",
"format": "short",
"label": null,
"logBase": 1,
......@@ -571,7 +575,11 @@
"list": [
{
"allValue": null,
"current": {},
"current": {
"selected": true,
"text": "docker-admin-dashboard-http",
"value": "docker-admin-dashboard-http"
},
"datasource": "localhost",
"definition": "",
"description": null,
......@@ -598,7 +606,11 @@
},
{
"allValue": null,
"current": {},
"current": {
"selected": false,
"text": "admin.autistici.org:443",
"value": "admin.autistici.org:443"
},
"datasource": "localhost",
"definition": "",
"description": null,
......@@ -657,5 +669,5 @@
"timezone": "",
"title": "Service overview",
"uid": "xfV2rd7ik",
"version": 7
"version": 9
}
apiVersion: 1
datasources:
- name: elasticsearch
type: elasticsearch
access: proxy
database: "[logstash-]YYYY.MM.DD"
url: "http://log-collector.[[ domain ]]:9200"
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 70
logMessageField: "message"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment