Skip to content

Grafana Loki

Frank Jogeleit edited this page Jul 23, 2021 · 6 revisions

Policy Reporter uses the Loki REST API to send new PolicyReport Results. It sends beside the Message all available information as labels like Policy Name, Rule, Resource Name, etc. Each event also sends a special label called "source" with the value "policy-reporter". So, its easy fo query all messages from Policy Reporter with the Loki Query {source="policy-reporter"}

Installation and Configuration

Enable Loki by configure your Loki Instance under target.loki.host.

helm install policy-reporter policy-reporter/policy-reporter --set target.loki.host=http://loki:3100 -n policy-reporter --create-namespace

or

# values.yaml
target:
  loki:
    host: "http://loki:3100"

Additional Configurations

  • Configure target.loki.minimumPriority to send only results with the configured minimumPriority or above, empty means all results. (info < warning < critical < error)
  • Configure target.loki.skipExistingOnStartup to skip all results who already existed before the Policy Reporter started (default: true).

Example Configuration

# values.yaml
target:
  loki:
    host: ""
    minimumPriority: ""
    skipExistingOnStartup: true

Screenshot

Grafana Loki