Hi,
this is a common problem, since splunk does not return any event, if "nothing" happend, which is in your case a failure.
You can implement a workaround if you do have a fixed, static amount of jobNames you want to report on, as it looks like in your search.
For example, at the end of your search add dummy events for every jobName like | append [|makeresults | eval jobName ="A" | latestStatus = "Dummy"] in your search. Then you count with streamstats by jobName. If there is a result from the index the count will be 2 (since the real event + dummy event = 2). If there is no event in the index, the count is 1 (since only the dummy event is left).
From there on, you can manipulate the results with a little bit of eval and if logic to get your desired result.
The exact solution depends on your events and results. But it is a way to work around the problem.
Greetings
Tom
... View more