resmoio / kubernetes-event-exporter

Export Kubernetes events to multiple destinations with routing and filtering
Apache License 2.0
753 stars 149 forks source link

How to get events to Prometheus/Grafana? #160

Open taemon1337 opened 7 months ago

taemon1337 commented 7 months ago

I've installed via Helm Chart with the following values.yaml:

metrics:
  enabled: true
config:
  logLevel: error
  logFormat: json
  receivers:
    - name: "dump"
      stdout:
        deDot: true

so my question is how can I get the events into prometheus?

The metrics exposed are just events_sent, events_discarded, and the go default ones, which makes sense.

There is no prometheus dump or way to get events into the metrics. I get that these are events so maybe they just can't be exported as metrics, but I'm trying to get the Dashboard up and running.

Any help is appreciated :)

AeroNotix commented 6 months ago

You'd have to write a prometheus dump, or use the webhook exporter to convert them to a metric in the service which receives the webhooks.

vanhoutenbos commented 6 months ago

I use the bitnami chart that has a built in metric & servicemonitor: https://github.com/bitnami/charts/tree/main/bitnami/kubernetes-event-exporter

metrics:
  enabled: true 
  serviceMonitor:
    enabled: true

But I am running into the same issue, i want to see the 'BackOff: restarting failed container' events in my prometheus environment