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

How to create a report which will identify all nodes where the last attempt to SNMP poll has failed

Has anyone done this using what's available out of the box rather than through a SQL query? Cisco Prime offers this as you can sort nodes based on 'SNMP connectivity failed' This would be a very handy feature. I know you can set up an alert to fire when SNMP polling failed but instead of sifting through alerts it would be great to have all these nodes in one place so you can do a tidy up. Cheers guys!

Labels (1)
12 Replies

This is the report I use for this situation, you may want to tweak it slightly for your use case but it has served me well.

Add it into a custom query resource on one of your views.

select

n.caption as [Node]

,n.detailsurl as [_linkfor_Node]

,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]

,n.ip_address as [IP Address]

,n.detailsurl as [_linkfor_IP Address]

,n.statusdescription as [Status Description]

,n.objectsubtype as [Collection Type]

,e.servername

,n.statcollection as [Interval]

,case when n.objectsubtype !='SNMP' then 'Not Used'

when n.community='' then 'Not Used'

else n.community

end as [SNMPv2 Community]

,case when c.Name is null then 'Not Used'

else c.Name

end AS [WMI/SNMPv3 Credential]

,tolocal(n.lastsystemuptimepollutc) as [Last Stat Collection]

,tolocal(n.lastsync) as [Last Ping]

,daydiff(lastsystemuptimepollUTC,getutcdate()) as [Days Since Polled]

,'Edit' AS [Edit]

, '/Orion/Nodes/NodeProperties.aspx?Nodes=' + ToString(n.NodeID) AS [_LinkFor_Edit]

,'/Orion/images/nodemgmt_art/icons/icon_edit.gif' as [_IconFor_Edit] 

from orion.nodes n

left JOIN Orion.NodeSettings ns ON n.NodeID = ns.NodeID and SettingName like '%Credential%'   

left JOIN Orion.Credential c ON ns.SettingValue = c.ID   

join Orion.Engines e on e.engineid=n.engineid

where status<>'2'

and status<>'9'

and objectsubtype!='ICMP'

and minutediff(lastsystemuptimepollUTC,getutcdate())>20

Order by Lastsystemuptimepollutc

pastedImage_4.png

- Marc Netterfield, Github

Awesome! How can I tie it to a custom property to only show a particular subset of data?

Aka, I only wanna see it where nodes.customproperties.owner = '%Systems%'. I can't get the query to come back as valid, but I'm the SWQL is eluding me on what to do.

0 Kudos

nodescustomproperties, not nodes.customproperties?

0 Kudos

No dice trying that Smttysmth02gt, this is what I modified for my purposes:

My Custom Property is "Owner" and I just want to equal "Systems"

select

n.caption as [Node]

,n.detailsurl as [_linkfor_Node]

,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]

,n.ip_address as [IP Address]

,n.detailsurl as [_linkfor_IP Address]

,n.statusdescription as [Status Description]

,tolocal(n.lastsystemuptimepollutc) as [Last Stat Collection]

,tolocal(n.lastsync) as [Last Ping]

,daydiff(lastsystemuptimepollUTC,getutcdate()) as [Days Since Polled]

,'Edit' AS [Edit]

, '/Orion/Nodes/NodeProperties.aspx?Nodes=' + ToString(n.NodeID) AS [_LinkFor_Edit]

,'/Orion/images/nodemgmt_art/icons/icon_edit.gif' as [_IconFor_Edit]

from orion.nodes n

left JOIN Orion.NodeSettings ns ON n.NodeID = ns.NodeID and SettingName like '%Credential%'  

left JOIN Orion.Credential c ON ns.SettingValue = c.ID  

join Orion.Engines e on e.engineid=n.engineid

where status<>'2'

and status<>'9'

and objectsubtype!='ICMP'

and minutediff(lastsystemuptimepollUTC,getutcdate())>20

Order by Lastsystemuptimepollutc

0 Kudos

you want to add

and n.customproperties.owner = 'Systems'

before the order by

- Marc Netterfield, Github

Excellent! Worked like a charm

0 Kudos

WHERE CP = TRUE

or

WHERE CP = 'Your data'

0 Kudos
Level 9

Hi,

I'm looking for something similar. I have to make a planned change to the SNMP settings on 70 or so nodes (apply a new ACL for SNMP read-only access), so I want to make sure that SNMP polling is still working afterwards. I appreciate this isn't quite the same thing, but I think the effect is the same - In Orion, I went to edit node, and changed the community string so that it doesn't match what's configured in IOS (so polling will fail). I then polled the device and saw that the interfaces are now all 'unknown'. If I got to Manage Nodes, then search for the node in question, I see that it has the little grey square within the Green node up icon. This tells me that the 'Overall Hardware Status Has State 'Could not poll'. I then added an extra column to the view (from the list of available columns, by clicking on the two tiny blue arrows on the right hand side of the right-most column header), called "Overall Hardware Status (Node) - Status". The value in the column for my test node is "17" - I assume this is the database value that means "could not poll". There are nodes with other values in my environment too (e.g. 3 seems to mean "warning".

I know this isn't an alert or a report, but it's a really quick way of viewing nodes that Orion that can't successfully poll using SNMP.

Cheers

0 Kudos
Level 14

There are a few different ways you could do this actually.  Firstly, if it can't poll via SNMP, then all inferfaces monitored would go into an unknown status (Orion.NPM.Interfaces = 0).  I actually prefer this method because this can point out other issues that aren't necessarily just SNMP related.  Also, a node that can't poll via SNMP can't pull an OID to display ((Nodes.ObjectSubType = 'SNMP' AND Nodes.SysObjectID = '');)

I don't know however, if a node was previously polled successfully for SNMP and fails, if the OID remains on the Node Details section or if it goes away?

0 Kudos
Level 10

Not exactly what your after but will show you only failed SNMP poller types on what ever duration you want to see.

Create a custom SWQL resource on your page

SWQL Query

SELECT Caption, SysName, LastSync, IP, MinutesSinceLastSync, SkippedPollingCycles, SNMPVersion FROM Orion.Nodes where SNMPVersion > 0 order by LastSync

Enable Search

SELECT Caption, SysName, LastSync, IP, MinutesSinceLastSync, SkippedPollingCycles, SNMPVersion FROM Orion.Nodes where SNMPVersion > 0 and MinutesSinceLastSync >  ${SEARCH_STRING} order by LastSync

Level 9

You could try this. I haven't tested for your case specifically but I am using similar functionality. It's not a report but would list all the nodes in the same place.

Create a new custom property called SNMPStatus

In the trigger actions for the existing alert add an action to change custom property

Configure this action to set custom property value as SNMPDown

Create new dynamic group using Orion Object is Node and SNMPStatus is SNMPDown

Group should then auto populate when the alert runs.

Magic?

Sounds like a good idea, thanks for the input I'll give that a go!

0 Kudos