Kibana visualization for total count of Jenkins jobs currently passing/failing

This question is regarding Jenkins, the use of their logstash plugin to send build logs to elasticsearch and how to get the current state of all jobs. For example, let's say there are 10 jobs. I'd like to generate a graph to show how many of those are currently failing/passing. I found a way to create a data table that shows the current state of each job (success/failure). However, I can't figure out how to get a total count of how many jobs are currently passing and how many are currently failing. For example, get an output that counts up the total number of success, let's say 7 and total number of fails, let's say 3 and outputs that onto a graph.

If I understand you correctly, you want to get the most current status of the jobs and then categorize and count them by state.

That is correct. I currently have two metrics. One is max @timestamp. The other is a top hit on data.result.keyword. I then have a terms bucket on data.projectname.keyword. This gives me a data table showing the current state of all jobs in a list. I can't figure out how to produce an overall count though.

I had pretty much the same question two years ago. Unfortunately, I never got an answer. Perhaps there is now a solution that I do not yet know.

Hopefully someone else knows advice, or can say why that is not possible.

I found this plugin in another post. Maybe it can be solved with that? The plugin also has an if-function ( . I haven't tried it myself.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.