Help to ignore/drop Index values #1359
Unanswered
kommuri-bharath
asked this question in
Q&A
Replies: 1 comment 5 replies
-
looking at the mib: do not remove the if you have further questions please try to format your text as good as you can |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
I am new to SNMP Exporter and still trying to learn on how to use the tool effectively. In this process, I would like your help on how to write the code to ignore a Index. For Ex:
HELP jnxIkeTunMonDPDDownCount The number of times that the remote peer is detected in a dead (or down) state. - 1.3.6.1.4.1.2636.3.52.1.1.2.1.27
TYPE jnxIkeTunMonDPDDownCount counter
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="16776278",jnxIkeTunMonRemoteGwAddr="169.254.198.25"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="20557681",jnxIkeTunMonRemoteGwAddr="125.19.241.146"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="20567738",jnxIkeTunMonRemoteGwAddr="114.143.226.250"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="20575658",jnxIkeTunMonRemoteGwAddr="197.159.210.99"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="20586429",jnxIkeTunMonRemoteGwAddr="159.148.32.10"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="20611667",jnxIkeTunMonRemoteGwAddr="62.119.80.113"} 0
From the above output I want to ignore the "jnxIkeTunMonIndex" and only receive "jnxIkeTunMonRemoteGwAddr" values in the output.
I wrote the code like below:
lookups:
- source_indexes: [jnxIkeTunMonRemoteGwAddr]
lookup: jnxIkeTunMonIndex
overrides:
jnxIkeTunMonIndex:
ignore: true
I am able to achieve what I wanted (at least not able vanish "jnxIkeTunMonIndex" values but able to get NULL values). But, I see there are two entries for jnxIkeTunMonRemoteGwAddr OID and when there is no value for "jnxIkeTunMonIndex".. these two entries are shown as duplicate and curl is throwing an error like below:
An error has occurred while serving metrics:
389 error(s) occurred:
Could someone please help me on either ONE of the below:
OR
Expected outputs are:
HELP jnxIkeTunMonDPDDownCount The number of times that the remote peer is detected in a dead (or down) state. - 1.3.6.1.4.1.2636.3.52.1.1.2.1.27
TYPE jnxIkeTunMonDPDDownCount counter
jnxIkeTunMonDPDDownCount{jnxIkeTunMonRemoteGwAddr="169.254.198.25"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonRemoteGwAddr="125.19.241.146"} 0
OR
** Should ignore the duplicate entries (actually they are not duplicate but when jnxIkeTunMonIndex is null they come as duplicate
HELP jnxIkeTunMonDPDDownCount The number of times that the remote peer is detected in a dead (or down) state. - 1.3.6.1.4.1.2636.3.52.1.1.2.1.27
TYPE jnxIkeTunMonDPDDownCount counter
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="",jnxIkeTunMonRemoteGwAddr="169.254.198.25"} 0
jnxIkeTunMonDPDDownCount{jnxIkeTunMonIndex="",jnxIkeTunMonRemoteGwAddr="169.254.198.25"} 0
Thanks in advance !!
Beta Was this translation helpful? Give feedback.
All reactions