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.

SNMPv3 credentials with no username being added to nodes

While setting up some new nodes to be monitored via SNMPv3 manually I noticed strange behavior with the credentials assigned to the node after setup. I discovered this behavior with a report that utilizes a SQL query created by mahmoud.fathy to show the nodes a credential is assigned to: List nodes with their assigned SNMPv3 credentials - Forum - The Orion Platform - THWACK (solarwinds.com)

We have a total of 5x SNMPv3 credentials with no username that are being added to nodes in addition to the SNMP credentials selected at setup. I am not sure why we have credentials with no username in the first place. After I discovered this I looked back at some of my prior setups and this appears to have been an issue for a long time, likely years. As far as I can tell almost every manual SNMP setup has two sets of credentials assigned.  These 'no username' credentials are assigned to 500+ nodes making cleanup tricky and time-consuming.

This does not appear to affect data collection with the correct credentials so it may be a non-issue, but has anybody else seen this before and if so, what causes it and/or how much of an issue is it?

  • I would also chime into the SWQL usage. The post linked in your description dates back 2 years. I believe there have been changes in the database schema. As I had „a lot of fun“ back when the schema changed from NPM 11.5 to 12 with many clients, I defaulted to SWQL and rarely use SQL any more.

  • It looks like the linked query does not run in SWQL Studio which is not surprising given it is a SQL query. I'll see if I can find a SWQL alternative or modify it. I don't have much experience with either.

    In the meantime, I should note that I've seen the "assigned nodes" count increase on the latest credentials with no username as I was adding my last 2-3 SNMP nodes (in addition to the credentials I actually wanted to use) so that is another indication the node is trying to use both.

  • Hi, You can use below SWQL to get all nodes using snmpv3 and there credentials. There are more columns to add and discover if you need to but here is a start:

    SELECT
        N.Caption
        ,N.SNMPv3Credentials.DisplayName
        ,N.SNMPv3Credentials.Username
        ,N.SNMPv3Credentials.RWUsername
    FROM Orion.Nodes AS N
    WHERE N.SNMPVersion=3

    And this is SWQL, not SQL so you try it in the correct tool :-)

  • Thank you! This seems to work, however it doesn't display the credentials without a username that are viewable in SNMPv3 Credential Manager in the web console. I'll have to look into why that might be.

  • Thanks for the reply. Seashore hooked me up with a SWQL variant (below) which definitely does not match the linked SQL query; it does not even display the credentials sans username that is viewable in SNMPv3 Credential Manager in the web console. I wonder why the SQL query/Credential Manager is showing these and the SWQL query does not. I'll have to keep researching this.

  • How to get Credential name from the credential table?
    There is no such column in Orion.SNMPv3Credentials table.

  • Didn't find out how to do that in SWQL but in SQL you can use below script:

    select
    caption, ip_address, MachineType, SNMPVersion
    ,c.Name as [credential name]
    ,cp.Value as [username]
    from Nodes n
    inner join NodeSettings NS on N.NodeID=NS.NodeID
    inner join [Credential] as c on NS.Settingvalue=C.id and (ns.SettingName='ROSNMPCredentialID')
    inner join [CredentialProperty] as cp on c.id=cp.CredentialID and cp.Name='username'
    where SNMPVersion=3

  • Thanks. Btw I found a solution for SWQL:

    SELECT
        -- CREDENTIALS
         c.ID  AS  CredentialID,
         c.Name  as [Credential   name],
        -- NODES
         n.Caption  as [Node   caption],
         n.NodeID,
         n.IPAddress,
        -- CREDENTIALS
         cr.Username  as [String],
         cr.AuthenticationMethod  as [Method],
         cr.AuthenticationKey  as [Key]
    FROM  Orion.Nodes   n 
    INNER JOIN  Orion.NodeSettings   s  ON  s.NodeID  =  n.NodeID 
    INNER JOIN  Orion.SNMPv3Credentials   cr  ON  s.NodeID  =  cr.NodeID 
    LEFT JOIN  Orion.Credential   c  ON  c.ID  =  s.SettingValue 
    WHERE  s.SettingName  LIKE '%Credential%'
        -- AND c.Name like '%Kast%'
        AND  c.CredentialType  like '%SNMP%'
        -- AND n.nodeid = 151
    ORDER BY  c.Name