Grafana - Elasticsearch Altering metric counts

Is there any alternative for altering counts of metric count? Basically i want to derive other value from the value obtained from metric count

You can use your metric as a scripted field in script section (i.e. _value * 2)

Thanks Gretamosa for your response …

But there is no script option available for count metric.
I can find this script option for aggregate functions like sum,avg, min etc but no option available for count.

Could you please guide on it

Take a look at this link from grafana playground.

I was bad in not providing complete information.

I have an index in which every document represents a request. I want a metric that would show requests per second to measure how busy the site is.
Currently I have a count metric with query [@timestamp] which shows the amount of requests received.
When generating the graph by changing the time interval to 1 sec for duration longer than 1 hour graph is resulting to error but when the interval is >= 1 min graph works fine
Steps to reproduce:

  1. Log component --> Elasticsearch
  2. metric : count
    3.Group by : terms --> name
    4 .Then by : Date histogram --> timestamp --> interval = 1sec

Could you help in this regard…

Why don’t you group timestamp every minute, count with bucket scripts and divided by 60. Is not the best solution (more precise) but it is a solution. BTW check this query standalone in ES