The index for these metrics has two index components, so when doing lookups
you have to include both.
modules:
apc_cooling:
walk:
- coolingUnitStatusAnalogTable
lookups:
- source_indexes:
- coolingUnitTableIndex
- coolingUnitStatusAnalogTableIndex
lookup: coolingUnitStatusAnalogDescription
On Wed, Jul 15, 2020 at 11:34 AM Egor Vasilyev <
[email protected]> wrote:
> I use APC PowerNet MIB 4.2.6. My generator.yaml:
>
> modules:
> template_acrd_602:
> version: 3
> max_repetitions: 25
> retries: 3
> timeout: 30s
> walk:
> - coolingUnitStatusAnalogTableIndex
> - coolingUnitStatusAnalogDescription
> - coolingUnitStatusAnalogValue
>
>
> I try:
> # curl -sw '' '
> http://127.0.0.1:9116/snmp?module=template_acrd_602&target=hostname'
>
> And receive (the original output contains dozens of metrics, I shrank it):
> coolingUnitStatusAnalogDescription{coolingUnitStatusAnalogDescription="Air
> Filter Run Hrs",coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 1
> coolingUnitStatusAnalogTableIndex{coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 44
> coolingUnitStatusAnalogValue{coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 4472
>
>
> And it's ok. But if I add a lookup section into generator.yaml like this:
>
> modules:
> template_acrd_602:
> version: 3
> max_repetitions: 25
> retries: 3
> timeout: 30s
> walk:
> - coolingUnitStatusAnalogTableIndex
> - coolingUnitStatusAnalogDescription
> - coolingUnitStatusAnalogValue
> lookups:
> - source_indexes: [coolingUnitStatusAnalogTableIndex]
> lookup: coolingUnitStatusAnalogDescription
>
>
> I expect to receive an output something like this:
>
> coolingUnitStatusAnalogDescription{coolingUnitStatusAnalogDescription="Air
> Filter Run Hrs",coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 1
> coolingUnitStatusAnalogTableIndex{coolingUnitStatusAnalogDescription="Air
> Filter Run Hrs"coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 44
> coolingUnitStatusAnalogValue{coolingUnitStatusAnalogDescription="Air
> Filter Run Hrs"coolingUnitStatusAnalogTableIndex="44",
> coolingUnitTableIndex="1"} 4472
>
>
> But actually I receive:
> coolingUnitStatusAnalogDescription{coolingUnitStatusAnalogDescription="",
> coolingUnitStatusAnalogTableIndex="44",coolingUnitTableIndex="1"} 1
> coolingUnitStatusAnalogTableIndex{coolingUnitStatusAnalogDescription="",
> coolingUnitStatusAnalogTableIndex="44",coolingUnitTableIndex="1"} 44
> coolingUnitStatusAnalogValue{coolingUnitStatusAnalogDescription="",
> coolingUnitStatusAnalogTableIndex="44",coolingUnitTableIndex="1"} 4472
>
>
> What am I doing wrong? Help please. Thank you!
>
> OID description you could get on web site
> <https://cric.grenoble.cnrs.fr/Administrateurs/Outils/MIBS/?oid=coolingUnitStatusAnalogTableIndex>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/489060ca-6376-4f51-8d91-f7af8b72af2do%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/489060ca-6376-4f51-8d91-f7af8b72af2do%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/CABbyFmrCxJ3kiXb6BdpCU1u3j%2BLomwTFGxiHO41GujLM23GMSw%40mail.gmail.com.