Will influxDB allow series sorting based on some metric

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

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.

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?

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

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 .

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

@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.

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!

Time decending or value decending?

It should be value descending

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

Can you supply what you get and and you want.

I have some fields named as sales and now I want top 5 highest sales record.But here group by is not working and I am not getting proper syntax for sort function.