Productivity vs Target in Kibana - how?

(Borislav Ankov) #1


I have to produce a dashboard containing a number of visualizations related to productivity vs. target and I literally have no idea if this is possible and how to do it. One idea I had was using the scripted fields and Painless but so far I haven't had any luck there either.

Here's a sample document taken directly from the Discover tab:

"_index": "ts_logs_approved",
"_type": "log",
"_id": "562893",
"_version": 1,
"_score": null,
"_source": {
"quantity": 400,
"time_type": "regular",
"activity": "Digitization & conversion",
"poductivity": 109.0909090909091,
"referral_date": "2017-06-05T21:00:00.000Z",
"project": "Project1",
"weight": 342.85714285714283,
"language": "English",
"service_line": "Service line1",
"approved_timestamp": "2017-06-07T06:48:59.940Z",
"target": 70,
"profile_name": "Profile1",
"unit": "TXT",
"@timestamp": "2017-06-29T12:40:37.572Z",
"pvst": 155.84415584415584,
"profile_id": 1522,
"activity_type": "productive",
"approved_work_activity_id": 562893,
"min_target": 60,
"@version": "1",
"client": "Client1",
"time_spend": 220
"fields": {
"referral_date": [
"approved_timestamp": [
"@timestamp": [
"highlight": {
"activity_type": [
"sort": [

There are a couple of fields of interest here, here's the breakdown:

  • quantity - a number of produced units
  • Client - pretty self-explanatory
  • Project - same
  • Language - same
  • Service line - basically used to group projects relating to the same client together
  • activity - can be productive activities such as writing, editing stuff, basically stuff that is delivered to clients or non-productive such as project management, trainings, etc.
  • time_spend - the number of time it took in minutes for the specified activity.

Here's the thing, there are thousands of these and I have to be able to produce a visualization that would take a given period and sum all of the time_spend and quantity for a specific activity, unit, language, etc and then it would compare it with the actual target levels.

So for example, if I have unit1 which is targeted at 10 units per hour, but the user only submitted 8 units per hour for 1 hour, I would need to be able to visualize this using the weighted average between all logs.

Is it possible at all to do this?

Please let me know if I need to submit any more info to make it clearer.

Thanks in advance!

(Brandon Kobel) #2

@bat_boro aggregating these documents based on "activity, unit, language" would be rather easy using a Terms aggregation. You could then use the Gauge/Goal visualization in Kibana 5.5 to compare them against the targets.

(Borislav Ankov) #3

Hi Brandon,

Thank you very much for this, seems I've missed the Gauge/Goal visualization completely. This sounds like it might definitely work!


(Brandon Kobel) #4

@bar_boro that's great! They were just introduced, and the documentation for them in still lacking, but hopefully they will get you what you're looking for!

(system) #5

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