2 Replies Latest reply on Sep 27, 2017 12:18 PM by mesverrum

    Change the Credentials associated to Nodes

    venh.123

      I have added a Windows credential and many nodes have been added for monitoring using this credential. I would like to associate a different credential now for monitoring these nodes. How can I achieve this? Also, when I update / change this credential, I am not sure what else will break? Is there a way to find out all the places where a particular credential has been used and update it to a different credential in one go? Please help.

        • Re: Change the Credentials associated to Nodes
          venh.123

          Is this the way?

          Change WMI credentials for all nodes at once - SolarWinds Worldwide, LLC. Help and Support

           

          There is a challenge for me. Some of the nodes already have updated credentials. So, is it possible to identify those nodes which are mapped to a certain credential, if not from UI, at least through SQL query?

            • Re: Change the Credentials associated to Nodes
              mesverrum

              Its possible to build a list, but it probably might not be that helpful since you would still need to go to your manage nodes screen and check the boxes for all of them if you want to change them in bulk instead of one at a time.  Assuming that all nodes need to end up with the same set of credentials then selecting all from manage nodes is fine, it shouldn't hurt anything.  Otherwise you might build a script to set a custom property to identify all the nodes that you want to change, like setting the Comment property or something and then you can filter the manage nodes screen based on that to only select the necessary nodes for the change.

               

              This SWQL query can help you identify which credentials are in use for which nodes

               

              SELECT n.Caption AS [Node Name] ,n.detailsurl as [_linkfor_Node Name], '/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node Name],n.ip_address as [IP Address],n.detailsurl as [_linkfor_IP Address],c.Name AS [WMI/SNMPv3 Credential Name], n.Community as [SNMPv2 Community],'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 ns.SettingName like '%Credential%'

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

               

              where n.ObjectSubType!= 'ICMP'

              and (n.caption like '%${SEARCH_STRING}%' or n.community like '%${SEARCH_STRING}%' or c.name like '%${SEARCH_STRING}%') 

               

               

              And if you use SAM this query will identify SAM components credentials as well

               

              SELECT

              n.caption as [Node]

              ,n.detailsurl as [_linkfor_Node]

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

              ,n.objectsubtype as [Polling Method]

              ,case when n.objectsubtype in ('ICMP','WMI') then 'None'

              else n.community

              end as [SNMP Credential]

              ,'/Orion/Nodes/NodeProperties.aspx?Nodes=' + ToString(n.NodeID) as [_linkfor_SNMP Credential]

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

              ,case when n.objectsubtype='WMI' then cn.Name

              else 'None'

              end as [WMI Credential]

              ,'/Orion/Nodes/NodeProperties.aspx?Nodes=' + ToString(n.NodeID) as [_linkfor_WMI Credential]

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

              ,case when a.name is null then 'None Assigned'

              else a.name

              end as [Application]

              ,a.detailsurl as [_linkfor_Application]

              ,'/Orion/images/StatusIcons/Small-' + a.StatusDescription + '.gif' AS [_IconFor_Application]

              ,case when aset.value='-3' then 'Inherit From Node'

              when aset.value is null and c.name is not null then 'Set by Component'

              when a.name is null then 'None Assigned'

              else ca.name end as [Application Credential]

              ,'/Orion/APM/Admin/Edit/EditApplication.aspx?id=' + tostring(a.applicationid) as [_linkfor_Application Credential]

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

              ,case when c.name is null then 'None Assigned'

              else c.name end as [Component]

              ,c.detailsurl as [_linkfor_Component]

              ,case when c.statusdescription = 'Not Running' then '/Orion/APM/Images/StatusIcons/Components/Small-not-running.gif'

              when c.statusdescription = 'Critical' then '/Orion/APM/Images/StatusIcons/Components/Small-up-critical.gif'

              when c.statusdescription ='Unplugged / Offline' then '/Orion/APM/Images/WebsiteUpgrade/button.close.gif'

              else concat('/Orion/APM/Images/StatusIcons/Components/Small-',c.StatusDescription,'.gif')

              end AS [_IconFor_Component]

              ,case when a.ApplicationTemplateID in (8,9,10) then 'Set by Application'

              when cs.value='-3' then 'Inherit From Node'

              when c.name is null then 'None Assigned'

              else cc.name end as [Component Credential]

              ,'/Orion/APM/Admin/Edit/EditApplication.aspx?id=' + tostring(a.applicationid) as [_linkfor_Component Credential]

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

               

              from orion.nodes n

              left join Orion.NodeSettings ns ON n.NodeID = ns.NodeID and settingname='WMICredential'

              left join Orion.Credential cn ON ns.SettingValue = cn.ID   

              left join orion.apm.application a on n.nodeid=a.nodeid

              left join Orion.APM.ApplicationSettings as aset on aset.applicationid=a.applicationid and (aset.key='CredentialSetId' or aset.key='SqlCredentialSetId')

              left join Orion.Credential ca ON aset.Value = ca.ID

              left join orion.apm.component c on c.applicationid=a.applicationid

              left join orion.apm.componentsetting cs on cs.componentid=c.componentid and cs.key='__CredentialSetId'

              left join orion.apm.componenttemplatesetting cts on cts.componenttemplateid=c.templateid and cts.key='__CredentialSetId'

              left join Orion.Credential cc ON cs.Value = cc.ID or cc.id=cts.value

               

              where (n.caption like '%${SEARCH_STRING}%' or

              n.community  like '%${SEARCH_STRING}%' or

              cn.Name like '%${SEARCH_STRING}%' or

              a.name like '%${SEARCH_STRING}%' or

              ca.name like '%${SEARCH_STRING}%' or

              c.name like '%${SEARCH_STRING}%' or

              cc.name like '%${SEARCH_STRING}%')