knightcrawler-stremio / knightcrawler

A selfhosted Stremio addon
Apache License 2.0
312 stars 44 forks source link

Enhance logging transports: Loki + Promtail -> Grafana #53

Closed iPromKnight closed 9 months ago

iPromKnight commented 9 months ago

Now #42 has been done, we should expand on this and add a loki transport, or introduce promtail and loki into the metrics stack, as loki can be fed into Grafana now.

An example we could use for promtail would be

scrape_configs:
  - job_name: containers
    static_configs:
      - targets:
          - localhost
        labels:
          job: containerlogs
          __path__: /var/lib/docker/containers/*/*log
    relabel_configs:
      - source_labels: ['__meta_docker_container_label_com_docker_compose_service']
        regex: 'knightcrawler_consumer.*|knightcrawler_addon.*|knightcrawler_producer.*'
        action: keep

once #51 is merged in

Gabisonfire commented 9 months ago

Fixed in https://github.com/Gabisonfire/torrentio-scraper-sh/pull/58