Open arvindkonar opened 4 years ago
I'm nowhere near capable in my elite golang skills (literally zero) to code this, but maybe I can provide some insight, as I'm having the same issue:
non-SRX devices, or example EX/QFX switches have the following structure for xml:
> show chassis routing-engine | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.4R2/junos">
<route-engine-information xmlns="http://xml.juniper.net/junos/18.4R2/junos-chassis">
<route-engine>
<slot>0</slot>
<mastership-state>backup</mastership-state>
<status>OK</status>
</route-engine>
<route-engine>
<slot>1</slot>
<mastership-state>master</mastership-state>
<status>OK</status>
</route-engine>
However, clustered SRX devices have the following structure:
> show chassis routing-engine | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos">
<multi-routing-engine-results>
<multi-routing-engine-item>
<re-name>node0</re-name>
<route-engine-information xmlns="http://xml.juniper.net/junos/18.2R3/junos-chassis">
<route-engine>
<status>OK</status>
</route-engine>
</route-engine-information>
</multi-routing-engine-item>
<multi-routing-engine-item>
<re-name>node1</re-name>
<route-engine-information xmlns="http://xml.juniper.net/junos/18.2R3/junos-chassis">
<route-engine>
<status>OK</status>
</multi-routing-engine-item>
I think the problem stems from the difference in structure - i.e. route-engine[slotid]
vs multi-routing-engine[route-engine][nodeid]
I hope that is helpful information..
The same is true for ipsec
module.
I've "fixed" it here, plus adding extra metric, but not confident of the solution as it seems to break non-multi-routing-engine equipment. There's probably a way to first try unmarshalling using the multi-routing-engine struct and fallback to the non-multi-routing-engine one, but not confident in my Go-work-with-yaml-fu
Hi, I just added a clustered srx and I see metrics like interfaces,alarm,bgp,ldp, routes but I don't find any firewall metrics. I do see the collector enabled as shown below in metrics.
junos_collect_duration_seconds{collector="Firewall",target="xyx-fw-1"} 0.311696644
The logs don't show any errors.
Here is my config.yml