Compare commits

..

No commits in common. "c512dc2b0cf4a01ca8564148ecbf294dafbeedab" and "28216483dcf75f0ad3c550ee79c26239ff7dbd56" have entirely different histories.

12 changed files with 25108 additions and 23 deletions

File diff suppressed because it is too large Load Diff

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,567 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 5,
"iteration": 1575268472749,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "$col",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "nginx",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"requests"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"1s"
],
"type": "non_negative_derivative"
},
{
"params": [
"requests"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Requests",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "reqps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"alias": "$col",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "nginx",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"accepts"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"1s"
],
"type": "non_negative_derivative"
},
{
"params": [
"accepts"
],
"type": "alias"
}
],
[
{
"params": [
"active"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"1s"
],
"type": "non_negative_derivative"
},
{
"params": [
"active"
],
"type": "alias"
}
],
[
{
"params": [
"handled"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"1s"
],
"type": "non_negative_derivative"
},
{
"params": [
"handled"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Client Connections",
"tooltip": {
"shared": true,
"sort": 0,
"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": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 9
},
"hiddenSeries": false,
"id": 3,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"alias": "$col",
"groupBy": [
{
"params": [
"10s"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "nginx",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"reading"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"reading"
],
"type": "alias"
}
],
[
{
"params": [
"writing"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"writing"
],
"type": "alias"
}
],
[
{
"params": [
"waiting"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"waiting"
],
"type": "alias"
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Client State",
"tooltip": {
"shared": true,
"sort": 0,
"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": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "5s",
"schemaVersion": 21,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "ping.kill0.net",
"value": "ping.kill0.net"
},
"datasource": "influxdb",
"definition": "SHOW TAG VALUES WITH KEY=host",
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "host",
"options": [],
"query": "SHOW TAG VALUES WITH KEY=host",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "nginx",
"uid": "bwcmJgOZz",
"version": 4
}

View File

@ -0,0 +1,232 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 9,
"iteration": 1575268700708,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "procstat",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"memory_usage"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
},
{
"condition": "AND",
"key": "systemd_unit",
"operator": "=~",
"value": "/^$systemd_unit$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Panel Title",
"tooltip": {
"shared": true,
"sort": 0,
"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": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"schemaVersion": 21,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "mine0.kill0.net",
"value": "mine0.kill0.net"
},
"datasource": "influxdb",
"definition": "SHOW TAG VALUES WITH KEY=host",
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "host",
"options": [],
"query": "SHOW TAG VALUES WITH KEY=host",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"text": "minecraft.service",
"value": "minecraft.service"
},
"datasource": "influxdb",
"definition": "SHOW TAG VALUES WITH KEY=systemd_unit",
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "systemd_unit",
"options": [],
"query": "SHOW TAG VALUES WITH KEY=systemd_unit",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Processes",
"uid": "6I0r6q2Zz",
"version": 8
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ grafana_package_state: present
grafana_service_name: grafana-server.service grafana_service_name: grafana-server.service
grafana_service_state: started grafana_service_state: started
grafana_service_enabled: true grafana_service_enabled: yes
grafana_etc_path: /etc/grafana grafana_etc_path: /etc/grafana
grafana_config_path: "{{ grafana_etc_path }}/grafana.ini" grafana_config_path: "{{ grafana_etc_path }}/grafana.ini"
@ -23,29 +23,20 @@ grafana_config:
http_addr: localhost http_addr: localhost
http_port: "{{ grafana_port }}" http_port: "{{ grafana_port }}"
grafana_ssl_enabled: true grafana_ssl_enabled: yes
grafana_ssl_certificate: "/etc/letsencrypt/live/{{ grafana_domain }}/fullchain.pem" grafana_ssl_certificate: "/etc/letsencrypt/live/{{ grafana_domain }}/fullchain.pem"
grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey.pem" grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey.pem"
#grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" #grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem"
grafana_datasources: grafana_datasources:
apiVersion: 1 apiVersion: 1
deleteDatasources:
- name: influxdb
orgId: 1
datasources: datasources:
- name: Prometheus - name: influxdb
type: prometheus type: influxdb
access: proxy access: proxy
orgId: 1 url: http://localhost:8086
url: http://localhost:9090 database: telegraf
isDefault: true isDefault: yes
version: 1
- name: Thanos
type: prometheus
access: proxy
orgId: 1
url: http://localhost:10913
version: 1 version: 1
grafana_dashboards: grafana_dashboards:

View File

@ -29,10 +29,31 @@ grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey
# grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" # grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem"
grafana_datasources: grafana_datasources:
{} apiVersion: 1
datasources:
- name: influxdb
type: influxdb
access: proxy
url: http://localhost:8086
database: telegraf
isDefault: true
version: 1
grafana_dashboards: grafana_dashboards:
{} apiVersion: 1
providers:
- name: ansible
folder: Built-in
type: file
options:
path: /var/lib/grafana/dashboards
grafana_dashboard_files: grafana_dashboard_files:
[] - connectivity.json
- home-networking.json
- iptables.json
- nginx.json
- processes.json
- switching.json
- system.json
- ups.json

View File

@ -60,7 +60,6 @@
owner: root owner: root
group: "{{ grafana_group }}" group: "{{ grafana_group }}"
mode: 0640 mode: 0640
notify: restart grafana
- name: create dashboard directory - name: create dashboard directory
ansible.builtin.file: ansible.builtin.file:
@ -77,7 +76,6 @@
owner: root owner: root
group: "{{ grafana_group }}" group: "{{ grafana_group }}"
mode: 0640 mode: 0640
notify: restart grafana
- name: upload user dashboards - name: upload user dashboards
ansible.builtin.copy: ansible.builtin.copy:
@ -87,7 +85,6 @@
group: "{{ grafana_group }}" group: "{{ grafana_group }}"
mode: 0644 mode: 0644
loop: "{{ grafana_dashboard_files | default([]) }}" loop: "{{ grafana_dashboard_files | default([]) }}"
notify: restart grafana
- name: manage service - name: manage service
ansible.builtin.service: ansible.builtin.service: