greenpau / ovn_exporter

Prometheus Exporter for Open Virtual Network (OVN)
Apache License 2.0
21 stars 18 forks source link

ovn_exporter seems to ignore command line arguments #2

Closed mnasiadka closed 3 years ago

mnasiadka commented 3 years ago

I'm unable to tell ovn_exporter to use a different path for remote sockets:

# /opt/ovn-exporter/ovn-exporter -database.northbound.socket.remote unix:/run/ovn/ovnnb_db.sock -log.level debug
INFO[0000] Starting ovn-exporter (version=1.0.0, branch=master, revision=v1.0.0-2-g64b08bc)  source="ovn_exporter.go:1083"
INFO[0000] Build context (go=go1.10.2, user=greenpau, date=2018-09-22)  source="ovn_exporter.go:1084"
DEBU[0000] unknown: NewExporter() calls Connect()        source="ovn_exporter.go:288"
ERRO[0000] ovn-exporter failed to init properly: [failed connecting to OVN_Northbound via unix:/run/openvswitch/ovnnb_db.sock: dial unix /run/openvswitch/ovnnb_db.sock: connect: no such file or directory failed connecting to OVN_Southbound via unix:/run/openvswitch/ovnsb_db.sock: dial unix /run/openvswitch/ovnsb_db.sock: connect: no such file or directory]  source="ovn_exporter.go:1088"
INFO[0000] OVS system-id: unknown                        source="ovn_exporter.go:1126"
INFO[0000] Listening on :9476                            source="ovn_exporter.go:1141"
greenpau commented 3 years ago

@mnasiadka , try using v1.0.1.

Please review the code starting from here https://github.com/greenpau/ovn_exporter/blob/80d5c8865e1a3b229758074582e2f243106814a5/cmd/ovn_exporter/main.go#L139 and try finding where the break is.

greenpau commented 3 years ago

@mnasiadka , might need to look at https://github.com/greenpau/ovsdb too.

greenpau commented 3 years ago

This is now a part of v1.0.2.