Here's my generator.yml:
# QLogic Fiberchannel switches
fiberchannel:
walk:
- fcFxPortID
- fcFxPortC3InFrames
- fcFxPortC3OutFrames
- fcFxPortC3Discards
- fcFxPortLinkResetIns
- fcFxPortLinkResetOuts
lookups:
- source_indexes: [fcFeModuleIndex]
lookup: fcFeModuleName
I've done a full snmpwalk over the entire device, but didn't see anything
in the output that resembled any of the friendly names I assigned in the
switch config.
--Mike
On Friday, December 18, 2020 at 7:05:10 AM UTC-6 [email protected] wrote:
> Are you sure this isn't an issue with OctetString vs DIsplayString? Can
> you share your generator.yml?
>
> On Fri, Dec 18, 2020 at 1:58 PM Michael Thomas <[email protected]> wrote:
>
>> I need to perform a large number (~120) of metric label remappings in my
>> prometheus config. Right now I'm doing it with 120 entries that look like
>> these:
>>
>> - source_labels: [fcFeModuleName,fcFxPortIndex]
>> target_label: portName
>> regex: 0x100000C0DD18FE13;1
>> replacement: DeviceName
>> - source_labels: [fcFeModuleName,fcFxPortIndex]
>> target_label: portName
>> regex: 0x100000C0DD18FE13;2
>> replacement: AnotherDeviceName
>>
>> ...repeated for many different combinations of fcFeModuleName and
>> fcFxPortIndex. The regex that I'm using doesn't have any RE patterns in
>> it, so this mapping could be reduced to a simple non-regex map. I was
>> hoping I could do something a little more concise, like this:
>>
>> - source_labels: [fcFeModuleName,fcFxPortIndex]
>> target_label: portName
>> replacement_map:
>> "0x100000C0DD18FE13;1": DeviceName
>> "0x100000C0DD18FE13;2": AnotherDeviceName
>> "0x100000C0DD18FE13;3": andYetAnother
>>
>> Is something concise like this already possible, or should I file a RFE?
>>
>> I do note that if I were scraping an ethernet switch, I could use
>> portIndex+portName in my snmp_exporter to assign friendly names as labels
>> automatically. But my fiberchannel switch does not expose the friendly
>> names via snmp, thus the need to do the friendly name label assignment
>> individually in prometheus.
>>
>> --Mike
>>
>> --
>> 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/fbbde3aa-7c48-4a2c-9998-ecb6827f01b3n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/prometheus-users/fbbde3aa-7c48-4a2c-9998-ecb6827f01b3n%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/a45814c4-de4e-42a2-931b-d5c4526067f5n%40googlegroups.com.