Open captncraig opened 10 months ago
I like the idea.
What would be the pros/cons between this component pushing metrics to another component, and it exposing a metrics endpoint to be collected from another component?
Honestly, I hadn't considered exposing our own metrics endpoint. It is a good idea, since I'm not entirely sure of the apis required to push metrics.
It is probably simpler to think of this more like an exporter now that I think about it.
How do you feel about naming in that case?
Good question. prometheus.exporter.custom
?
Background
In some cases, it may be desirable to create metrics without any external source. A few possible scenarios include:
Currently, the k8s-monitoring helm chart is creating some static files and using textfile collector to scrape them. I'd like to eliminate some moving pieces there.
Proposal
A new component:
prometheus.static_metrics
(accepting better names).The interface is fairly simple. Given some number of receivers, it synthesizes metrics every interval, and forwards them to the requested backend.
Option 2: Pull metrics
WE could just host our own registry with a metrics endpoint and pull it like any other exporter by exporting a static target.
That would eliminate the forward_to and interval arguments.