Hi all,
I'm pretty new to Zabbix and regex, so I hope this doesn't come off as being just stupid.
I have dug around on here, but haven't found what I need.
I have a string from a log file (that's showing up just fine)
I'm trying to set up graphing for this, which means I need to switch these to a int/float - Fine and dandy.
I've cloned the item, and already filtered the log (it has other stuff in too) to give just the line info above. Now, I want to strip out the whole line, except for the last 2 characters, the actual temp.
However, the best I've been able to do so far is create the regex to give me everything BUT those last 2 characters, with
giving me the output of "4837 2020-09-16 19:07:54.178560 Temp at Sensor 1 in Box 1 is"
I fiddled with the trim options too, and was happily able to delete the characters 2 and 9 from the end.
I can't use too much of a fixed string either, as there multiple sensors in multiple boxes, and I'm trying to parse them out so I can create a pretty graph that details them all.
Any suggestions would be appreciated.
Thank you!
I'm pretty new to Zabbix and regex, so I hope this doesn't come off as being just stupid.
I have dug around on here, but haven't found what I need.
I have a string from a log file (that's showing up just fine)
Line: 7306 2020-09-16 20:58:07.722849 Temp at Sensor 1 in Box 1 is 29
I've cloned the item, and already filtered the log (it has other stuff in too) to give just the line info above. Now, I want to strip out the whole line, except for the last 2 characters, the actual temp.
However, the best I've been able to do so far is create the regex to give me everything BUT those last 2 characters, with
^([\s\S]*)is
I fiddled with the trim options too, and was happily able to delete the characters 2 and 9 from the end.
I can't use too much of a fixed string either, as there multiple sensors in multiple boxes, and I'm trying to parse them out so I can create a pretty graph that details them all.
Any suggestions would be appreciated.

Thank you!
Comment