Like other folks I've seen here, I have a need to parse MIB text data into other text data. A simple example is a text OID that contains both a model and firmware information, that you want to poll into two separate -- and more useful -- items. Unfortunately, while the UnDP 'Parse(' function *could* do this, it's currently limited to allow only number ('\d') parsing from the text. I kept hitting my head on that, as the parse function help text doesn't explain that too clearly (maybe it's just me). So I'd like to request two things from SolarWinds:
Firstly, please add one line to the end of the parse function help text stating that you've disabled regex for all other search types other than '\d'.
A line like "Currently only numbers using the regex class '\d' can be pulled from source text. No other regex classes are enabled." would be very helpful until the situation changes.
Secondly, PLEASE enable the other regex matching classes!
If you'd let '\w', '\s', '[chars|a-z]', and '(phrase)' be allowed, it would mean I could write the UnDP pollers I need.
You could create common text functions like LEFT(), RIGHT(), and MID(), but regex gives us all that already... so hey.
Here's an example. I have this:
.1.3.6.1.2.1.1.1.0 = STRING: DX0D 8.0_305
as a poller named "Wyse_ModelFW"
[waves to the other Wyse users in the audience]
where the model number and firmware are separated by 1+ spaces.
if parse() allowed string matching, I could create pollers something like this:
Wyse_Model = parse((?<result>\w+), {Wyse_ModelFW})
Wyse_Firmware = parse(.+\s+(?<result>\w+), {Wyse_ModelFW})
Transforming text to one form from text in another form is important: whether you're slicing out substrings or doing transforms ("20141107" => "2014-11-07") there's always a need to get to the data you're looking for. SolarWinds has already given use some great ways to get at (and transform) numeric data, but how soon will it be before we can do the similar things with textual data?
Thanks,
Curtis