I have an xml page that I have a monitoring system scanning, here is the source data:
`<queues>
<queue name="workQueue">
<stats size="0" consumerCount="28" enqueueCount="29320" dequeueCount="37000"/>
And here is the code I have so far:
local pattern = " size=(%d+) "
local a = alarm.get("CO13974960-19518")
local vsize = string.match(a.message, pattern)
local sum = vsize
I'm trying to target this bit of data from the XML page:
stats size="0"
The value "0" is the number I am interested in, and I'm looking for a way to capture that figure (no matter what it reaches) via the script.
I think my script is looking for:
size=0
rather than size="0"
But I'm unsure on the correct syntax on how to do this.
local pattern = " size=\"(%d+)\" "
– Beggarweed