cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

How to alert on a node that isn't monitoring the "CPU & Memory" resource

Jump to solution

I've recently taken over monitoring responsibilities and I've noticed some of our Linux machines are not collecting CPU and memory data/statistics (when I "list resources" I see the "CPU and memory" checkbox is unchecked).  How can I configure an alert for this?  I've been hacking away at the "trigger condition" but can't seem to find a condition that will notify me when a particular metric/resource is not being collected.

0 Kudos
1 Solution

I'm going to discourage you from building this as an alert, just because every place I have ever seen someone set this kind of info up in an alert they get annoyed by all the short term blips and spam it generates. 

 

You are much better off using a report to spot check these periodically, on my admin dashboard I have a Custom Query widget similar to this one that lets me know about any nodes where the cpu poller is turned off.  The only place it can get a bit iffy is when there are multiple custom CPU pollers that a device matches against, because the default ones will show as being off when the custom one is on.

mesverrum_0-1585333062720.png

 

 

 

select distinct n.Caption, n.detailsurl as [_linkfor_Caption], n.machinetype  
,'List' AS [Resources]  
,'/Orion/Nodes/ListResources.aspx?Nodes=' + ToString(n.NodeID) AS [_LinkFor_Resources]  
,'/Orion/images/nodemgmt_art/icons/icon_list.gif' as [_IconFor_Resources]  
, case when cpu.pollertype is null then 'N/A'  
else cpu.pollertype   
end as [CPU and Memory] 
,cpu.enabled as [Enabled]
,case when cpu.enabled='true' THEN '\NetPerfMon\images\Small-Green.gif'  
when cpu.enabled='False' THEN '\NetPerfMon\images\Small-Red.gif'  
when cpu.enabled is null THEN '\NetPerfMon\images\Small-Shutdown.gif'  
end as [_iconfor_CPU and Memory]  

from orion.Nodes n  
left join Orion.Pollers [cpu] on n.NodeID=cpu.NetObjectID and CPU.PollerType like 'n.cpu%'  
  
where cpu.Enabled is not null
--and n.caption like '%${SEARCH_STRING}%'
order by n.caption

 

 

- Marc Netterfield, Github

View solution in original post

0 Kudos
6 Replies

I'm going to discourage you from building this as an alert, just because every place I have ever seen someone set this kind of info up in an alert they get annoyed by all the short term blips and spam it generates. 

 

You are much better off using a report to spot check these periodically, on my admin dashboard I have a Custom Query widget similar to this one that lets me know about any nodes where the cpu poller is turned off.  The only place it can get a bit iffy is when there are multiple custom CPU pollers that a device matches against, because the default ones will show as being off when the custom one is on.

mesverrum_0-1585333062720.png

 

 

 

select distinct n.Caption, n.detailsurl as [_linkfor_Caption], n.machinetype  
,'List' AS [Resources]  
,'/Orion/Nodes/ListResources.aspx?Nodes=' + ToString(n.NodeID) AS [_LinkFor_Resources]  
,'/Orion/images/nodemgmt_art/icons/icon_list.gif' as [_IconFor_Resources]  
, case when cpu.pollertype is null then 'N/A'  
else cpu.pollertype   
end as [CPU and Memory] 
,cpu.enabled as [Enabled]
,case when cpu.enabled='true' THEN '\NetPerfMon\images\Small-Green.gif'  
when cpu.enabled='False' THEN '\NetPerfMon\images\Small-Red.gif'  
when cpu.enabled is null THEN '\NetPerfMon\images\Small-Shutdown.gif'  
end as [_iconfor_CPU and Memory]  

from orion.Nodes n  
left join Orion.Pollers [cpu] on n.NodeID=cpu.NetObjectID and CPU.PollerType like 'n.cpu%'  
  
where cpu.Enabled is not null
--and n.caption like '%${SEARCH_STRING}%'
order by n.caption

 

 

- Marc Netterfield, Github

View solution in original post

0 Kudos

Actually @mesverrum , I'm getting about ~150 nodes that don't show up in the result of your query (out of my ~1700 linux nodes).  If I list the resources on one of those missing nodes it doesn't have "CPU and memory" checked.  Once I check it it will show up in your query result.  Any ideas?  Seems there may be some missing data in the tables and we need to account for that.

0 Kudos

@mesverrum It seems the ~150 missing nodes do not have any "cpu.%" records in the Orion.Pollers table.  Any suggestions on how I can add an OR statement so that a machine is returned if does not have any "n.cpu%" record in the Orion.Pollers table?

0 Kudos

if they don't show up then you can remove the cpu.enabled is not null, that will probably get them.

 

As for a bulk way to fix those you might be able to just grab all their IP's and run a discovery against them.

- Marc Netterfield, Github
0 Kudos

For anyone that may come across this I changed the where condition to:

where (cpu.Enabled is not null
and cpu.Enabled="false") OR cpu.Enabled is null

0 Kudos

Thank you so much Marc!  This works great.  I just added a where condition of 'and cpu.Enabled="false"' and that gave me exactly what I needed!  It be great though if I didn't have to write a complex SWQL statement to find this out.  😉

0 Kudos