mirror of
https://github.com/M0r13n/mikrotik_monitoring.git
synced 2025-12-06 18:19:30 +00:00
Grafana
This commit is contained in:
parent
bd6bbbeb05
commit
eea3de6f66
6 changed files with 3141 additions and 2 deletions
|
|
@ -20,6 +20,9 @@ Create a user that is part of the group:
|
||||||
|
|
||||||
`/user add name=prometheus group=prometheus password=TOP_SECRET`
|
`/user add name=prometheus group=prometheus password=TOP_SECRET`
|
||||||
|
|
||||||
|
Because the library makes a new connection for every API request, your logs are getting cluttered:
|
||||||
|
|
||||||
|
`system logging set 0 topics=info,!account`
|
||||||
|
|
||||||
## Prepare Raspi
|
## Prepare Raspi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ version: "3.9"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
prometheus_data: {}
|
prometheus_data: {}
|
||||||
|
grafana_data: {}
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
@ -36,3 +37,25 @@ services:
|
||||||
- default
|
- default
|
||||||
labels:
|
labels:
|
||||||
org.label-schema.group: "monitoring"
|
org.label-schema.group: "monitoring"
|
||||||
|
|
||||||
|
# Grafana
|
||||||
|
# https://github.com/stefanprodan/dockprom
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana:8.0.4
|
||||||
|
container_name: grafana
|
||||||
|
volumes:
|
||||||
|
- grafana_data:/var/lib/grafana
|
||||||
|
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||||
|
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
|
||||||
|
environment:
|
||||||
|
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
|
||||||
|
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
|
||||||
|
- GF_USERS_ALLOW_SIGN_UP=false
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
- 80:3000
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
labels:
|
||||||
|
org.label-schema.group: "monitoring"
|
||||||
13
grafana/provisioning/dashboards/dashboard.yml
Normal file
13
grafana/provisioning/dashboards/dashboard.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
providers:
|
||||||
|
- name: 'Prometheus'
|
||||||
|
orgId: 1
|
||||||
|
folder: ''
|
||||||
|
type: file
|
||||||
|
disableDeletion: false
|
||||||
|
editable: true
|
||||||
|
allowUiUpdates: true
|
||||||
|
options:
|
||||||
|
path: /etc/grafana/provisioning/dashboards
|
||||||
3070
grafana/provisioning/dashboards/monitor.json
Normal file
3070
grafana/provisioning/dashboards/monitor.json
Normal file
File diff suppressed because it is too large
Load diff
12
grafana/provisioning/datasources/datasource.yml
Normal file
12
grafana/provisioning/datasources/datasource.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
orgId: 1
|
||||||
|
url: http://prometheus:9090
|
||||||
|
basicAuth: false
|
||||||
|
isDefault: true
|
||||||
|
editable: true
|
||||||
|
|
@ -2,5 +2,23 @@ devices:
|
||||||
- name: Chateau
|
- name: Chateau
|
||||||
address: 192.168.0.1
|
address: 192.168.0.1
|
||||||
user: prometheus
|
user: prometheus
|
||||||
password: TOP_SECRET
|
password: FOOO
|
||||||
|
|
||||||
|
features:
|
||||||
|
bgp: false
|
||||||
|
dhcp: true
|
||||||
|
dhcpv6: true
|
||||||
|
dhcpl: true
|
||||||
|
routes: true
|
||||||
|
firmware: true
|
||||||
|
pools: true
|
||||||
|
monitor: true
|
||||||
|
health: true
|
||||||
|
resource: true
|
||||||
|
interface: true
|
||||||
|
health: true
|
||||||
|
pool: true
|
||||||
|
wlansta: true
|
||||||
|
wlanif: true
|
||||||
|
lte: false
|
||||||
|
netwatch: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue