setup full autodeployment for icingaweb with grafana
This commit is contained in:
7
grafana/default.dashboard.yml
Normal file
7
grafana/default.dashboard.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: $GRAFANA_DEFAULT_DASHBOARD_NAME
|
||||
type: file
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/$GRAFANA_DEFAULT_DASHBOARD_FILE
|
||||
14
grafana/default.source.yml
Normal file
14
grafana/default.source.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: $GRAFANA_DEFAULT_SOURCE_NAME
|
||||
type: influxdb
|
||||
uid: $GRAFANA_DEFAULT_SOURCE_UID
|
||||
access: proxy
|
||||
user: $GRAFANA_DEFAULT_SOURCE_USER
|
||||
url: http://influxdb:8086
|
||||
jsonData:
|
||||
dbName: $GRAFANA_DEFAULT_SOURCE_DB
|
||||
httpMode: GET
|
||||
secureJsonData:
|
||||
password: $GRAFANA_DEFAULT_SOURCE_PASS
|
||||
307
grafana/icinga2-default.json
Normal file
307
grafana/icinga2-default.json
Normal file
@@ -0,0 +1,307 @@
|
||||
{
|
||||
"__inputs": [
|
||||
{
|
||||
"name": "DS_ICINGA2",
|
||||
"label": "Icinga2",
|
||||
"description": "",
|
||||
"type": "datasource",
|
||||
"pluginId": "influxdb",
|
||||
"pluginName": "InfluxDB"
|
||||
},
|
||||
{
|
||||
"name": "VAR_HOSTNAME",
|
||||
"type": "constant",
|
||||
"label": "hostname",
|
||||
"value": "null",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "VAR_SERVICE",
|
||||
"type": "constant",
|
||||
"label": "service",
|
||||
"value": "null",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "VAR_COMMAND",
|
||||
"type": "constant",
|
||||
"label": "command",
|
||||
"value": "null",
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "4.6.3"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "graph",
|
||||
"name": "Graph",
|
||||
"version": ""
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
"id": "influxdb",
|
||||
"name": "InfluxDB",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Show all metrics from a Icinga2 service or host",
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"hideControls": false,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"rows": [
|
||||
{
|
||||
"collapse": false,
|
||||
"height": "250px",
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "influxdb",
|
||||
"fill": 1,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"percentage": false,
|
||||
"pointradius": 1,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"span": 12,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "$tag_metric",
|
||||
"dsType": "influxdb",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
"$__interval"
|
||||
],
|
||||
"type": "time"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"metric"
|
||||
],
|
||||
"type": "tag"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"none"
|
||||
],
|
||||
"type": "fill"
|
||||
}
|
||||
],
|
||||
"measurement": "/^$command$/",
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": [
|
||||
"value"
|
||||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "mean"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"key": "hostname",
|
||||
"operator": "=~",
|
||||
"value": "/^$hostname$/"
|
||||
},
|
||||
{
|
||||
"condition": "AND",
|
||||
"key": "service",
|
||||
"operator": "=~",
|
||||
"value": "/^$service$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "$service",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 1,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"repeat": null,
|
||||
"repeatIteration": null,
|
||||
"repeatRowId": null,
|
||||
"showTitle": false,
|
||||
"title": "Default",
|
||||
"titleSize": "h6"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 14,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"Icinga2",
|
||||
"influxdb"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"value": "${VAR_HOSTNAME}",
|
||||
"text": "${VAR_HOSTNAME}"
|
||||
},
|
||||
"hide": 2,
|
||||
"label": null,
|
||||
"name": "hostname",
|
||||
"options": [
|
||||
{
|
||||
"value": "${VAR_HOSTNAME}",
|
||||
"text": "${VAR_HOSTNAME}"
|
||||
}
|
||||
],
|
||||
"query": "${VAR_HOSTNAME}",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"value": "${VAR_SERVICE}",
|
||||
"text": "${VAR_SERVICE}"
|
||||
},
|
||||
"hide": 2,
|
||||
"label": null,
|
||||
"name": "service",
|
||||
"options": [
|
||||
{
|
||||
"value": "${VAR_SERVICE}",
|
||||
"text": "${VAR_SERVICE}"
|
||||
}
|
||||
],
|
||||
"query": "${VAR_SERVICE}",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"value": "${VAR_COMMAND}",
|
||||
"text": "${VAR_COMMAND}"
|
||||
},
|
||||
"hide": 2,
|
||||
"label": null,
|
||||
"name": "command",
|
||||
"options": [
|
||||
{
|
||||
"value": "${VAR_COMMAND}",
|
||||
"text": "${VAR_COMMAND}"
|
||||
}
|
||||
],
|
||||
"query": "${VAR_COMMAND}",
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "icinga2-default",
|
||||
"uid": "icinga-default",
|
||||
"version": 3
|
||||
}
|
||||
Reference in New Issue
Block a user