Added soft-serve

Added graphana/prometheus (not working yet)

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2022-12-21 22:28:46 +01:00
parent 2ba4259dd6
commit 1fdeaf2ded
9 changed files with 121 additions and 15 deletions

View File

@@ -16,7 +16,6 @@ services:
- "MAX_LOG_SIZE_BYTES=1000000"
- "MAX_LOG_NUMBER=20"
- "TZ=Europe/Berlin"
zoneminder:
image: ghcr.io/zoneminder-containers/zoneminder-base:latest
restart: always
@@ -45,6 +44,7 @@ services:
- "MAX_LOG_SIZE_BYTES=1000000"
- "MAX_LOG_NUMBER=20"
- "TZ=Europe/Berlin"
pihole:
container_name: pihole
image: pihole/pihole:latest
@@ -76,6 +76,7 @@ services:
- "traefik.http.routers.pihole.rule=Host(`pihole.{{local_domain}}`)"
- "traefik.http.routers.pihole.entrypoints=web"
- "traefik.http.services.pihole.loadbalancer.server.port=8089"
syncthing:
image: syncthing/syncthing
container_name: syncthing
@@ -83,8 +84,8 @@ services:
networks:
- net
environment:
- PUID=1000
- PGID=1000
- "PUID={{ puid }}"
- "PGID={{ pgid }}"
volumes:
- "{{syncthing_data}}:/var/syncthing"
ports:
@@ -93,23 +94,29 @@ services:
- 22000:22000/udp # QUIC file transfers
- 21027:21027/udp # Receive local discovery broadcasts
restart: unless-stopped
grafana:
image: grafana/grafana-oss
container_name: grafana
hostname: grafana
user: "{{ puid }}:{{ pgid }}"
networks:
- net
environment:
- "PUID={{ puid }}"
- "PGID={{ pgid }}"
- "GF_LOG_MODE=console file"
volumes:
- "{{ grafana_data }}:/var/lib/grafana/"
- "{{ grafana_log }}:/var/log/grafana/"
- "{{ grafana_config }}:/etc/grafana/"
ports:
- 3000:3000
soft-serve:
image: charmcli/soft-serve:latest
container_name: soft-serve
volumes:
- "{{ softserve_data }}:/soft-serve"
ports:
- 23231:23231
restart: unless-stopped
networks:
zoneminder:

View File

@@ -0,0 +1,54 @@
# Sample config for Prometheus.
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'Mikrotik'
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets: ['localhost:9093']
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 10s
scrape_timeout: 10s
tls_config:
insecure_skip_verify: true
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
#static_configs:
#- targets: ['localhost:9090']
- job_name: Mikrotik
static_configs:
- targets:
- {{ mikrotik_ip }} # mikrotik_ip
metrics_path: /snmp
params:
module: [mikrotik]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: mk_snmp_exporter:9116 # The SNMP exporter's real hostname:port.

View File

@@ -0,0 +1 @@
fs.inotify.max_user_watches=204800