Browse Source

push wip to test on other machine

master
root 4 years ago
parent
commit
6d2a777f22
  1. 102
      docker-compose/docker-compose.yml
  2. 0
      docker-compose/grafana/provisioning/dashboards/admin/monitor_services.json
  3. 15
      docker-compose/grafana/provisioning/dashboards/dashboard.yml
  4. 3278
      docker-compose/grafana/provisioning/dashboards/digimode/live.json
  5. 1270
      docker-compose/grafana/provisioning/dashboards/docker_containers.json
  6. 1441
      docker-compose/grafana/provisioning/dashboards/docker_host.json
  7. 398
      docker-compose/grafana/provisioning/dashboards/nginx_container.json
  8. 8
      docker-compose/grafana/provisioning/datasources/datasource.yml

102
docker-compose/docker-compose.yml

@ -7,7 +7,7 @@ networks:
volumes: volumes:
prometheus_data: {} prometheus_data: {}
grafana_data: {} grafana_data: {}
# db_data: {} db_data: {}
services: services:
@ -25,8 +25,8 @@ services:
- '--storage.tsdb.retention.time=14d' - '--storage.tsdb.retention.time=14d'
- '--web.enable-lifecycle' - '--web.enable-lifecycle'
restart: unless-stopped restart: unless-stopped
expose: # expose:
- 9090 # - 9090
networks: networks:
- monitor-net - monitor-net
labels: labels:
@ -41,45 +41,8 @@ services:
- '--config.file=/etc/alertmanager/config.yml' - '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager' - '--storage.path=/alertmanager'
restart: unless-stopped restart: unless-stopped
expose: # expose:
- 9093 # - 9093
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
nodeexporter:
image: prom/node-exporter:v1.0.1
container_name: nodeexporter
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.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
expose:
- 9100
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.38.0
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
restart: unless-stopped
expose:
- 8080
networks: networks:
- monitor-net - monitor-net
labels: labels:
@ -100,37 +63,7 @@ services:
- GF_LOG_FILTERS='rendering:debug' - GF_LOG_FILTERS='rendering:debug'
restart: unless-stopped restart: unless-stopped
expose: expose:
- 3000 - 3001
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
pushgateway:
image: prom/pushgateway:v1.3.0
container_name: pushgateway
restart: unless-stopped
expose:
- 9091
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
caddy:
image: stefanprodan/caddy
container_name: caddy
ports:
- "3000:3000"
- "9090:9090"
- "9093:9093"
- "9091:9091"
volumes:
- ./caddy:/etc/caddy
environment:
- ADMIN_USER=${ADMIN_USER:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
restart: unless-stopped
networks: networks:
- monitor-net - monitor-net
labels: labels:
@ -167,21 +100,19 @@ services:
org.label-schema.group: "monitoring" org.label-schema.group: "monitoring"
db: db:
#image: mysql:5.7 image: mysql:8
image: mysql:8.0.22
container_name: db container_name: db
cpus: 4.0 # cpus: 4.0
cap_add: cap_add:
- SYS_NICE - SYS_NICE
volumes: volumes:
# - db_data:/var/lib/mysql - db_data:/var/lib/mysql
- /home/ixyd/dev/dockprom/db:/var/lib/mysql - ./shared:/shared
- /home/ixyd/dev/wsjtx_dashboards:/wsjtx
restart: always restart: always
environment: environment:
MYSQL_ROOT_PASSWORD: verysecret MYSQL_ROOT_PASSWORD: verysecret
MYSQL_DATABASE: digimode_stats MYSQL_DATABASE: digimode_stats
MYSQL_USER: wsjtx MYSQL_USER: stationmonitor
MYSQL_PASSWORD: secret MYSQL_PASSWORD: secret
networks: networks:
- monitor-net - monitor-net
@ -202,17 +133,14 @@ services:
org.label-schema.group: "monitoring" org.label-schema.group: "monitoring"
wsjtx_exporter: wsjtx_exporter:
image: localhost:5000/wsjtx_exporter:latest image: localhost:5000/wsjtx-exporter:latest
container_name: wsjtx_exporter container_name: wsjtx-exporter
volumes:
- /home/ixyd/.local/share/WSJT-X:/wsjtx
expose: expose:
- 2112 - 2112
environment: environment:
- PROMETHEUS=true - PROMETHEUS=true
- MYSQL=true - MYSQL=true
- TRACE=true - TRACE=true
- STATION=DL3SD
restart: unless-stopped restart: unless-stopped
networks: networks:
- monitor-net - monitor-net
@ -220,8 +148,8 @@ services:
org.label-schema.group: "monitoring" org.label-schema.group: "monitoring"
pskreporter_exporter: pskreporter_exporter:
image: localhost:5000/pskreporter_exporter:latest image: localhost:5000/pskreporter-exporter:latest
container_name: pskreporter_exporter container_name: pskreporter-exporter
expose: expose:
- 2112 - 2112
environment: environment:

0
docker-compose/grafana/provisioning/dashboards/monitor_services.json → docker-compose/grafana/provisioning/dashboards/admin/monitor_services.json

15
docker-compose/grafana/provisioning/dashboards/dashboard.yml

@ -1,12 +1,21 @@
apiVersion: 1 apiVersion: 1
providers: providers:
- name: 'Prometheus' - name: 'admin dashboards'
orgId: 1 orgId: 1
folder: '' folder: 'admin'
type: file type: file
disableDeletion: false disableDeletion: false
editable: true editable: true
allowUiUpdates: true allowUiUpdates: true
options: options:
path: /etc/grafana/provisioning/dashboards path: /etc/grafana/provisioning/dashboards/admin
- name: 'digimode dashboards'
orgId: 1
folder: 'digimode'
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
options:
path: /etc/grafana/provisioning/dashboards/digimode

3278
docker-compose/grafana/provisioning/dashboards/digimode/live.json

File diff suppressed because it is too large

1270
docker-compose/grafana/provisioning/dashboards/docker_containers.json

File diff suppressed because it is too large

1441
docker-compose/grafana/provisioning/dashboards/docker_host.json

File diff suppressed because it is too large

398
docker-compose/grafana/provisioning/dashboards/nginx_container.json

@ -1,398 +0,0 @@
{
"id": null,
"title": "Nginx",
"description": "Nginx exporter metrics",
"tags": [
"nginx"
],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": true,
"rows": [
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": "Prometheus",
"decimals": 2,
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 3,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(nginx_connections_processed_total{stage=\"any\"}[5m])) by (stage)",
"hide": false,
"interval": "",
"intervalFactor": 10,
"legendFormat": "requests",
"metric": "",
"refId": "B",
"step": 10
}
],
"timeFrom": null,
"timeShift": null,
"title": "Requests/sec",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"show": true
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "Prometheus",
"decimals": 2,
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 2,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(nginx_connections_current) by (state)",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{state}}",
"metric": "",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connections",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"show": true
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "Prometheus",
"decimals": 2,
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 1,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(nginx_connections_processed_total{stage!=\"any\"}[5m])) by (stage)",
"hide": false,
"interval": "",
"intervalFactor": 10,
"legendFormat": "{{stage}}",
"metric": "",
"refId": "B",
"step": 10
}
],
"timeFrom": null,
"timeShift": null,
"title": "Connections rate",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"show": true
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"title": "Nginx exporter metrics"
},
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": null,
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 4,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(container_cpu_usage_seconds_total{name=~\"nginx\"}[5m])) / count(node_cpu_seconds_total{mode=\"system\"}) * 100",
"intervalFactor": 2,
"legendFormat": "nginx",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "CPU usage",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"show": true
},
"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
}
]
}
],
"title": "Nginx container metrics"
}
],
"time": {
"from": "now-15m",
"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"
]
},
"templating": {
"list": []
},
"annotations": {
"list": []
},
"refresh": "10s",
"schemaVersion": 12,
"version": 9,
"links": [],
"gnetId": null
}

8
docker-compose/grafana/provisioning/datasources/datasource.yml

@ -9,3 +9,11 @@ datasources:
basicAuth: false basicAuth: false
isDefault: true isDefault: true
editable: true editable: true
- name: MySQL
type: mysql
access: direct
orgId: 1
url: mysql://stationmonitor:secret@db:3306/digimode_stats
basicAuth: false
isDefault: false
editable: true

Loading…
Cancel
Save