aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
213 stars 68 forks source link

Not able to use ocprometheus with multiple targets #30

Open aned opened 6 years ago

aned commented 6 years ago

It doesn't make much sense to run the bellow command for every Arista sw on my network: ./ocprometheus -addr 10.1.1.1:6042 -listenaddr :8080 -username blah -password blah -config sampleconfig.yml ./ocprometheus -addr 10.1.1.2:6042 -listenaddr :8080 -username blah -password blah -config sampleconfig.yml ...

-addr needs to support a list of targets in order to make this exporter worthwhile.

wladh commented 5 years ago

Thanks for the report. It seems we lost this ability when we moved to gNMI client. We should rectify it.

aned commented 5 years ago

It should be similar to prometheus's snmp_exporter, where we pass a target as a parameter, such as localhost:9116/snmp?module=vendor-specific-module&target=10.110.10.1 This way we'd run one ocprometheus process and scrape multiple arista targets. It's much harder to do the opposite - run ocprometheus on every arista box or run one ocprometheus process per arista box on a server and than scrape localhost:listenaddr/metrics