1649 files changed
+329897
No files matched your search
Executable
+47
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
restart: on-failure
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- data:/var/lib/grafana
|
||||
- ./provisioning:/etc/grafana/provisioning:ro
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=nocode
|
||||
- GF_SECURITY_ADMIN_PASSWORD=Pikachu2905
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus:/prometheus
|
||||
|
||||
# métriques de la machine hôte (CPU, RAM, disques, réseau)
|
||||
node-exporter:
|
||||
image: prom/node-exporter
|
||||
restart: unless-stopped
|
||||
command: --path.rootfs=/host
|
||||
pid: host
|
||||
volumes:
|
||||
- /:/host:ro,rslave
|
||||
|
||||
# métriques par conteneur (jellyfin, arr, netbox...)
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:v0.49.1
|
||||
restart: unless-stopped
|
||||
privileged: true
|
||||
devices:
|
||||
- /dev/kmsg
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
- /var/run:/var/run:ro
|
||||
- /sys:/sys:ro
|
||||
- /var/lib/docker:/var/lib/docker:ro
|
||||
|
||||
volumes:
|
||||
data:
|
||||
prometheus:
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
scrape_configs:
|
||||
- job_name: node
|
||||
static_configs: [{ targets: ["node-exporter:9100"] }]
|
||||
- job_name: cadvisor
|
||||
static_configs: [{ targets: ["cadvisor:8080"] }]
|
||||
- job_name: prometheus
|
||||
static_configs: [{ targets: ["localhost:9090"] }]
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"__elements": {}, "annotations": {"list": [{"builtIn": 1, "datasource": {"type": "grafana", "uid": "-- Grafana --"}, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": {"limit": 100, "matchAny": false, "tags": [], "type": "dashboard"}, "type": "dashboard"}]}, "description": "I created this cadvisor dashboard to show everything scraped from cadvisor.\r\n\r\n- Expanding all the rows may consume too much resources.\r\n- Limit the containers by selecting compose_project.\r\n- First few rows are stacked. Container rows are not.\r\n\r\nIf you have any issues or suggestions, please email mail@maoyin.eu.", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, "id": null, "links": [{"asDropdown": true, "icon": "external link", "includeVars": false, "keepTime": false, "tags": [], "targetBlank": true, "title": "Check for Updates", "tooltip": "Check update on Grafana.com Dashboard Repository", "type": "link", "url": "https://grafana.com/grafana/dashboards/19792-cadvisor-dashboard/"}, {"asDropdown": false, "icon": "external link", "includeVars": false, "keepTime": false, "tags": [], "targetBlank": true, "title": "Author", "tooltip": "A shameless plug of author's homepage. Contact author for issues and suggestions. ", "type": "link", "url": "https://maoyin.eu"}], "liveNow": false, "panels": [{"collapsed": true, "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "id": 26, "panels": [{"datasource": {"type": "prometheus", "uid": "prometheus"}, "description": "Start time of the container since unix epoch in seconds.", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "green"}, {"color": "red", "value": 80}]}, "unit": "dateTimeAsIso"}, "overrides": []}, "gridPos": {"h": 9, "w": 3, "x": 0, "y": 1}, "id": 59, "options": {"displayMode": "basic", "maxVizHeight": 300, "minVizHeight": 10, "minVizWidth": 0, "namePlacement": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showUnfilled": true, "sizing": "auto", "valueMode": "color"}, "pluginVersion": "11.1.0", "targets": [{"datasource": {"type": "prometheus", "uid": "prometheus"}, "editorMode": "code", "exemplar": false, "expr": "max by (name) (container_start_time_seconds{instance=~\"$host_instance\", name=~\"$container_name\", container_label_com_docker_compose_project=~\"$compose_project\"}) * 1000", "format": "time_series", "hide": false, "instant": true, "legendFormat": "{{name}}", "range": false, "refId": "A"}], "title": "container_start_time", "type": "bargauge"}, {"datasource": {"type": "prometheus", "uid": "prometheus"}, "description": "Last time a container was seen by the exporter", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "green"}, {"color": "red", "value": 80}]}, "unit": "dateTimeAsIso"}, "overrides": []}, "gridPos": {"h": 9, "w": 3, "x": 3, "y": 1}, "id": 24, "options": {"displayMode": "basic", "maxVizHeight": 300, "minVizHeight": 10, "minVizWidth": 0, "namePlacement": "auto", "orientation": "horizontal", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showUnfilled": true, "sizing": "auto", "valueMode": "color"}, "pluginVersion": "11.1.0", "targets": [{"datasource": {"type": "prometheus", "uid": "prometheus"}, "editorMode": "code", "exemplar": false, "expr": "max by (name) (container_last_seen{instance=~\"$host_instance\", name=~\"$container_name\", container_label_com_docker_compose_project=~\"$compose_project\"}) * 1000", "hide": false, "instant": true, "legendFormat": "{{name}}", "range": false, "refId": "A"}], "title": "container_last_seen", "type": "bargauge"}, {"datasource": {"type": "prometheus", "uid": "prometheus"}, "description": "Number of tasks in given state\nnot working: https://github.com/google/cadvisor/issues/2739", "fieldConfig": {"defaults": {"color": {"mode": "palette-classic"}, "custom": {"axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": {"legend": false, "tooltip": false, "viz": false}, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": {"type": "linear"}, "showPoints": "auto", "spanNulls": false, "stacking": {"group": "A", "mode": "none"}, "thresholdsStyle": {"mode": "off"}}, "mappings": [], "thresholds": {"mode": "absolute", "steps": [{"color": "green"}, {"color": "red", "value": 80}]}}, "overrides": []}, "gridPos": {"h": 9, "w": 6, "x": 6, "y": 1}, "id": 60, "options": {"legend": {"calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "single", "sort": "none"}}, "pluginVersion": "9.3.2", "targets": [{"datasource": {"type": "prometheus", "uid": "pLine truncated
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: demo
|
||||
folder: Demo
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
||||
+15555
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: prometheus
|
||||
type: prometheus
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
Reference in new issue
Block a user