Open mmanjos opened 2 years ago
I think the issue might be at ipsec/collector.go:57 where the new code doesn't call prometheus.MustNewConstMetric in the case that it's a single-RE
Ah, I see now how it's building the MultiRoutingEngineResults struct at line 113 in either case (multi or single)
Strange - I've stepped through the code a few times and even replaced my router's XML output (above) into the rpc_test for single RE (which passes) but the exporter output still has no active tunnels
and just to confirm, in these test cases, the binary is being run with the following flags (so that ipsec is enabled):
junos_exporter -ssh.user=monitoring-ro -ssh.targets=router -web.listen-address=127.0.0.1:9326 -ssh.keyfile=/tmp/keyfile -ipsec.enabled=true -debug
And the monitoring-ro user has [ view security ] permissions (for ipsec tunnels)
Version: 0.9.11 i have this problem too
@valerarar not yet, unfortunately. I might take another look at it this week with fresh eyes, but back when I reported the issue, I couldn't see what was wrong in the code
I've just been using the build from revision https://github.com/czerwonk/junos_exporter/commit/af9cfdc2b065e202fe12b08cd535016b847e7de7 ever since reporting and it's been working fine for me. It'd be nice to find out what the issue in the multi-RE code is though
I think that this PR https://github.com/czerwonk/junos_exporter/pull/127 might have broken ipsec security-association metrics for single routing engine platforms. I'll try to fiddle with the code, but it's not my strong suit.
Here's what I get back from my router using
-debug
mode:Using the latest build from 042c6f235bf79f53d68c996c851da416cc67bf61 , I get no junos_ipsec_security_associations_state values back from my router:
However, reverting back to 0.9.8 at af9cfdc2b065e202fe12b08cd535016b847e7de7 before the PR mentioned above, it looks like ipsec metrics were working back then: