I have log coming in this format. this value is dynamic and keep changing in terms of Form and numbers
Counts=[100A=0,100B=1,100C=2,100D=1,100E=3]
I want to first calculate how many form I have collected in this example
FormCount=5
I want to calculate Total Form calculated
FormTotal=7
Please let me know
Append this to your search:
... | rex "Counts=\[(?<Counts>[^\]]+)\]" | eval Counts = replace(Counts, "\w+=", "") | makemv Counts delim="," | eval FormCount = mvcount(Counts) | streamstats count as eventnum | eventstats sum(Counts) as FormTotal by eventnum