1 Reply Latest reply on Dec 14, 2017 7:16 PM by mesverrum

    Export solarwind thresholds

    vandana.ramnani

      Hello Team,

       

      We have a requirement where we would like to check the thresholds being set for each server we monitor. Is there a report we can pull from SAM to show the thresholds active for each server monitored by SAM? To give background we are moving from BMC patrol to SAM so just want to make sure if we have all what was earlier configured in Patrol. I am sure many of you must have done this type of comparisons so could you throw some light of most efficient way of doing so.

       

      Looking for advise.

       

      Thanks,

      Vandana

        • Re: Export solarwind thresholds
          mesverrum

          I use this beast of a query to check a bunch of my thresholds if you want to use it as a model.  Getting the component thresholds from SAM is a real pain as there are many tables of info to parse out, but it can be done if you take some time to poke around in SWQL studio.

           

          select

          n.caption as [Server Name]

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

          ,n.detailsurl as [_linkfor_Server Name]

          ,IP_address

          ,case when n.cpuload < 0 then 'Not Polled'

          when n.host.nodeid is not null and n.host.cpucorecount is not null then concat(round(n.host.cpuload,0),'% of ',n.host.CpuCoreCount,' CPU')

          when cpu.[cpu count] is not null then concat(cpuload,'% of ',cpu.[cpu count],' CPU')

          else 'Polling Error'

          end as [CPU Load]

          ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=HostAvgCPULoad&NetObject=N:'+tostring(n.nodeid)+'&Period=Today' as [_linkfor_CPU Load]

          ,CASE

          WHEN n.cpuload >= n.CpuLoadThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

          WHEN n.cpuload >= n.CpuLoadThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Warning.gif'

          WHEN n.cpuload <  n.CpuLoadThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Up.gif'

          END AS [_IconFor_CPU Load]

          ,case when n.CpuLoadThreshold.Level1Value = n.CpuLoadThreshold.GlobalWarningValue then ('Default (' + tostring(n.CpuLoadThreshold.Level1Value) + '%)')

          else ('Custom ('+tostring(n.CpuLoadThreshold.Level1Value)+'%)')

          end as [CPU Warning]

          ,case when n.CpuLoadThreshold.Level2Value = n.CpuLoadThreshold.GlobalCriticalValue then ('Default (' + tostring(n.CpuLoadThreshold.Level2Value) + '%)')

          else ('Custom ('+tostring(n.CpuLoadThreshold.Level2Value)+'%)')

          end as [CPU Critical]

          ,case when n.percentmemoryused < 0 then 'Not Polled'

          else concat(percentmemoryused,'% of ',(round(n.totalmemory/1073741824,0)),' GB')

          end as [Memory Used]

          ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=HostAvgPercentMemoryUsed&NetObject=N:'+tostring(n.nodeid)+'&Period=Today' as [_linkfor_Memory Used]

          ,CASE

          WHEN n.percentmemoryused >= n.percentmemoryusedThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

          WHEN n.percentmemoryused >= n.percentmemoryusedThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Warning.gif'

          WHEN n.percentmemoryused <  n.percentmemoryusedThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Up.gif'

          END AS [_IconFor_Memory Used]

          ,case when n.percentmemoryusedThreshold.Level1Value = n.percentmemoryusedThreshold.GlobalWarningValue then ('Default (' + tostring(n.percentmemoryusedThreshold.Level1Value) + '%)')

          else ('Custom ('+tostring(n.percentmemoryusedThreshold.Level1Value)+'%)')

          end as [Mem Warning]

          ,case when n.percentmemoryusedThreshold.Level2Value = n.percentmemoryusedThreshold.GlobalCriticalValue then ('Default (' + tostring(n.percentmemoryusedThreshold.Level2Value) + '%)')

          else ('Custom ('+tostring(n.percentmemoryusedThreshold.Level2Value)+'%)')

          end as [Mem Critical]

          ,CASE

          WHEN n.responsetime<0 then 'No Response'

          ELSE concat(n.responsetime,' ms')

          END AS [Latency]

          ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=AvgRt&NetObject=N:'+tostring(n.nodeid)+'&Period=Today' as [_linkfor_Latency]

          ,CASE

          WHEN n.responsetime >= n.responsetimeThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

          WHEN n.responsetime >= n.responsetimeThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Warning.gif'

          WHEN n.responsetime <  n.responsetimeThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Up.gif'

          END AS [_IconFor_Latency]

          ,case when n.responsetimeThreshold.Level1Value = n.responsetimeThreshold.GlobalWarningValue then ('Default (' + tostring(n.responsetimeThreshold.Level1Value) + ' ms)')

          else ('Custom ('+tostring(n.responsetimeThreshold.Level1Value)+' ms)')

          end as [Latency Warning]

          ,case when n.responsetimeThreshold.Level2Value = n.responsetimeThreshold.GlobalCriticalValue then ('Default (' + tostring(n.responsetimeThreshold.Level2Value) + ' ms)')

          else ('Custom ('+tostring(n.responsetimeThreshold.Level2Value)+' ms)')

          end as [Latency Critical]

          ,concat(percentloss,'%') as [Packet Loss]

          ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=PercentLoss&NetObject=N:'+tostring(n.nodeid)+'&Period=Today' as [_linkfor_Packet Loss]

          ,CASE

          WHEN n.percentloss >= n.percentlossThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

          WHEN n.percentloss >= n.percentlossThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Warning.gif'

          WHEN n.percentloss <  n.percentlossThreshold.Level1Value THEN '/Orion/images/StatusIcons/Small-Up.gif'

          END AS [_IconFor_Packet Loss]

          ,case when n.percentlossThreshold.Level1Value = n.percentlossThreshold.GlobalWarningValue then ('Default (' + tostring(n.percentlossThreshold.Level1Value) + '%)')

          else ('Custom ('+tostring(n.percentlossThreshold.Level1Value)+'%)')

          end as [Loss Warning]

          ,case when n.percentlossThreshold.Level2Value = n.percentlossThreshold.GlobalCriticalValue then ('Default (' + tostring(n.percentlossThreshold.Level2Value) + '%)')

          else ('Custom ('+tostring(n.percentlossThreshold.Level2Value)+'%)')

          end as [Loss Critical]

          ,v.caption as [Volume]

          ,tostring(round(v.VolumePercentUsed,0)) + '%' as [Percent Used]

          ,case when v.caption is null then ''

          when v.forecastcapacity.WarningThreshold is null then ('Default (' + (Select tostring(CurrentValue) AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Warning') + '%)')

          else ('Custom ('+tostring(v.forecastcapacity.WarningThreshold)+'%)')

          end as [Volume Warning]

          ,case when v.caption is null then ''

          when v.forecastcapacity.CriticalThreshold is null then ('Default (' + (Select tostring(CurrentValue) AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Error') + '%)')

          else ('Custom ('+tostring(v.forecastcapacity.CriticalThreshold)+'%)')

          end as [Volume Critical]

           

          FROM orion.nodes n

          left join (SELECT count(NodeID) as [CPU Count], nodeid

          FROM Orion.CPUMultiLoadCurrent

          group by nodeid) cpu on cpu.nodeid=n.nodeid

          left join orion.volumes v on v.nodeid=n.nodeid

           

          order by n.caption

           

           

          -Marc Netterfield

              Loop1 Systems: SolarWinds Training and Professional Services

          1 of 1 people found this helpful