we are trying to export csv/Json for average CPU usage for last 30 days (with data granularity "Hourly") using Cloudera manager and used following query:-
SELECT cpu_percent_across_hosts WHERE entityName = "1" AND category = CLUSTER
1. is this correct query/parameter to pull average cpu usage for cluster? if not, please suggest on how can we get this data.
2. If answer to question 1 is yes, challenge is, If we take data for last 30 days, we do not get granularity lesser than 6 hours but if we select last 7 days, we get data grouped by 1 hour (which we need). can we do something about this?
Yes your query to get the cluster CPU usage is correct.
Regarding the Data Granularity, in the chart builder you can select Show Additional Options next to 30d in the time frame. In the Additional Options you can select the granularity to be Hourly.
Kindly let me know if this is what you are looking for.