17 Replies Latest reply on Oct 3, 2017 10:02 AM by smatt

    NPM Dashboard Customisation

    smatt

      Hi All,

       

      I've been playing around quite a bit with reporting and dashboards over the last few days and am struggling to get some of the data in the format I want.

       

      Before I spend too much more time on it, I'd like to know if what I'm trying to achieve is even possible out of the box, or if I'd need to look at custom development to get the data in the format I would like.

       

      I've attached a simple mocked up example for what I can see in the GUI vs how I would like to display basic VM data. The percentage bars provide a nice visual, but I can't see a way to combine or use that source data in a new table or report.

       

      Ideally, I would like to list my Nodes on separate lines with KPI data in the format shown, but if we set aside the possible pitfalls of that, is it even possible? How do I reference the CPU load and Memory used bars in a report, because I just can't see how I do it.

       

      If I create a new view and add the resource "Top XX Volumes by Disk Space Used", I have data there that I want to use in another report, but I can't see how I add a percentage bar into a new report or even edit the layout of that report. It is even possible?

       

      Many thanks in advance,

       

      M

        • Re: NPM Dashboard Customisation
          mesverrum

          Natively you cannot do custom percent bars and the like, for that sort of thing I either simplify my requirements down to using icons, which you can make happen with SWQL, or I would move to something like SSRS.

           

          In SWQL you can do something like this, with case sensitive icons to indicate breached thresholds.  If you looked around I'm sure you could find the vendor icons as well for your machine type column

           

          select n.caption as [Node], n.detailsurl as [_Linkfor_Node], n.ip_address as [IP],

          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 cpuload >= n.CpuLoadThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

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

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

          END AS [_IconFor_CPU Load]

          ,case when 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 percentmemoryused >= n.percentmemoryusedThreshold.Level2Value THEN '/Orion/images/StatusIcons/Small-Critical.gif'

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

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

          END AS [_IconFor_Memory Used]

          ,CASE

          WHEN responsetime<0 then 'No Response'

          ELSE concat(responsetime,' ms')

          END AS [Latency]

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

          ,CASE

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

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

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

          END AS [_IconFor_Latency]

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

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

          ,CASE

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

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

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

          END AS [_IconFor_Packet Loss]

           

          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

           

          order by caption

          5 of 5 people found this helpful
            • Re: NPM Dashboard Customisation
              orioncrack

              Can I ask where that table is constructed? Or what component? I'm trying a custom table resource but its not pretty like your's.

               

              Thx

                • Re: NPM Dashboard Customisation
                  mesverrum

                  I generally use the custom query resource for these,  that's the only place that the iconfor and linkfor functions work.

                    • Re: NPM Dashboard Customisation
                      orioncrack

                      Beautiful! Thank you!

                       

                      One last SQL newb help request?

                       

                      How can I inject a custom property filter to narrow the list down "Select/Where Customer eq McDonalds"   (example company, I don't have any affiliation.)

                       

                      EDIT - I guess I could limit nodes on the View. Testing that now.

                       

                      EDIT 2 - yep device filter worked at the View level.

                       

                      Thanks again. I'm sure everyone will now ask "Now if only we could add disks in there"...LOL

                        • Re: NPM Dashboard Customisation
                          smatt

                          Yes, actually is one of the things I'm trying to work out

                           

                          More importantly for me though, is I'd like to have an icon notification if any SNMP traps are raised in relation to a Node. I don't think this would be that hard to achieve...

                           

                          For the SWQL queries, how often is that data collected? I can't see a polling interval setting so how often are these queries being run? 

                            • Re: NPM Dashboard Customisation
                              mesverrum

                              If you load a query onto the dashboard it runs every time the page is loaded/refreshed, default is 5 minute page refresh in the Web Settings.

                               

                              The orion.traps table is joined to the nodes table by default, all you have to do is tell your query to pull the data over. So a simple example going from the nodes info to the related traps would be

                               

                              SELECT top 100 n.caption, n.traps.DateTime, n.traps.TrapType, n.traps.trapvarbinds.OIDName, n.traps.trapvarbinds.OIDValue

                              FROM Orion.nodes n

                               

                              You would need to figure out what you want to display from there though, maybe something like a count or list of the traps that node has sent in the last 24 hours or something.  Traps can be a mess so I don't have any queries handy relating to them.

                              1 of 1 people found this helpful
                            • Re: NPM Dashboard Customisation
                              mesverrum

                              I typically handle the displaying disks separately because they can make a real mess of the table but while i was working with my client today I did end up coming up with what I think is a relatively clean solution to the disk volume status problem.

                               

                              Normally if you join the volumes table you end up with a row for each monitored volume, and the node level cpu/mem stuff all repeats for each volume and it doesn't look as clean.  I wrote a query today that summarizes the stuff i'm most interested into a single row summary of overall volume health.

                               

                               

                              The query looks at all the disks being monitored and just shows the one with the highest utilization, or if any are down it counts them like this

                               

                              If you need more info click on the volumes it pops out the Disk Volumes resource from the Node details page.  You will need to change the resourceid of the link to reflect what it is in your environment. (this is commented in the query)

                              In this case it looks like the "down" volume is from someone mucking with the disk volume in vmware so I need to remove the extra copy of C:\ that I'm monitoring

                              It's not a fool proof summary but I think for a high level it does the job.

                               

                              Because my client did a lot of organization via groups in their environment I also added a feature of this particular query to include a method to link to the application group that the node is a member of (in this case I have a Solarwinds group using a dynamic query to grab nodes with the custom property Applications contains "Solarwinds", you may want to remove that if you don't have a need for it

                              I added a line to filter by custom properties

                               

                              select distinct

                              cont.name as [Groups] -- optional, related to groups

                              ,cont.detailsurl as [_linkfor_Groups] -- optional, related to groups

                              ,n.CustomProperties.Applications -- optional, related to custom properties

                              ,n.CustomProperties.ApplicationsRole -- optional, related to custom properties

                              ,n.caption as [Server Name]

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

                              , n.detailsurl as [_linkfor_Server Name]

                              ,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&SampleSize=10M&Period=LAST%2024%20HOURS&NetObject=N:'+tostring(n.nodeid) 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.percentmemoryused < 0 then 'Not Polled'

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

                              end as [Memory Used]

                              ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=HostAvgPercentMemoryUsed&SampleSize=10M&Period=LAST%2024%20HOURS&NetObject=N:'+tostring(n.nodeid) 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 vol.high is null then 'None Monitored'

                              else tostring(vol.[# of Volumes])

                              end as [# of Volumes]

                              ,case

                              when vol.high is null then 'N/A'

                              when voldown.down is not null then (tostring(voldown.down)+' Down')

                              else (tostring(vol.high) + ' %')

                              end as [Fullest Disk]

                              ,CASE

                              WHEN voldown.down is not null then '/Orion/images/StatusIcons/Small-Down.gif'

                              WHEN vol.[High] >= 95 then '/Orion/images/StatusIcons/Small-Critical.gif'

                              WHEN vol.[High] >= 80 THEN '/Orion/images/StatusIcons/Small-Warning.gif'

                              WHEN vol.[High] >=  0 THEN '/Orion/images/StatusIcons/Small-Up.gif'

                              END AS [_IconFor_Fullest Disk]

                              ,'/Orion/DetachResource.aspx?ResourceID=21218&NetObject=N:' + tostring(n.nodeid) as [_linkfor_Fullest Disk] -- Need to change resourceid to match your environment

                               

                              FROM orion.nodes n

                              left join (SELECT Name,DetailsUrl FROM Orion.Container) cont on n.CustomProperties.Applications like ('%'+cont.name+'%') -- optional, related to groups

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

                              FROM Orion.CPUMultiLoadCurrent

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

                              left join (SELECT nodeid, count(volumeid) as [# of Volumes], round(max(volumepercentused),0) as [High] FROM Orion.Volumes

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

                              left join (SELECT nodeid, count(volumeid) as [down]

                              FROM Orion.Volumes where status=2

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

                               

                              where

                              --n.customproperties.{your_property_here} like 'whatever' and

                              (n.CustomProperties.Applications like '%${SEARCH_STRING}%' or cont.name like '%${SEARCH_STRING}%' or n.CustomProperties.ApplicationsRole like '%${SEARCH_STRING}%' or n.caption like '%${SEARCH_STRING}%')

                               

                              order by cont.name desc, n.CustomProperties.ApplicationsRole,n.caption -- may need to edit this line if you removed any of these

                              4 of 4 people found this helpful
                                • Re: NPM Dashboard Customisation
                                  orioncrack

                                  What a man, what a man what a mighty good man!

                                   

                                  Can I ask a totally stupid question, how do you construct these queries?

                                   

                                  Do you drag and drop tables within the SQL MS? Or write them from scratch in your head?

                                    • Re: NPM Dashboard Customisation
                                      mesverrum

                                      I use SWQL Studio, Releases · solarwinds/OrionSDK · GitHub

                                       

                                      Originally I had to hunt and peck until i could find the bits I needed to join from one table to the next, but now I've spent enough time under the hood i can rig up a report to show almost anything I can dream up.

                                       

                                      -Marc Netterfield

                                          Loop1 Systems: SolarWinds Training and Professional Services

                                        • Re: NPM Dashboard Customisation
                                          orioncrack

                                          Thanks, I've downloaded it in the past but not enough time to devote to master.

                                           

                                          One last favor, I'm sort of lost in the comments and code for the disks using a custom property.

                                           

                                          Can you show the code ready to copy and paste as if my company is "Microsoft"?

                                           

                                          I have a feeling this post will help other non coders in the future if you could. I'm going to tinker now and see if I can get it going.

                                           

                                          Thanks alot

                                            • Re: NPM Dashboard Customisation
                                              mesverrum

                                              Assuming your custom property is called Company and the company name = 'Microsoft'

                                               

                                              select

                                              ,n.caption as [Server Name]

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

                                              , n.detailsurl as [_linkfor_Server Name]

                                              ,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&SampleSize=10M&Period=LAST%2024%20HOURS&NetObject=N:'+tostring(n.nodeid) 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.percentmemoryused < 0 then 'Not Polled'

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

                                              end as [Memory Used]

                                              ,'/Orion/NetPerfMon/CustomChart.aspx?chartName=HostAvgPercentMemoryUsed&SampleSize=10M&Period=LAST%2024%20HOURS&NetObject=N:'+tostring(n.nodeid) 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 vol.high is null then 'None Monitored'

                                              else tostring(vol.[# of Volumes])

                                              end as [# of Volumes]

                                              ,case

                                              when vol.high is null then 'N/A'

                                              when voldown.down is not null then (tostring(voldown.down)+' Down')

                                              else (tostring(vol.high) + ' %')

                                              end as [Fullest Disk]

                                              ,CASE

                                              WHEN voldown.down is not null then '/Orion/images/StatusIcons/Small-Down.gif'

                                              WHEN vol.[High] >= 95 then '/Orion/images/StatusIcons/Small-Critical.gif'

                                              WHEN vol.[High] >= 80 THEN '/Orion/images/StatusIcons/Small-Warning.gif'

                                              WHEN vol.[High] >=  0 THEN '/Orion/images/StatusIcons/Small-Up.gif'

                                              END AS [_IconFor_Fullest Disk]

                                              ,'/Orion/DetachResource.aspx?ResourceID=21218&NetObject=N:' + tostring(n.nodeid) as [_linkfor_Fullest Disk] -- Need to change resourceid to match your environment

                                               

                                              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 (SELECT nodeid, count(volumeid) as [# of Volumes], round(max(volumepercentused),0) as [High] FROM Orion.Volumes

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

                                              left join (SELECT nodeid, count(volumeid) as [down]

                                              FROM Orion.Volumes where status=2

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

                                               

                                              where

                                              n.customproperties.Company='Microsoft'

                                               

                                              order by n.caption

                                                • Re: NPM Dashboard Customisation
                                                  orioncrack

                                                  Thanks, for some reason I'm getting "Error: A query to the SolarWinds Information Service failed."

                                                   

                                                  Getting this when I attempted and with your new post replacing Microsoft with "MyCompany".

                                                   

                                                  Will keep trying. I suspect I need to comment out your optional CustomProperties but still sort of lost in my old age.

                                                    • Re: NPM Dashboard Customisation
                                                      mesverrum

                                                      I've edited the post and try to simplify it to work more universally

                                                       

                                                      I'd expect the reason is probably to do with a custom property i used that you didnt have.

                                                        • Re: NPM Dashboard Customisation
                                                          smatt

                                                          Following on from this, I got one of our Devs to add the ability to see if a Node had SNMP traps logged against it.

                                                           

                                                          **********************

                                                           

                                                          SELECT

                                                          n.caption AS [Node],

                                                          n.DetailsURL AS [_Linkfor_Node],

                                                          n.IP_Address AS [IP],

                                                           

                                                          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 CPULoad >= n.CPULoadThreshold.Level2Value THEN

                                                          '/Orion/images/StatusIcons/Small-Critical.gif'

                                                          WHEN CPULoad >= n.CPULoadThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Warning.gif'

                                                          WHEN CPULoad <  n.CPULoadThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Up.gif'

                                                          END AS [_IconFor_CPU Load],

                                                           

                                                           

                                                          CASE

                                                          WHEN 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 PercentMemoryUsed >= n.PercentMemoryUsedThreshold.Level2Value THEN

                                                          '/Orion/images/StatusIcons/Small-Critical.gif'

                                                          WHEN PercentMemoryUsed >= n.PercentMemoryUsedThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Warning.gif'

                                                          WHEN PercentMemoryUsed <  n.PercentMemoryUsedThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Up.gif'

                                                          END AS [_IconFor_Memory Used],

                                                           

                                                          CASE

                                                          WHEN ResponseTime < 0 THEN

                                                          'No Response'

                                                          ELSE

                                                          CONCAT( ResponseTime, ' ms' )

                                                          END AS [Latency],

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

                                                          CASE

                                                          WHEN ResponseTime >= n.ResponseTimeThreshold.Level2Value THEN

                                                          '/Orion/images/StatusIcons/Small-Critical.gif'

                                                          WHEN ResponseTime >= n.ResponseTimeThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Warning.gif'

                                                          WHEN ResponseTime <  n.ResponseTimeThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Up.gif'

                                                          END AS [_IconFor_Latency],

                                                           

                                                          CONCAT( PercentLoss, '%' ) AS [Packet Loss],

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

                                                          CASE

                                                          WHEN PercentLoss >= n.PercentLossThreshold.Level2Value THEN

                                                          '/Orion/images/StatusIcons/Small-Critical.gif'

                                                          WHEN PercentLoss >= n.PercentLossThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Warning.gif'

                                                          WHEN PercentLoss <  n.PercentLossThreshold.Level1Value THEN

                                                          '/Orion/images/StatusIcons/Small-Up.gif'

                                                          END AS [_IconFor_Packet Loss],

                                                           

                                                           

                                                          CASE

                                                          WHEN traps.TrapCount = 0 THEN

                                                          'OK'

                                                          ELSE

                                                          CONCAT ( traps.TrapCount, 'Traps!' )

                                                          END AS [Traps],

                                                          CASE

                                                          WHEN traps.TrapCount = 0 THEN

                                                          '/Orion/images/StatusIcons/Small-Up.gif'

                                                          ELSE

                                                          '/Orion/images/StatusIcons/Small-Critical.gif'

                                                          END AS [_IconFor_Traps]

                                                           

                                                           

                                                          FROM

                                                          Orion.Nodes AS n

                                                          LEFT JOIN (

                                                          SELECT

                                                          NodeID,

                                                          COUNT( NodeID ) AS [CPU Count]

                                                          FROM Orion.CPUMultiLoadCurrent

                                                          GROUP BY NodeID

                                                          ) AS cpu

                                                          ON cpu.NodeID = n.NodeID

                                                          LEFT JOIN (

                                                          SELECT

                                                          NodeID,

                                                          COUNT( TrapID ) AS [TrapCount]

                                                          FROM Orion.Traps

                                                          WHERE

                                                          Acknowledged = 0

                                                          GROUP BY NodeID

                                                          ) AS traps

                                                          ON traps.NodeID = n.NodeID

                                                           

                                                          ORDER BY caption

                                                          1 of 1 people found this helpful
                                                            • Re: NPM Dashboard Customisation
                                                              mesverrum

                                                              Looks nice!  The only concern I want to raise with this is if you have a large noisy environment the number of traps in that db can be pretty beastly.  If you don't have that problem then that's good but I've been to client sites where their traps table is >30 gb (for 7 days of data) so scanning it really bogs down the load times.  When i run into those we usually have to spend some time setting up filters on the trap viewer to try and get things more under control because once I show them the types of traps they are getting they usually don't care about 3/4 of them or are already getting alerted on that info through other means.

                                                                • Re: NPM Dashboard Customisation
                                                                  smatt

                                                                  Fair point. This was done to try and find a way around the total lack of integration between SNMP traps and the alerting engine as there doesn't seem to be a way to do anything useful with a trap, at least not what we would want i.e. generate an alert.

                                                                   

                                                                  I'm not sure if there would be a way to tune down the intensity for high trap volume systems other than doing that filtering. I think our system would be using the API for most things and traps for the critical stuff we can't do via the API... this is all just a POC though...

                                          • Re: NPM Dashboard Customisation
                                            smatt

                                            This is fantastic; thanks so much for posting this!

                                             

                                            One of the limitations I've found with NPM / Orion is that you can't change a Nodes status based on aggregate values of sub-components, so for example you might have a disk full, but the Node still shows Green on a dashboard.

                                             

                                            This seems like a viable way to report on the KPIs I want and I assume it would also allow me to change a status icons based on something like an SNMP trap being received in relation to a Node; something I’ll need to investigate.

                                             

                                            Thanks again – it has definitely extended the capability I need.

                                             

                                            M