mirror of
https://github.com/StepanovPlaton/HomeServerServices.git
synced 2026-04-05 21:30:46 +04:00
init
This commit is contained in:
3
grafana/.env.example
Normal file
3
grafana/.env.example
Normal file
@@ -0,0 +1,3 @@
|
||||
GRAFANA_PORT=3000
|
||||
GRAFANA_USER=user
|
||||
GRAFANA_PASSWORD=password
|
||||
57
grafana/docker-compose.yml
Normal file
57
grafana/docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
# ports:
|
||||
# - "9090:9090"
|
||||
networks:
|
||||
- grafana_network
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- ${GRAFANA_PORT:?}:3000
|
||||
volumes:
|
||||
- ./grafana:/etc/grafana/provisioning
|
||||
- grafana_data:/var/lib/grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:?} # Ваш логин
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:?} # Ваш пароль
|
||||
networks:
|
||||
- grafana_network
|
||||
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
container_name: node-exporter
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/rootfs:ro
|
||||
command:
|
||||
- '--path.procfs=/host/proc'
|
||||
- '--path.rootfs=/rootfs'
|
||||
- '--path.sysfs=/host/sys'
|
||||
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
||||
- '--collector.systemd'
|
||||
# ports:
|
||||
# - "9100:9100"
|
||||
networks:
|
||||
- grafana_network
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
||||
networks:
|
||||
grafana_network:
|
||||
driver: bridge
|
||||
10
grafana/grafana/dashboards/dashboards.yaml
Normal file
10
grafana/grafana/dashboards/dashboards.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: 'DefaultDashboards'
|
||||
orgId: 1
|
||||
folder: ''
|
||||
type: file
|
||||
disableDeletion: false
|
||||
updateIntervalSeconds: 10
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
||||
23899
grafana/grafana/dashboards/node_exporter_dash.json
Normal file
23899
grafana/grafana/dashboards/node_exporter_dash.json
Normal file
File diff suppressed because it is too large
Load Diff
8
grafana/grafana/datasources/datasource.yaml
Normal file
8
grafana/grafana/datasources/datasource.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
access: proxy
|
||||
editable: true
|
||||
11
grafana/prometheus.yml
Normal file
11
grafana/prometheus.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['prometheus:9090']
|
||||
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets: ['node-exporter:9100']
|
||||
Reference in New Issue
Block a user