Can anyone help me with query to fetch CPU peak % (last 2 hours) for any specified database node either from DPA reporting database or are any APIs available to fetch this information.
Hi @shantanu167 , here is a custom query that should do something close to what you're looking for: (+) Resource Metric Report (Min, Max, Avg) - Custom Queries - Database Performance Analyzer - THWACK. As mentioned in the script, the CON_METRICS_TEN_MINUTE_X, CON_METRICS_HOUR_X, and CON_METRICS_DAY_X tables offer various summary data based on specific requirements.
I'm not a DBA so I can't really advise. Have you tried ChatGPT or Grok?
Thank you @darichar . Appreciate your help!
I have an additional query to fetch the Blocked Sessions by a minute interval. I could get the Blocked Sessions by 10 minute interval from table CON_METRICS_TEN_MINUTE_X but I want to report only those blocked sessions which lasted more than 5 minutes.
By default, DPA collects the amount of total time for blocking, but you will not find blockers that lasted more than 5 min. I would suggest setting up this custom alert (+) Sessions Blocking for More Than X Minutes - Custom Alerts - Database Performance Analyzer - THWACK. It will notify you when a session has blocked for more than 5 min, and then we can run reports against the results of this alert to see how often and when it happens.