Commit 86aa0b03 authored by Paul's avatar Paul
Browse files

remove monitoring form service role

parent afa982d5
Pipeline #5079 passed with stage
in 1 minute and 49 seconds
deb https://packages.grafana.com/oss/deb stable main
proxy_cache_path /var/cache/nginx levels=1:2 inactive=10m max_size=1g keys_zone=grafana:1m;
upstream backend {
server 127.0.0.1:3000;
# server cranberry.luebeck.freifunk.net:3000 backup;
}
server {
listen 80;
listen [::]:80;
......@@ -44,7 +39,7 @@ server {
proxy_hide_header Expires;
proxy_hide_header X-Accel-Expires;
proxy_cache_methods GET POST;
proxy_pass http://127.0.0.1:3000;
proxy_pass http://monitoring.net.ffhl.de:3000;
}
location / {
......@@ -52,6 +47,6 @@ server {
proxy_send_timeout 5;
proxy_read_timeout 5;
send_timeout 5;
proxy_pass http://backend;
proxy_pass http://monitoring.net.ffhl.de:3000;
}
}
groups:
- name: ffhl
rules:
- record: "fastd_peer_traffic_sum"
expr: 'sum by (key, name) (rate(fastd_peer_traffic{iface=~"ffhl_mesh_vpn.*", kind="bytes", type=~"rx|tx"}[1m]))'
- record: "ffhl_mesh_links"
expr: 'count by (link_type) (link_tq{link_type!="undefined"})'
- record: "ffhl_nodes_online_percentage"
expr: 'meshnodes_online_total{job="hopglass"} / meshnodes_total{job="hopglass"}'
- record: "ffhl_mesh_avg_link_quality"
expr: 'avg by (link_type)(link_tq{link_type!="undefined"})'
- record: "ffhl_mesh_connected_clients_24"
expr: 'avg_over_time(total_clients{job="hopglass",instance_!="hopglass"}[24h])'
- record: 'ffhl_firmware_distribution'
expr: 'count by (firmware)(online{firmware!="", instance_!="hopglass"})'
- record: 'ffhl_device_distribution'
expr: 'count by (model)(online{model!="", instance_!="hopglass"})'
- record: 'ffhl_gateway_distribution'
expr: 'count by (gateway) (online{gateway!="", job="hopglass"})'
- record: 'ffhl_mesh_sum_traffic_type'
expr: 'sum by (type) (rate(statistics_traffic[300s]))'
- record: "ffhl_mesh_sum_traffic_mtype"
expr: 'sum by (mtype) (rate(statistics_traffic[300s]))'
- record: 'ffhl_node_statistics_traffic'
expr: 'sum by (nodeid, mtype) (rate(statistics_traffic{site="ffhl", instance_!="hopglass"}[5m]) * 8)'
# Sample config for Prometheus.
global:
scrape_interval: 60s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 120s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# 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: "hopglass"
static_configs:
- targets: ["localhost:4000"]
- job_name: "hosts"
static_configs:
- targets:
- "muehlentor.mesh.ffhl.chaotikum.org:9100"
- "holstentor.mesh.ffhl.chaotikum.org:9100"
- "kaisertor.mesh.ffhl.chaotikum.org:9100"
- "huextertor.mesh.ffhl.chaotikum.org:9100"
- "gw05.ffhl.chaotikum.org:9100"
- "builder.luebeck.freifunk.net:9100"
- "srv02.luebeck.freifunk.net:9100"
- "srv03.luebeck.freifunk.net:9100"
- "blueberry.luebeck.freifunk.net:9100"
- "strawberry.luebeck.freifunk.net:9100"
- job_name: powerdns
static_configs:
- targets:
- "kaisertor.luebeck.freifunk.net:8082"
- "huextertor.luebeck.freifunk.net:8082"
- "holstentor.luebeck.freifunk.net:8082"
- "muehlentor.luebeck.freifunk.net:8082"
- "gw05.ffhl.chaotikum.org:8082"
- job_name: fastd
static_configs:
- targets:
- "kaisertor.luebeck.freifunk.net:9281"
- "muehlentor.luebeck.freifunk.net:9281"
- "holstentor.luebeck.freifunk.net:9281"
- "huextertor.luebeck.freifunk.net:9281"
- "testgw.luebeck.freifunk.net:9281"
- job_name: bird
static_configs:
- targets:
- "kaisertor.luebeck.freifunk.net:9324"
- "huextertor.luebeck.freifunk.net:9324"
- "holstentor.luebeck.freifunk.net:9324"
- "muehlentor.luebeck.freifunk.net:9324"
- "gw05.ffhl.chaotikum.org:9324"
- job_name: "blackbox_ping"
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- "google.com"
- "ipv6.google.com"
- "1.1.1.1"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: target
- target_label: __address__
replacement: "blackbox.luebeck.freifunk.net:9115"
......@@ -7,10 +7,6 @@
import_tasks: software.yml
tags: [base, apt, software]
- name: setup monitoring
tags: [monitoring, prometheus]
import_tasks: monitoring.yml
- name: setup nginx
tags: [nginx]
import_tasks: nginx.yml
......
---
- name: copy prometheus config files
copy:
src: prometheus
dest: /etc/
- name: install grafana
apt:
update_cache: yes
state: latest
name: prometheus
- name: restart prometheus
systemd:
enabled: yes
state: restarted
name: prometheus
#
# Install Grafana
#
- name: add grafana repo pubkey
shell:
cmd: wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
warn: false
- name: setup grafana repo
copy:
src: grafana.list
dest: /etc/apt/sources.list.d/
- name: install grafana
apt:
update_cache: yes
state: latest
name: grafana
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment