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


(Patrick) #1

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.


#2

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


(Patrick) #3

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.


#4

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.


#5

I found this plugin in another post. Maybe it can be solved with that? The plugin also has an if-function (http://www.datasweet.fr/datasweet-formula/functions/if/) . I haven't tried it myself.


(system) #6

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