What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Formelsensor / Factory Sensor to compare Info-Message

Votes:

0

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?

factory-sensor oid status-message

Created on Nov 25, 2022 10:43:26 AM



5 Replies

Votes:

0

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'

Sensor

Created on Nov 28, 2022 10:31:33 AM

Last change on Nov 29, 2022 9:00:53 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

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

Created on Nov 29, 2022 9:31:14 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

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?

Created on Nov 29, 2022 3:56:58 PM



Votes:

0

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

Created on Nov 30, 2022 11:27:01 AM by  Sebastian Kniege [Paessler Support]

Last change on Nov 30, 2022 11:28:16 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

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

Created on Dec 1, 2022 10:30:51 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.