vaerh / mikrotik-prom-exporter

0 stars 0 forks source link

Add router_name, router_id to all lablels #5

Open jlpedrosa opened 5 months ago

jlpedrosa commented 5 months ago

Probably this can be done automatically by using the api and getting some values from /system on startup and propagate it for all the metrics. Optionally we can add an arg|envVar to the binary to allow overrides?

vaerh commented 5 months ago

If we assume containerization as the main use case, we'd better use environment variables. The second variant is a YAML file.

jlpedrosa commented 5 months ago

I was thinking that fetching the router name from startup is even simpler. The cli utils that I usually use urfave

https://cli.urfave.org/v2/examples/flags/#values-from-the-environment

vaerh commented 5 months ago

I used it in one of my projects. Why not? But the original question remains: one container, one router? Or do we serve multiple routers with one exporter?

I also remembered another problem: we need to limit the RPS to reasonable limits, but the architecture doesn't allow that yet.

jlpedrosa commented 5 months ago

Ah! I understood that the label for the router was missing only. From blast radius perspective and ease of management I'd go for 1 deployment per 1 router.

Also I think it'd simplify if people want to do label re-writing....

vaerh commented 5 months ago

Ok, it's even easier!