Timelion graph

Good day,

I am confused on how timelion compiles its graphs when it comes to weekly and monthy aggregation. I have created a graph that uses the sum of the cpus allocated by the user.
here is the timelion syntax:
.es(index=hpc metric=sum:CPUS q=running).fit(nearest).lines(fill=1).lines(stack=true).label(label=Running) .subtract(.value(value=2304),.es(index=hpc metric=sum:CPUS q=running).fit(nearest)).label(label=Idle).lines(stack=true, fill=1)

This works if I want to show the real time allocations. however, when I try to see the weekly and monthly allocations, it shows the sum of the past day which shows cpu allocations above the available cpus of the cluster

Is there a proper way of querying to timelion?

Thanks in advance
Christian

Hi Christian, which version of Kibana is this? Your expression has a few syntax problems that gave me errors when I tried with 6.0.

Was there anything changed in the expression between screenshots?

If you want to see weekly and monthly rollups, the way to do that is to change the bucket size in the time graph. The bucket size dropdown is set to "auto" in both of your screenshots, so that might be somewhere to start.

Good day,
I am using kibana 5.5.1.

Thanks for the tip on the buckets. I think I have solved the problem
On my Timelion syntax I added the interval=4m to solve the issue because I configured mine to collect data every 4 mins
although I am not sure how this affects the overall results but it seems to show the correct graphs that I want to see.

Here is the new timelion syntax

.es(index=hpc metric=sum:CPUS q=running interval=4m).fit(nearest).lines(fill=1).lines(stack=true).label(label=Running)  .subtract(.value(value=2304),.es(index=hpc metric=sum:CPUS q=running interval=4m).fit(nearest)).label(label=Idle).lines(stack=true, fill=1)

Here is the resulting graph

Please do tell me if what I did is wrong. I have yet to confirm the accuracy of the graphs shown.

Thanks
Christian

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