Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add prometheus receiver #177

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cherylfbrown
Copy link

Adds a Prometheus receiver for emitting event metrics that Prometheus can scrape, along with associated README and config example updates.

Example config used for testing:

      - name: "prometheus"
        prometheus:
          eventsMetricsNamePrefix: "my_test_prefix_"
          reasonFilter:
            Pod:
            - "FailedMount"

Example metric emitted:
my_test_prefix_pod_event_count{app="event-exporter", job="kubernetes-pods", kubernetes_namespace="monitoring", kubernetes_pod_name="event-exporter-7db4c957cb-77tbd", namespace="cheryl", pod="c-test-0", reason="FailedMount", version="v1"} 1

closes #160

@cherylfbrown cherylfbrown mentioned this pull request Apr 11, 2024
@yuzs2
Copy link

yuzs2 commented Apr 15, 2024

This feature looks good. When will this be added to the new release? How can we use this now?

@PG2000
Copy link

PG2000 commented Apr 17, 2024

+1

@cherylfbrown
Copy link
Author

@mustafaakin Any outlook on when you might be able to review this PR? Thank you!

@sanjaybommalene
Copy link

@cherylfbrown Thanks for adding this feature. This is much needed. I have one suggestion for improvement. As of now, prometheus is scraping all the old events even though are not valid(active) anymore. Can we add a filter to emit event metrics only for active events or use last seen timestamp(event age)?

@wang-xiaowu
Copy link

+1
this can be practical

@cherylfbrown cherylfbrown force-pushed the prometheus-receiver branch from f9cd7cd to 9113627 Compare June 17, 2024 20:06
wang-xiaowu

This comment was marked as resolved.

config.example.yaml Outdated Show resolved Hide resolved
pkg/sinks/prometheus.go Show resolved Hide resolved
pkg/sinks/prometheus.go Outdated Show resolved Hide resolved
@filippos47
Copy link

We're currently evaluating this tool, this would be an amazing feature!

@BFS-JWesseler
Copy link

That would be awesome. :-)

@srijan-shukla
Copy link

Hi team,
Request to kindly review this PR , a much needed feature !!!

@duanhongyi
Copy link

+1

1 similar comment
@jianxiaoguo
Copy link

+1

@sumeet-zuora
Copy link

this looks awesome, when will this be released

@shivvinaykanswal
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to get events to Prometheus/Grafana?