resmoio / kubernetes-event-exporter

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

feat: support metrics of events matched #172

Open seethedoor opened 5 months ago

seethedoor commented 5 months ago

Now we have metrics of events_sent, which means total calculation of events sent from api-server and received by the event-exporter. But we don't have metrics to show how many events matched and sent to receivers we defined.

This PR supports metrics of events-matched metrics. It will create metrics named event_exporter_events_matched, and the matched rule name is given as a tag of the metrics. All the matched events will be calculated to different tags of the event_exporter_events_matched metrics. like this:

name property of rule can be defined, and if it is empty, the matched events will be calculated to the metrics with default name-tag.

issue: #169