This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

CPU monitoring

I have been tasked with trying to find a way to report/alert on a specific CPU situation. We are looking to report on devices that have had the same % CPU usage for a specific period of time. For example a server that has had a consistent CPU usage of 28% for the last 48 hours. Is there any way to do this in Orion?

Parents
  • Here is a possible starting point:

    SELECT
        nc.NodeID,
        nc.AvgLoad,
        nc.ObservationCount
    FROM (
        -- Get counts grouped just by node.
        SELECT
            NodeID,
            COUNT(*) AS ObservationCount
        FROM Orion.CPULoad
        WHERE ObservationTimestamp > ADDDAY(-2, GETUTCDATE())
        GROUP BY NodeID
    ) AS n
    INNER JOIN (
        -- Get counts grouped by the combination of node and average load.
        SELECT
            NodeID,
            AvgLoad,
            COUNT(*) AS ObservationCount
        FROM Orion.CPULoad
        WHERE ObservationTimestamp > ADDDAY(-2, GETUTCDATE())
        GROUP BY NodeID, AvgLoad
    ) AS nc
        -- Match on NodeID and count.  When the counts match, there aren't any other
        -- average load measurements for this node in the last two days.
        ON nc.NodeID = n.NodeID
        AND nc.ObservationCount = n.ObservationCount
    -- To avoid noise, you might want a minimum number of observations to avoid reporting new nodes, etc.
    WHERE nc.ObservationCount > 5
  • Thank you for this input. I am going to give this a shot when I have a moment.

Reply Children
No Data