I want to display the alert message that contains the information of each CPU load usage (from multiple CPU cores) in a single node instead of average CPU load usage.
The answer is definitely yes, though offhand I'm not sure if an easy way to do it. Hopefully there's a obscure macro. Else it's a select x where x is cores then dump it into a FOR XML PATH or similar.
yaeh sure.i am using your concept but tried it with SQL query.below one will display max cpu load and its corresponding index.
Thank you so much.Do you mean whether we can try it via SQL/SWQL in alert message itself?
Actually, I researched a lot. I am totally blank now. Any small help would be greatly appreciated.
Had a quick swing at itIs this the sort of output you're after? The column i've cut off is the device name, you could probably drop the frequency, so the middle 2 columns are I guess what you'd be after?Doesnt feel super useful to me but could be in your environment. A MAX of the Maxload column would be easier to work withThis was produced with a query like this
select TOP 100 n.Caption, n.CPUMultiLoadHistory.CPUIndex, n.CPUMultiLoadHistory.MaxLoad, n.CPUMultiLoadHistory.ObservationTimestampfrom orion.nodes N where n.Caption = 'TARGET'-- and n.CPUMultiLoadHistory.ObservationTimestamp = 'TIMESTAMP'ORDER BY n.CPUMultiLoadHistory.ObservationTimestamp desc
So there's a few bits left to work out before putting that in an email, assuming you still want it1) You dont really want to use the TOP 100 the way I am here, you want to select all given other specifics, then maybe bound with a TOP for safety.2) Make a macro in a test action, put this in, and replace specifics with variables that produce those specifics given a node ID or whatever3) You'll know it "kinda works" when if you substitute in the submacros in SWQL studio it produces the correct output, but when you do it in the action it gives you the top left cell4) once it kinda works, you then save that as a macro, and put that in a SQL macro, using the FOR XML PATH verb to squish it into one cell5) once that kinda works, you probably need to use a subquery and REPLACE to make it readable, else make the rest of a XML table to put it inNot that easy as you can probably tell
I really appreciate it. Thank you.To show an alert message, the result shown above is sufficient.Let me give it a go, and I'll let you know soon.
Thank you so much.
i have completed my task.Your support means a lot to me. Thank you.