Will influxDB allow series sorting based on some metric

#1

HI,
I would like to et top 10 windows process having maximum cpu and memory usage. Do we have such input plugin in telegraf and does influxdb allows series sorting based on some metric?

Thanks,
Yashoda

#2

There is not a way to collect the top processes in Telegraf, you will need to select which processes you wish to monitor manually. In InfluxDB, I believe you can use the top function to select from the processes you have already gathered.

#3

HI,
Thanks for your response. Does telegraf has windows input plugin that gets the name of the process running in the windows machine and the cpu usage utilize by that process?

#4

You can use the win_perf_counters plugin for this, here is an example of using of monitoring a process.

#5

HI I tried using the top function with the below query

SELECT top("Percent_Processor_Time", host,3)
FROM "win_cpu"
WHERE "host" =~ /^$server$/ AND $timeFilter
GROUP BY time(5m)

to select top 3 hosts which has highest % processor time from win_cpu measurement but it gives around 13 results and the values are not sorted. Expected : 3 top servers with their % processor time value in descending order. Could you please suggest is this the bug or I miss something in the query .

#6

I probably told you the wrong way to query it, @michael Can you help us out here?

#7

@yashoda can you include what you got back and what you expected to get back?

I think the issue might be the GROUP BY time(5m). You could try getting rid of it and just doing

SELECT top("Percent_Processor_Time", host,3)
FROM "win_cpu"
WHERE "host" =~ /^$server$/ AND $timeFilter

That should give you back the top 3 values for the "Percent_Processor_Time" field.

#8

HI Michael,
Many thanks for your suggestion. Now I can see the required number of values but the values for
Percent_Processor_Time are still not sorted. Is it possible to get the values in descending order ?

Thanks!

#9

Time decending or value decending?

#10

It should be value descending

#11

HI MIchael,
My requirement is how to sort the values for Percent_Processor_Time .
Thanks!

#12

Can you supply what you get and and you want.