3 Replies Latest reply on Jun 29, 2018 10:15 AM by RichardLetts

    Alert Issue (AlertCaption)

    RichardLetts

      We've ben tracking an issue where the name of the object in the alert does not match the current name of an object.

      (pedantically we use the IP address for our edge switches, when they renumber the name changes)

       

      the AlertObject table doesn't track changes in caption, and it's the value initially stored in that table that gets displayed in the ActiveAlerts / AllAlerts widget.

       

      Try this database query in your environment to find nodes where the alert captions will not match the [current] node name.

       

      select AO.EntityCaption,AO.RelatedNodeCaption,N.Caption
      FROM [dbo].[AlertObjects] AO inner join nodes N on
      AO.relatednodeid=N.Nodeid
      and AO.EntityType='Orion.Nodes'
      where  AO.EntityCaption<>N.Caption or AO.RelatedNodeCaption<>N.Caption
      and N.unmanaged=0

      Version: 12.0.1

      Bug report being filed with SW Support

        • Re: Alert Issue (AlertCaption)
          RichardLetts

          Here are the Fix Scripts I wrote and applied to correct this issue:

           

          These scripts are provided wholly without warranty, utility, or verification beyond my own environment.

          By executing these scripts you take full responsibility for understanding what they do and any outcome

           

          Please contact Solarwinds Support before applying these and open a case before applying

           

          Fix the related node captions

          UPDATE AO
           set AO.RelatedNodeCaption = N.Caption 
          FROM [dbo].[AlertObjects] AO inner join nodes N on
          AO.relatednodeid=N.Nodeid
          and N.unmanaged=0
           where  AO.RelatedNodeCaption<>N.Caption

           

          Fix the alert captions on Node Alerts

          Update AO
           Set AO.EntityCaption=N.Caption
          FROM [dbo].[AlertObjects] AO inner join nodes N on
               AO.relatednodeid=N.Nodeid
               and AO.EntityType='Orion.Nodes'
               and N.unmanaged=0
          WHERE AO.EntityCaption<>N.Caption 

           

          Fix the Alert captions on interface alerts

          Update AO
          SET AO.EntityCaption= I.Caption
          FROM [dbo].[AlertObjects] AO inner join nodes N
               on AO.relatednodeid=N.Nodeid
               and N.Unmanaged=0
          Inner join interfaces I
               ON I.Nodeid=AO.relatedNodeID
               and AO.EntityType='Orion.NPM.Interfaces'
               and i.unmanaged=0
          where  AO.EntityCaption<>I.Caption
          and  'I:'+cast(I.InterfaceID as varchar) = EntityNetObjectID
          2 of 2 people found this helpful
          • Re: Alert Issue (AlertCaption)
            ryan.davis26

            Nice Catch!  On a different yet related note, I actually switched from using the Caption to using Sysname where possible because of conflicts with CMDB discovery data.  Clients tend to use caption in wildly different ways and can sometimes be nothing like the actual name of the device (sysname).  So things like CI binding (we use ServiceNOW CMDB and ITSM) don't work if you pass caption because ServiceNOW has no clue what device you're trying to bind an incident to!

            • Re: Alert Issue (AlertCaption)
              RichardLetts

              Note: this bug is still there in NPM 12.1 and 12.2

              in our upgrade the server names were changed, and staff started troubleshooting alerts on inactive SolarWinds servers.

               

              Also need to fix the engine names

               

              Update AO 
                  Set AO.EntityCaption=E.ServerName 
                  FROM [dbo].[AlertObjects] AO , Engines E
                  WHERE AO.EntityCaption<>e.ServerName
                      and  AO.EntityType='Orion.Engines' 
                      and  ':'+cast(E.EngineID  as varchar) = EntityNetObjectID  ;