Splunk Search

How to generate a chart that will display counts of distinct values by build?

Path Finder

We are trying to do some charting that requires counts of distinct values per build.

input would be

build|result
121   fail
121   pass
121   fail
77    pass
77    fail

in my chart I basically want

build 121 2 fails/1 pass and build 77 1 fail/1 pass

I thought it was a streamstats command followed by an accum command but I can't get it to work. I can get it to count the values per build, but not once I need to separate all the results out.

0 Karma
1 Solution

Legend

Try this

... | chart count over build by result

View solution in original post

0 Karma

Legend

Try this

... | chart count over build by result

View solution in original post

0 Karma

Path Finder

this is perfect.

0 Karma

Champion

maybe something like

... | stats count(eval(result="fail")) as fail_count count(eval(result="pass")) as pass_count by build

Path Finder

stats count(result) by build gives the total number of tests run, but I want how many passed and failed for each build.

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!