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

Regex for Firmware Version

Votes:

0

i would like to read the firmware of our firewalls with regex. unfortunately i always get the error -9.9999999. the display of the firmware in the message is so v6.2.4,build1112,200511 (GA).

I would like to display the first 3 numbers in my sensor so 6.2.4, this I tried with this regex entry (\d+\.\d+.\d+) and the group 1.

regex sensor snmp

Created on Jan 11, 2021 8:41:02 AM

Last change on Jan 11, 2021 9:26:47 AM by  Florian Lesage [Paessler Support]



5 Replies

Votes:

0

Hello,

Thank you for your message.

I invite you to give it a try with the following regex: \d{1,2}\.\d{1,2}\.\d{1,3}

Kind regards.

Created on Jan 11, 2021 9:33:16 AM by  Florian Lesage [Paessler Support]



Votes:

0

Hi

tested the regex now, with the same result -9.99999999. i filled the fields as below.

Extract Number Using Regular Expression Extract a numeric value using a regular expression

Regular Expression \d{1,2}\.\d{1,2}\.\d{1,3}

Index of Capturing Group blank

Decimal Separator .

Thousands Separator .

Created on Jan 11, 2021 10:22:18 AM



Votes:

0

Thank you for the information, I understand what you would like to achieve now. However, in PRTG you can only monitor integer or float values and therefore, you can't get the version number (6.2.4) as a channel value.

With the SNMP Custom String sensor, you can still see the version displayed in the sensor message as indicated in the manual: https://www.paessler.com/manuals/prtg/snmp_custom_string_sensor.

If you have questions, let us know.

Regards.

Created on Jan 11, 2021 11:04:12 AM by  Florian Lesage [Paessler Support]



Votes:

0

Hi

but when i test the query with this regex i get the first two digits. why does it not work with the 3rd one?

Value: v6.2.4,build1112,200511 (GA)

(\d+\.\d+)

Sensor: 6.2

Created on Jan 11, 2021 11:14:34 AM



Votes:

0

It indeed works with 2 digits as it is considered as float value. However, the value 6.2.4 is neither an integer nor a float, and therefore can't be monitored (as channel value).

Regards.

Created on Jan 11, 2021 11:30:33 AM by  Florian Lesage [Paessler Support]

Last change on Jan 11, 2021 11:32:33 AM by  Florian Lesage [Paessler Support]




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.