Hi coronetfoca,
I hope I got your question right, but this should give you a point to start:
| gentimes start=-1
| eval foo="\"id=\"39\" = 00\", \"id=\"39\" = 01\"", _time=now()
| rex max_match=0 field=foo "\"id=\"39\"\s=\s(?<myFoo>[^\"]+)\""
| mvexpand myFoo
| eval approved=if(myFoo="00",1,null()), not-approved=if(myFoo>"00",1,null())
| chart count(approved) AS approved count(not-approved) AS not-approved by _time
This will give you an example and the important lines are the two last ones, lines 1-4 are only used to produce fake events.
So what happens here:
| gentimes start=-1
will create a dummy event
| eval foo="\"id=\"39\" = 00\", \"id=\"39\" = 01\"", _time=now()
evals foo and _time
| rex max_match=0 field=foo "\"id=\"39\"\s=\s(?<myFoo>[^\"]+)\""
using regex we get the value you need into a field called myFoo
| mvexpand myFoo
expands the multivalue field into single value field
| eval approved=if(myFoo="00",1,null()), not-approved=if(myFoo>"00",1,null())
checking if the value of myFoo matches an approved or a not-approved
| chart count(approved) AS approved count(not-approved) AS not-approved by _time
charting it by time
Just adapt it to your needs with the historical counts.
Hope this helps ...
cheers, MuS
... View more