Reputation: 2569
We are using Kibana 4 to display usage statistics for our tools by tagging log entries with a "stats" flag.
This allows us to show ie tool A was executed 15 times in the last 60 minutes. Now using this tool saves time ie for tool A it saves users 3 minutes.
So I would like to show in another graph how many minutes were saved ie we saved 45 minutes in the last 60 minutes to show the return on investment in realtime for a particular tool.
Is there anyway to do this in ElasticSearch or Kibana (ie have a calculated field which multiplies by a fixed value based on the specific tool)? It would be great if the answer would provide a dynamic way of doing this ie a calculated field rather then adding redundant information to millions of past and future records.
Thanks, Patrick
Upvotes: 7
Views: 15826
Reputation: 3294
Kibana 4 supports scripted fields. You can add calculated fields and use them in visualizations. Scripted fields use the Lucene expression syntax.
From Kibana documentation:
You can reference any single value numeric field in your expressions, for example:
doc['field_name'].value To create a scripted field:
Upvotes: 13
Reputation: 2854
Assuming you are using Kibana 3, you could store the time the tool saves in each log event.
{tool: "A", timeSaved: 3}
And then in Kibana you can use a histogram panel and use "total" for the chart values:
Upvotes: 1