Hi all,
I need to compare Firmware-Versions of two identical devices. I can get to version of each device via SNMP IOD Sensors. I then created a facory sensor to compare the two values.
Unfortunaly, the OID Sensor gives me only one channel wiht the response time of the snmp request. The value oft the current version which I need to compare is oly given within the status message. This is not a channel, only a string beeing displayd as status message.
This sensor definition in the factory sensor gives me a table with the response times of the two IOD SNMP Sensors:
#1: lokal[Version] Channel(37848,0) #2: Master[Version] Channel(37835,0)
The source sensors have only sensory channel 0 (response time) and -4 (downtime).
Is there a way to compare the content of this info-string?
Article Comments
Hi Bernd,
Indeed this will be a little bit tricky to configure and PRTG's Sensor Factory Sensor is not suitable here. Assuming that you are currently using a SNMP Custom String Sensor pointing to a specific OID value, the current outcome is the expected functionality of the sensor. It displays a string OID value as sensor message. The given default channels "Downtime" and "Response Time" are default channels and it's not possible to map the string to a channel itself, because channels are designed to store numerical values.
Unfortunately, there is no native sensor that can be easily configured to match your specific requirements in comparing two strings with each other. The most reasonable approaches that come some close to a solution are described in the following thread and the best rated answer by my colleague Luciano.
Can I graph text values?
Best,
Sebastian
Nov, 2022 - Permalink
Hi Sebastian, thanks for your replay. I did get this working by extracting die numericvValue oft the string into a seperate channel as described in the link you provided. However, I'm a bit lost wirth the regex. I searched and tried a few things on regex101.com but I can only ectract the last 3 digits out of my string. I would prefer to extgract every number out of the string to get a more 'safe' compare.
My original string is something like:
osbiz_v3_R2.0.1_021
With the regex (\d) I should get 5 matches according to regex101- but in PRTG I do not. So the best I can do so far is
(\d+)$
that gives me 021 witch tranlates into
21
as numeric value.
That is not so bad, but I'd like to get something like
3201021
Is there a regex that would give me that in PRTG?
Nov, 2022 - Permalink
Hello Bernd,
I have to admit that I am no RegEx expert myself, but I made good experiences with the following website in combination with the mentioned regex101.
Use this to generate your RegEx query RegEx Generator
And verify it using RegEx101
Best,
Sebastian
Nov, 2022 - Permalink
Hi all,
I am still not able to get all digits. However, I was able to get
1.021
instead of only
21
That will have to do I guess. If somone has a better solution, please share it. My regex now looks like this
(\d)_(\d+)$
And I had also set '_' as the decimal seperator to get this working.
Thanks, Bernd
Dec, 2022 - Permalink
I need to compare the value 'osbiz_v3_R2.0 1_021' between 2 Devices with this same Custom SNMP Sensor named 'Sys Software Version'
Nov, 2022 - Permalink