19 Replies Latest reply on Oct 15, 2018 2:53 AM by adam.beedell

    Including Charts in Alert Emails

    dargrotek

      I'm in the process of converting a few of our alert emails and I'm wondering if there is an easy way to do what I'm aiming to accomplish.

       

      If a group goes down, for X number of minute an alert email is fired with some basic information such as time, link to group on Orion etc. On other network monitoring software I've used it's always been possible to include a chart of some description into the alert email such as a utilization chart on a utilization alert and so on. So I'm trying to do something a bit similar. I've had some limited success so far and can quite easily insert a chart into the body of the email for the whole day by doing the following

       

      /Chart.aspx?ChartName=ContainerAvailability&NetObject=C:${GroupID}&Period=${MM}/${DD}/${YYYY} 0:00 AM~${MM}/${DD}/${YYYY} 11:59:00 PM&SampleSize=1M&ShowTrend=False&Width=640

       

       

      However I'm having difficulty finding a way to do the same thing for different time frames such as a 7 day chart. Is there any way to manipulate the returned values of variables so that a date returning 14 can become 7, or a time of 11:00 can become 10:00?

       

      Or maybe I'm doing things in an overly complicated way and have completely missed something. Wouldn't be the first time!

        • Re: Including Charts in Alert Emails
          dargrotek

          Never mind, found the solution myself. In case it helps anyone in the future...

           

          ${SQL:SELECT CONVERT(VARCHAR, DATEADD(DAY,-7, GETDATE()), 101)}

          2 of 2 people found this helpful
          • Re: Including Charts in Alert Emails
            mitrae

            Hi Thanks

            can you please post the entire alert Trigger Action ? i cant see where should i put

             

            /Chart.aspx?ChartName=ContainerAvailability&NetObject=C:${GroupID}&Period=${MM}/${DD}/${YYYY} 0:00 AM~${MM}/${DD}/${YYYY} 11:59:00 PM&SampleSize=1M&ShowTrend=False&Width=640

             

            Thanks !

            • Re: Including Charts in Alert Emails
              beeler4304

              Please post the code that you got working for the chart to show in the email.

              • Re: Including Charts in Alert Emails
                etothaj

                I need this code badly.  Our Director is a graph freak and the standard text based email is just making him mad.

                  • Re: Including Charts in Alert Emails
                    rafish

                    Hi,

                     

                    Did u succeeded with this ?

                      • Re: Including Charts in Alert Emails
                        etothaj

                        Not even close, unfortunately.  The suggestions above with attaching a separate email including a graph is the best, yet unacceptable, solution. 

                          • Re: Including Charts in Alert Emails
                            adam.beedell

                            Don't know if you've had your problem fixed yet. Personally I'm searching around for a related problem, and don't like seeing chains like this without an answer at the bottom.

                             

                            A method that served me well was as follows:

                             

                            • Find a non-interactive chart in SLW that can/does display what you want. Multiple Object charts work for most things, group availability charts are also good
                            • Copy the link for that image, you'll get something like:

                                      ".../Orion/Netperfmon/Chart.aspx?ChartName=IfAggrUtilizationOut&NetObject=&ResourceID=4896&NetObjectPrefix=&Rows=&Title=&..."

                                      Note everything after the question mark can be meddled with, variables are separated by "&", and that gives you decent control over the output

                            • Stick that in an alert email action in "<img src=.." tags
                            • Replace the section in the URL which refers to the object with a variable which outputs the same kind of object, eg:

                                      "...&ChartEntity=Orion.NPM.Interfaces&Width=640&SelectedEntities=${N=SwisEntity;M=InterfaceID}..."

                                      InterfaceIDs for interface utilization charts, groupIDs for availability charts, nodeIDs etc..

                             

                            This means that whatever object triggers your alert, it's reference gets plugged into the image formula for the type of chart you want and that should give you what you're after.

                             

                            Other, better methods exist I'm sure.

                              • Re: Including Charts in Alert Emails
                                marcink

                                Do you have any documentation with description of variables which can be used to format such custom charts in alerts? I would like to create an alert for volumes, including graph with volume utilization from the last 3 months (for example). This method with formatted URL would be fine, but the question is, where can I find some descriptions of all needed parameters and values.

                                 

                                Best Regards

                                  • Re: Including Charts in Alert Emails
                                    adam.beedell

                                    Hi, no i'm afraid I've got no documentation, i'd love some if you find some anywhere else. It'd be lovely if there was an element in the UI for this.

                                     

                                    An example that'd work for 3 months's storage is:

                                     

                                    <img src="https://[yourserverhere]/Orion/NetPerfMon/Chart.aspx?ChartName=AggrPercentDiskUsage&Period=Last%203%20months&SampleSize=1H&ShowTrend=True&FontSize=2&ChartEntity=Orion.Volumes&Width=580&SelectedEntities=${N=SwisEntity;M=VolumeID}"></img>

                                     

                                    Where the italic bit is the actual alert console variable.

                                     

                                    Alternately there's a way of doing it with the perfstack charts, but i've not found a way to include those while also embedding them in the email. (I think attaching as a report PDF works).

                                    1 of 1 people found this helpful
                                      • Re: Including Charts in Alert Emails
                                        marcink

                                        Adam, thank you very much for your answer, this is exactly what I wanted to achieve.

                                        The only question yet - how it's possible to find these graphs names, like "AggrPercentDiskUsage" in this case - is it possible to figure it out anyway browsing existing graphs in SW? Because knowing these particular names, it's possible to experiment with different charts and settings (many settings are probably common for different charts).

                                        It's strange that this functionality is not officially documented, it might be very useful. I'll try to find a support contact to Solarwinds (probably my company has some support agreement) and to ask them for it. If I have anything, I'll let you know.

                                         

                                        Best Regards

                                          • Re: Including Charts in Alert Emails
                                            adam.beedell

                                            I'd love a document with all the available graph names and what they're good for, but i've not seen one, if you find one please send it over!

                                             

                                             

                                             

                                            You absolutely can search solarwinds for graphs that work and figure it out from there, as with the vague process above or below:

                                             

                                            In my experience what you're looking for is a graph without any mouseover effects. Either right click->copy link, or Export -> take details from the URL on that page.

                                            The graphs with mouseover events are generally more complicated HTML elements and aren't easy to isolate.

                                             

                                            For example here's a link to a graph in my live that looks alright:

                                            Export page URL: https://servername/Orion/NetPerfMon/CustomChart.aspx?ChartName=HostAvgCPULoad&Title=&SubTitle=&SubTitle2=&Width=640&Height=0&SampleSize=5M&Period=LAST%207%20DAYS&ShowTrend=True&FontSize=2&NetObject=N:4084

                                            Copied Image URL: https://servername/Orion/Netperfmon/Chart.aspx?ChartName=HostAvgCPULoad&Title=&SubTitle=&SubTitle2=&Width=640&Height=0&SampleSize=5M&Period=LAST%207%20DAYS&ShowTrend=True&FontSize=2&NetObject=N:4084

                                             

                                            In bold is another chart name, which is the most useful bit, you can then experiment in the browser with what settings you can change and what parts of the URL you can add or remove. Generally the relevant object ID is at the other end, in italics here, and that's what you need to replace in the alert. It's easiest to use the Export page to get the time values and such working the way you want.

                                             

                                            You can also use that same netobjectid value to hyperlink your chart to something in the live environment using a <a href> tag for example.

                                            1 of 1 people found this helpful
                                              • Re: Including Charts in Alert Emails
                                                marcink

                                                OK, I got it - with "static" chart pictures it's an easy way indeed, with graphs with mousover effects there's no an URL with parameter displayed after clicking on the graph, so that's the problem. But static charts are enough - when I send an e-mail alert I don't expected dynamic graphs inside - it's no Power BI...

                                                 

                                                Anyway - thanks once again for your help!!! I'll create a support case with a question if it's possible to get any documentation to it - if I got anything, I'll let you know.

                                                 

                                                Best Regards

                                                1 of 1 people found this helpful
                                                • Re: Including Charts in Alert Emails
                                                  matth37

                                                  Thank you for all of this info!  I am able to get the charts I want into the alert emails, however, they are only displaying if the email is being accessed via web client in the same browser that has my Orion session running.  This makes sense, as it's running code from the website, which needs authentication to access.  Do you know of a way around this?  I can't help but think that I'm missing something obvious.

                                                    • Re: Including Charts in Alert Emails
                                                      adam.beedell

                                                      Hi Matt,

                                                       

                                                      Yeah this is a big pain for me at the moment - In HTTP NPM 12.1.x and 12.0 I had it working with minimal authentication issues, whereas with HTTPS NPM 12.3 I'm struggling to get it working without extra auth steps

                                                       

                                                      One confirmed way around it is to enable the DirectLink account (search it on thwack there's full guides), that has some security implications though so I cant run it in my environment

                                                       

                                                      My impression from working with SLW support and on thwack is it should still be possible with all the lastest versions and whatnot, no good fix from my end yet though.

                                                      1 of 1 people found this helpful
                                                        • Re: Including Charts in Alert Emails
                                                          matth37

                                                          Thanks for the reply Adam.  Yeah, DirectLink is a no-go on my end as well.

                                                           

                                                          I did some brainstorming with a few coworkers and we came up with a cockamamie scheme to somehow script Orion to save a chart image to a network share and then link to that image in the alert email.  We got the referencing part down, settling on ${N=Alerting;M=AlertActiveID} as the variable to use for saving/linking... we just need to work out how to get Orion to save off the chart image (he said with feigned confidence).

                                                          1 of 1 people found this helpful
                                                            • Re: Including Charts in Alert Emails
                                                              adam.beedell

                                                              Please let me know if you get a working solution - I'm trying similar things at the moment but havn't reached a solution yet

                                                               

                                                              Within solarwinds I believe it might be possible to use the inbuilt PDF report functionality to attach locally saved charts but I've not spent much time looking into it as it's less desirable than anything embedded

                                                              1 of 1 people found this helpful
                                                                • Re: Including Charts in Alert Emails
                                                                  faizan_123

                                                                  Hello Adam,

                                                                  We have npm 12.3 environment, We want to attach network latency and packet loss chart with the email.

                                                                  We inserted the url in img.src, The url is somewhat like https://Server-name/Orion/DetachResource.aspx?viewkey=NetFlow+Traffic+Analyzer+Summary+Narrow&ResourceID=…

                                                                  in this we have current url i don't know what to do with that. when we trigger an action of email we dont get any chart image we get it blank.

                                                                  So i wanted to know how you got it working for any chart.

                                                                   

                                                                  all help is appreciated.

                                                                    • Re: Including Charts in Alert Emails
                                                                      adam.beedell

                                                                      Hi Faizan,

                                                                       

                                                                      I'm still having some trouble in 12.3, but ignoring that - That element's a live HTML chart, note the mouseover effect, those wont work in an email format primarily as the email clients wont allow it.

                                                                      You're looking for a chart that's a flat image, a jpg, png, something like that, no interaction available.

                                                                       

                                                                      I believe it's possible to make a report pdf copy of something that's a live element but i've not researched it properly.

                                                                       

                                                                      For most other stuff a custom Multiple Object Chart will probably work, and you can experiment with formatting that in the UI

                                                                       

                                                                      I believe this is a list of all of the other charts, i've used few of them, there is 2 NTA charts on there so one of them might be relevant to you. There's a table in the database with some guidance on what operations and units they'll accept, i've not tried them personally though:

                                                                       

                                                                      APMApplicationAvailabilityAPMComponentAvailability

                                                                      APMCustomAreaChartAvailability

                                                                      APMCustomAreaChartResponseTime

                                                                      APMCustomAreaChartStatisticData

                                                                      APMCustomBarChartAvailability

                                                                      APMCustomBarChartResponseTime

                                                                      APMCustomBarChartStatisticData

                                                                      APMCustomLineChartAvailability

                                                                      APMCustomLineChartResponseTime

                                                                      APMCustomLineChartStatisticData

                                                                      APMMinMaxAvgIOReadOperationsPerSec

                                                                      APMMinMaxAvgIOTotalOperationsPerSec

                                                                      APMMinMaxAvgIOWriteOperationsPerSec

                                                                      APMMinMaxAvgMemoryUsed

                                                                      APMMinMaxAvgPercentCPU

                                                                      APMMinMaxAvgResponseTime

                                                                      APMMinMaxAvgStatisticData

                                                                      APMMinMaxAvgVirtualMemoryUsed

                                                                      APMMultiChart

                                                                      APMMultipleStatisticChart

                                                                      AppART

                                                                      AppDataVolume

                                                                      ApplicationHealthOverview

                                                                      AppNRT

                                                                      AppTransactions

                                                                      Availability

                                                                      AvailabilityRT

                                                                      AvgBps-Line

                                                                      AvgBps-Step

                                                                      AvgCPUMultiLoad

                                                                      AvgDiskSecPerTransfer

                                                                      AvgDiskUsage

                                                                      AvgPps

                                                                      AvgRT

                                                                      AvgRTLoss

                                                                      AvgUtil-Step

                                                                      BackupVsAllDevices

                                                                      BackupVsNotBackedUp

                                                                      BaselineVsRunning

                                                                      BBExchangeDatabaseFileSize

                                                                      BBExchangeMailboxQuotaUsed

                                                                      BBEXDatabaseAvailability

                                                                      BBEXMailboxSize

                                                                      BBEXReceivedMail

                                                                      BBEXSentMail

                                                                      BBIIS_IISAverageNetworkTraffic

                                                                      BBIIS_SiteDirSize

                                                                      BBIIS_SiteLogDirSize

                                                                      BBIISApplicationPoolAvailability

                                                                      BBIISCpuTop10ProcessesAreaChart

                                                                      BBIISPhysicalMemoryTop10ProcessesAreaChart

                                                                      BBIISSiteAvailability

                                                                      BBIISTop10MultiTab

                                                                      BBIISVirtualMemoryTop10ProcessesAreaChart

                                                                      BBSQLDatabaseAvailability

                                                                      BBSQLDatabaseFileSize

                                                                      Blockers

                                                                      BlockingImpactDeadlocks

                                                                      BlockingImpactTopRootBlockers

                                                                      BlockingImpactTopWaiters

                                                                      CiscoBufferFailures

                                                                      CiscoMMAvgCPULoad

                                                                      CLMMinMaxAverageBpsInOutChart

                                                                      CLMMinMaxAverageCPULoad

                                                                      CLMStoragePerformance

                                                                      CLMStoragePerformanceComparison

                                                                      CLMVolumeReadWriteBandwidth

                                                                      ClustersCPUConsumption

                                                                      ClustersMemoryConsumption

                                                                      ConfigurationChangesSnapshot

                                                                      ContainerAvailability

                                                                      CpuForecast

                                                                      CustomPollerChart_Interface

                                                                      CustomPollerChart_Node

                                                                      CustomPollerMMAChart_Interface

                                                                      CustomPollerMMAChart_Node

                                                                      CustomPollerMMASummaryChart

                                                                      CustomPollerSummaryChart

                                                                      DatabaseResponseTime

                                                                      DatabasesByActiveUserConnections

                                                                      DatastoresIOPSRead

                                                                      DatastoresIOPSTotal

                                                                      DatastoresIOPSWrite

                                                                      DatastoresLatencyRead

                                                                      DatastoresLatencyTotal

                                                                      DatastoresLatencyWrite

                                                                      DeviceEnergyUsage

                                                                      DeviceInventoriedVsNot

                                                                      DiskAllocationFailures

                                                                      DiskQueueLength

                                                                      DiskSize

                                                                      DNSResolutions

                                                                      DPA-LunIOPSPerformance

                                                                      DPA-LunLatencyPerformance

                                                                      DRT_TopApplications

                                                                      DRT_TopDatabases

                                                                      DRT_TopDBUsers

                                                                      DRT_TopMachines

                                                                      DRT_TopOperations

                                                                      DRT_TopQueries

                                                                      DRT_TopWaitInstruments

                                                                      DRT_TopWaits

                                                                      EnabledEWNodesChart

                                                                      EnabledEWNodesDetailsChart

                                                                      EntityEnergyUsage

                                                                      F5Connections

                                                                      F5Throughput

                                                                      GreatestDownwardWaitTimeTrends

                                                                      GreatestUpwardWaitTimeTrends

                                                                      HardwareHealthFans

                                                                      HardwareHealthOverview

                                                                      HardwareHealthPowerSupplyA

                                                                      HardwareHealthPowerSupplyV

                                                                      HardwareHealthPowerSupplyW

                                                                      HardwareHealthSensorAvailability

                                                                      HardwareHealthTemperature

                                                                      HostAvgCPULoad

                                                                      HostAvgMemoryUsage

                                                                      HostAvgPercentMemoryUsed

                                                                      HostCPUConsumption

                                                                      HostMemoryConsumption

                                                                      HostMMAvgMemoryUsage

                                                                      HostNetworkUtilization

                                                                      InInterfaceErrorsDiscards

                                                                      InInterfacePercentUtilization

                                                                      InterfaceAvailability

                                                                      InterfaceDiscards

                                                                      InterfaceErrors

                                                                      InterfaceErrorsDiscards

                                                                      InterfaceUtilizationReceiveForecastChart

                                                                      InterfaceUtilizationTransmitForecastChart

                                                                      MCastPps

                                                                      MemoryForecast

                                                                      MinMaxAvgPerformanceCounter

                                                                      MinMaxAvgRT

                                                                      MMAvgBps

                                                                      MMAvgPps

                                                                      MMAvgRTLoss

                                                                      MMAvgUtil

                                                                      MulticastNodeUtilization

                                                                      MulticastTrafficByGroups

                                                                      MulticastTrafficShareByGroups

                                                                      MultiUnDP

                                                                      NetworkAvailability

                                                                      NetworkAvailabilityRT

                                                                      NetworkAvgFRUtil

                                                                      NetworkAvgRT

                                                                      NetworkAvgUtil

                                                                      NetworkMinMaxAvgRT

                                                                      NetworkTotalBytes

                                                                      NodeART

                                                                      NodeDataVolume

                                                                      NodeNRT

                                                                      NodeTransactions

                                                                      NTA_AreaChart

                                                                      NTA_PieChart

                                                                      OutInterfaceErrorsDiscards

                                                                      OutInterfacePercentUtilization

                                                                      OverallEnergyWiseSavings

                                                                      OverallPowerConsumption

                                                                      PacketLossBar

                                                                      PacketLossLine

                                                                      PercentDiskUsage

                                                                      PercentUtilizationLine

                                                                      PolicyReportViolationsChart

                                                                      ProgressiveLoadTest

                                                                      RunningVsStartup

                                                                      SEUMMinMaxAvgTransactionDuration

                                                                      SEUMMinMaxAvgTransactionStepDuration

                                                                      SEUMPageElements

                                                                      SEUMPlayerLoad

                                                                      SEUMTCPWaterfall

                                                                      SEUMTransactionAvailability

                                                                      SEUMTransactionFromLocationAvailability

                                                                      SEUMTransactionHealthOverview

                                                                      SEUMTransactionLocationsDurations

                                                                      SEUMTransactionLocationTransactionsDurations

                                                                      SEUMTransactionStepAvailability

                                                                      SEUMTransactionStepLocationsDurations

                                                                      SEUMTransactionStepsDurations

                                                                      SiteToSiteTunnelsVpnHealthOverview

                                                                      Sparklines

                                                                      TopART

                                                                      TopDataVolume

                                                                      TopNRT

                                                                      TopTransactions

                                                                      TopXPoolMembers

                                                                      TopXPoolMembersForVirtualServers

                                                                      TopXVirtualServers

                                                                      TopXWideIPDNSResolutions

                                                                      TotalBytesBar

                                                                      TotalDiskIOPS

                                                                      TotalPackets

                                                                      TrafficByCategory

                                                                      TrafficByProductivityRating

                                                                      TrafficByRiskLevel

                                                                      VManIOPSForDatastoreAndTopVMs

                                                                      VManIOPSForVirtualMachine

                                                                      VManLatencyForDatastoreAndTopVMs

                                                                      VManLatencyForVirtualMachine

                                                                      VManTopDatastoreIOLatency

                                                                      VManTopDatastoreIOPS

                                                                      VManTopVMIOPS

                                                                      VManTopVMLatency

                                                                      VMClusterEffectiveMemoryLoad

                                                                      VMClusterMinMaxAvgCPULoad

                                                                      VMClusterMinMaxAvgCPUUsage

                                                                      VMClusterPercentAvailability

                                                                      VMClusterPercentMemoryUsed

                                                                      VMCPUConsumption

                                                                      VMCPUConsumptionOfVM

                                                                      VMCPUReady

                                                                      VMIOPSRead

                                                                      VMIOPSTotal

                                                                      VMIOPSWrite

                                                                      VMLatencyRead

                                                                      VMLatencyTotal

                                                                      VMLatencyWrite

                                                                      VMMemoryConsumption

                                                                      VMMemoryConsumptionOfVM

                                                                      VMMultiChart

                                                                      VMNetworkTraffic

                                                                      VMRunningVMCount

                                                                      VolumeForecast

                                                                      VSANErrorsDiscards

                                                                      VSANTotalBytes

                                                                      VSANTraffic

                                                                      WaitTimeForTopInstances

                                                                      1 of 1 people found this helpful