2023-02-12 19:06:30 +01:00
2023-02-12 19:06:30 +01:00
2022-03-31 14:52:21 +02:00
2023-02-12 19:06:30 +01:00
2022-03-31 14:52:21 +02:00
2023-02-12 19:06:30 +01:00
2023-02-12 19:06:30 +01:00
2023-02-12 19:06:30 +01:00
2023-02-12 19:06:30 +01:00
wip
2023-02-09 10:07:29 +01:00
wip
2023-02-09 10:07:29 +01:00
2023-02-11 17:17:50 +01:00
2023-02-11 17:17:50 +01:00
2023-02-11 17:17:50 +01:00
2023-02-11 17:17:50 +01:00
2023-02-11 17:17:50 +01:00
2023-02-11 17:17:50 +01:00
2023-02-12 19:06:30 +01:00
wip
2023-02-09 10:07:29 +01:00
2023-02-11 16:36:26 +01:00
wip
2023-02-09 10:07:29 +01:00
2023-02-12 19:06:30 +01:00
2023-02-11 16:36:26 +01:00

monitoring-lite

A centralised grafana/prometheus/loki stack. This an alternative approach to coop-cloud/monitoring which does include any of the services which actually gather metrics and/or logs. Instead, this is a useful recipe for folks who need to centralise their monitoring stack into a single grafana/prometheus/loki & several instances of node_exporter/cadvisor/promtail.

  • Category: Apps
  • Status: 2, beta
  • Image: grafana/grafana, 4, upstream
  • Healthcheck: 3
  • Backups: 1
  • Email: 3
  • Tests: No
  • SSO: 1

Setup

  1. Configure Traefik to use BasicAuth Generate userslist with httpasswd hashed password

  1. Insert secrets for prometheus
  2. add scrape config (see example) and run abra app cp to copy it
  3. grafana sso secret
Grafana Email / SSO monitoring.example.org
Prometheus traefik basic-auth prometheus.monitoring.example.org
loki traefik basic-auth loki.monitoring.example.org
Cadvisor traefik basic-auth cadvisor.monitoring.example.org
Node Exporter traefik basic-auth node.monitoring.example.org

This stack requires 3 domains, one for grafana, prometheus, loki. This is due to the need for the gathering tools, such as node_exporter, to have a publicy accessible URL for making connections. We make use of the internal prometheus HTTP basic auth & wire up an Nginx proxy with HTTP basic auth for loki. Grafana uses Keycloak OpenId Connect sign in. The alertmanager setup remains internal and is only connected with grafana. It also assume that you are deploying the coop-cloud/gathering recipe on the machines that you want to gather metrics & logs from. Each instance of the gathering recipe will report back and/or be scraped by your central install of monitoring-lite.

Post-setup guide

  • configure prometheus/loki/alertmanager as data sources in grafana under Configuration > Data sources

    • for loki, you need to set a "Custom HTTP Header": X-Scope-OrgID: fake
  • configure the SMTP mailer under Alerting > Contact points

    • edit the default contact point, choose "Alertmanager" as type & http://alertmanager:9093 as URL
    • use the "Test" button to send a test mail. It should fire a request at the alertmanager & that should send a mail
  • abra app cp your scrap_configs: ... into /prometheus/scrape_configs & log into your prometheus web UI to ensure they're working

  • load your dashboards in manually under Create > Dashboard

  • from your dashboard panels, choose Edit > Alert to create alerts based on those panels

THX to the previous work of @decentral1se @knooflok @3wc @cellarspoon @mirsal

Description
yet another try on the monitoring stack
Readme 221 KiB
Languages
Shell 100%