I have a log file containing a series of jobs along with start and end time for each job. I have parsed the log file using logstash and converted the start and end times into timestamp fields. In order to calculate the time for each job, I created a scripted field named job_time defined as:
doc['end_time'].value - doc['start_time'].value
I need to create a bar graph with job_name and job_time as the axes. The vertical bar chart in Kibana's visualize tab only provides aggregate operations like count, sum, average as the Y-axis. I am unable to set job_time as the Y-axis. Could you please help me out?
I think the closest that you're going to get is having the job_name on the x-axis and the job_time on the y-axis. However, you'll have to choose an aggregation to use for the y-axis. It might be beneficial for us to take a step back, as I'm not sure if this is going to give you exactly what you're looking for.
So, you have jobs that are running that have a job_name and a job_time, are you looking to get an entire history of the jobs running and their time, or are you looking for an average/sum of the job_time?
Each job has a set of sub jobs, each of which may again have a set of sub jobs. I'm looking to get the entire history of jobs running such that I can drill down or roll up to different jobs on different levels to get the the corresponding job times on the various levels.