So The BSSID is the constant and I want to know when the apCurrentNoise 
changes by -/+5 but only if I am connected to the same access point 
(BSSID). If the BSSID changes and the Noise level changes then its not as 
big of a deal. It's only if I am connected to the same BSSID and in a new 
polling interval the noise level changes. # HELP apCurrentNoise Background 
noise level (dBm) of the 802.11 device. - 
1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.21.6 # TYPE apCurrentNoise gauge 
apCurrentNoise -92 # HELP apSysStatBssid MAC address of the AP that the 
HPE501 is Associated to. - 1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.1.1.31.3 # TYPE 
apSysStatBssid gauge apSysStatBssid{apSysStatBssid="07:8B:67:FF:4F:35"} 1

On Thursday, March 6, 2025 at 1:35:22 PM UTC-5 Brian Candler wrote:

> If you can show complete examples of the metrics (the noise level one and 
> the one you want to correlate to, including all the labels) then it may be 
> possible to show you how to join them.
>
> On Thursday, 6 March 2025 at 15:43:25 UTC Matthew Koch wrote:
>
>> This is used to track how a wireless client is connected to a specific 
>> access point. What I am trying to determine is when a client has endured a 
>> significant amount of interference so when I read the noise level from the 
>> client I want to report when that metric has changed significant but I only 
>> want to do this if the mac address which is collected at the same time is 
>> unchanged. We need multiple readings to determine this so when I compare 
>> one point in the time series db to another I use the MAC address for 
>> comparison. the challenge is I cannot do this with the label. 
>>
>> On Wednesday, March 5, 2025 at 3:39:35 PM UTC-5 Brian Candler wrote:
>>
>>> Sorry, I don't understand - what sort of comparison do you want to do on 
>>> a MAC address?
>>>
>>> On Wednesday, 5 March 2025 at 19:23:09 UTC Matthew Koch wrote:
>>>
>>>> In Grafana I am trying to use the metric to do a comparison, but I 
>>>> cannot do it because it is a label and not a value. SNMP returns a value 
>>>> of 
>>>> 1 with the label 
>>>>
>>>> On Wednesday, March 5, 2025 at 12:56:42 PM UTC-5 Brian Candler wrote:
>>>>
>>>>> OK. I checked this. regex_extracts is only from when you want to 
>>>>> extract a metric *value* (i.e. a floating-point number) from text, for 
>>>>> some 
>>>>> dodgy MIBs which respond with things like temperature as a string value.
>>>>>
>>>>> Since you already have apSysStatBssid containing the MAC address as a 
>>>>> string label, what exactly do you want to do with it?
>>>>>
>>>>> On Wednesday, 5 March 2025 at 16:43:08 UTC Matthew Koch wrote:
>>>>>
>>>>>> I've tried the variety of Regex and still it doesn't return any data. 
>>>>>> It's interesting because nothing comes back in the output and it doesn't 
>>>>>> error as well.
>>>>>>
>>>>>> On Wednesday, March 5, 2025 at 3:57:22 AM UTC-5 Brian Candler wrote:
>>>>>>
>>>>>>> Start with regex: '(.*)'
>>>>>>>
>>>>>>> If that works, then you know it's just the regex at fault. I'd start 
>>>>>>> by trying to double-backslash, i.e.
>>>>>>>
>>>>>>> - regex: '([\\w]{2}:[\\w]{2}:[\\w]{2}:[\\w]{2}:[\\w]{2}:[\\w]{2})'
>>>>>>>
>>>>>>> The spec for Go's regex language (RE2) is here: 
>>>>>>> https://github.com/google/re2/wiki/syntax
>>>>>>>
>>>>>>> I'm not sure if a backslash character class is allowed inside a 
>>>>>>> square-bracket character class. So you could try:
>>>>>>>
>>>>>>> - regex: '((\\w){2}:(\\w){2}:(\\w){2}:(\\w){2}:(\\w){2}:(\\w){2})'
>>>>>>> - regex: 
>>>>>>> '([[:alnum:]]{2}:[[:alnum:]]{2}:[[:alnum:]]{2}:[[:alnum:]]{2}:[[:alnum:]]{2}:[[:alnum:]]{2})'
>>>>>>>
>>>>>>> or something simpler like:
>>>>>>>
>>>>>>> - regex: '([a-fA-F0-9:]{17})'
>>>>>>>
>>>>>>> On Tuesday, 4 March 2025 at 22:11:04 UTC Matthew Koch wrote:
>>>>>>>
>>>>>>>> I'm trying to extract the MAC address out of what is returned by 
>>>>>>>> SNMP exporter. The Regex I am using seems to work in general when I 
>>>>>>>> used an 
>>>>>>>> online Regex tester but for some reason it's not working in SNMP 
>>>>>>>> exporter.
>>>>>>>>
>>>>>>>> SNMPExporter config:
>>>>>>>>
>>>>>>>>     - name: apSysStatBssid
>>>>>>>>       oid: 1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.1.1.31.3
>>>>>>>>       type: PhysAddress48
>>>>>>>>       help: MAC address of the AP that the HPE501 is Associated to. 
>>>>>>>> - 1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.1.1.31.3
>>>>>>>>       regex_extracts:
>>>>>>>>         Test: 
>>>>>>>>           - regex: 
>>>>>>>> '([\w]{2}:[\w]{2}:[\w]{2}:[\w]{2}:[\w]{2}:[\w]{2})' 
>>>>>>>>             value: '$1'
>>>>>>>>
>>>>>>>> This is what I typically get data wise without the regex config:
>>>>>>>>
>>>>>>>> # HELP apSysStatBssid BSSID of currently connected accesspoint - 
>>>>>>>> 1.3.6.1.4.1.29456.3.2
>>>>>>>> # TYPE apSysStatBssid gauge
>>>>>>>> apSysStatBssid{apSysStatBssid="6A:56:E3:7A:85:47"} 1
>>>>>>>
>>>>>>>

-- 
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 visit 
https://groups.google.com/d/msgid/prometheus-users/4ac50730-9737-4eba-96f5-c91cb1972866n%40googlegroups.com.

Reply via email to