Quantcast
Channel: THWACK: Document List - Network Performance Monitor
Viewing all 1956 articles
Browse latest View live

Pie charts using PowerShell

$
0
0

In some instances pie charts are better suited than line or bar.  And it just looks cool.     We can use the built in charting of PowerShell to query Orions's database for infomation then powershell charts to draw the pie chart.  Then use the custom html to link to the chart.  To make it dynamic, run the powershell every 5 minutes to keep the chart updated.

 

As as example, we used vendor information, but it can really be any swql query.   It also doesn't have to be a pie chart, it can be a small chart, a 3D chart, etc.

 

Add-Type-AssemblyNameSystem.Windows.Forms

Add-Type-AssemblyNameSystem.Windows.Forms.DataVisualization

$ErrorActionPreference='Stop'

 

# solarwinds access information

$hostname='1.1.1.1'

 

# load the swis snapin

if (-not (Get-PSSnapin|?{ $_.Name -ceq'SwisSnapin' })) {

    Add-PSSnapin'SwisSnapin'

}

 

# connect to the solarwinds server

#$swis = Connect-Swis -Hostname $hostname -Trusted

$swis=Connect-Swis-Hostname$hostname-Username xxxxxxx -Password yyyyyyyy

 

Get-NetIPAddress|SelectIPAddress|%{

    $query='select Vendor, count(*) as Value

from Orion.Nodes

group by Vendor'

 

    $Datas=Get-SwisData$swis$query

}

 

if (-not$Datas) {}

else {

#Write-Output ("Start Manage")

# create chart object

      $Chart=New-objectSystem.Windows.Forms.DataVisualization.Charting.Chart

      $Chart.Width =400

      $Chart.Height =400

      $Chart.Left =20

      $Chart.Top =20

# create a chartarea to draw on and add to chart

      $ChartArea=New-ObjectSystem.Windows.Forms.DataVisualization.Charting.ChartArea

      $Chart.ChartAreas.Add($ChartArea)

# add data to chart

      #$Cities = @{London=7556900; Berlin=3429900; Madrid=3213271; Rome=2726539; Paris=2188500}

      [void]$Chart.Series.Add("Data")

      $Chart.Series["Data"].Points.DataBindXY($Datas.Vendor,$Datas.Value)

      $chart.Series["Data"].ChartType ="Pie"

      $Chart.Series["Data"]["PieLabelStyle"]="Outside"

      $Chart.Series["Data"]["PieLineColor"]="Black"

      #$Chart.Series["Data"]["PieDrawingStyle"] = "Concave"

      ($Chart.Series["Data"].Points.FindMaxByValue())["Exploded"]=$true

      $Chart.Series["Data"][‘PieLabelStyle’]=‘Disabled’

      # Legend

      $Legend=New-ObjectSystem.Windows.Forms.DataVisualization.Charting.Legend

      $Legend.IsEquallySpacedItems =$True

      $Legend.BorderColor ='Black'

      $Chart.Legends.Add($Legend)

      $chart.Series["Data"].LegendText ="#VALX (#VALY)"

      # save chart to file

      $Chart.SaveImage("D:\InetPub\SolarWinds\Orion\Images\Vendor.png","PNG")

    }

 

 

 

References:

https://bytecookie.wordpress.com/2012/04/13/tutorial-powershell-and-microsoft-chart-controls-or-how-to-spice-up-your-reports/

http://www.ciprianpadurariu.ro/tag/powershell/

https://blogs.technet.microsoft.com/richard_macdonald/2009/04/28/charting-with-powershell/

https://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting.chart(v=vs.110).aspx

 

Thanks

Amit


Cisco Nexus 9396PX Node Details

Alert+Action+-+Email+Assignments.xml

Real CPU usage on VMs

$
0
0

The awesome article by Leon (The Ultimate CPU Alert) does the trick to alert us on real high CPU VMs.

 

But sometimes we just want to know about it without alerting.  Just make sure you have the "Processor Queue Length" across all VMs.

 

 

SELECT

n.Caption as [Node]

,n.DetailsURL as [_LinkFor_Node]

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

,n.CPULoad as [CPULoad]

,c.CurrentStatistics.ComponentStatisticData AS [CPU Q Len]

,case when c.CurrentStatistics.ComponentStatisticData > c2.CPUCount then '>'

      when c.CurrentStatistics.ComponentStatisticData < c2.CPUCount then '<'

           else '=' end as [Comp]

,c2.CPUCount AS[cpuCOUNT]

from Orion.nodes n

join Orion.APM.Application a on a.NodeID=n.NodeID

join Orion.APM.Component c on c.ApplicationID=a.ID

INNER join (select c1.NodeID, COUNT(c1.CPUIndex) as CPUCount

   from (select DISTINCT CPUMultiLoad.NodeID, CPUMultiLoad.CPUIndex from Orion.CPUMultiLoad) c1

   group by c1.NodeID) c2 on n.NodeID = c2.NodeID

where c.ComponentName= 'Processor Queue Length'

AND c.CurrentStatistics.ComponentStatisticData > c2.CPUCount

AND N.CPULoad > 90

order by n.CPULoad desc

 

Thanks

Amit

Hardware resource (swql)

$
0
0

There was a need to display just specific hardware information and the built-in resource didn't quite do it.  So, I decided to replicate it using swql for maximum flexibility.

 

In this the server NOC can have hardware faults on their devices and network NOC can have their devices and storage NOC can have just array information.

 

This can also be modified to have it on the "nodes detail" page by filtering on ${nodeid}.

SELECT

n.Caption AS [Node Name]

,n.DetailsUrl AS [_LinkFor_Node Name]

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

,hi.name as [HW Device]

,'/Orion/images/StatusIcons/Small-'+hi.StatusDescription+'.gif' as [_IconFor_HW Device]

--,hi.DetailsUrl AS [_LinkFor_HW Device]

,hi.OriginalStatus

FROM Orion.Nodes n

inner join Orion.HardwareHealth.HardwareItem hi on hi.NodeID=n.nodeid

WHERE -- n.nodeid= ${nodeid}

hi.StatusDescription not in ('up','unknown')

 

Thanks

amit

Synology

Building Simple PerfStack Project Lists With SWQL

$
0
0

In my opinion, PerfStack is the best new thing SolarWinds has given us, since the last best new thing they gave us. PerfStack already has plenty of things going for it, even in its infancy. There are, however, a few things I would like to see improved.

 

My biggest, most important, PerfStack request is definitely improving the automation of building PerfStack "Templates". Here is a very simple workaround to build basic templates for all nodes, automatically.

Building Simple PerfStack Templates With SWQL

 

My next request, provide an easy way for users to access all, or even a subset, of the available PerfStack projects.

 

While we can share links with others, giving them access to saved projects, I still found the need for a simple list of projects, easily accessible. For my environment, "hidden" PerfStack projects do us little to no good. I want my team to be able to see all projects, and access any project they need, at any given moment. The following simple SWQL query will provide an easy way to accomplish this goal.

 

Step 1: Customize a page, adding the "Custom Query" resource, then edit said resource.

Step 2: Copy and paste the SWQL query below, into the resource.

 

This simple SWQL query will generate a list of all PerfStack projects, with clickable links, taking you directly to the project.

SELECT
DisplayName AS [Project]
,'/ui/perfstack/' + ProjectID AS [_LinkFor_Project]
,AccountID AS [Created By]
,UpdateDateTime AS [Last Updated On]
,CreateDateTime AS [Created On]

FROM Orion.PerfStack.Projects

ORDER BY DisplayName ASC

 

Additionally, if you would like to enable search, you will need to add the following in the "Search" query box, located under the main query box.

SELECT
DisplayName AS [Project]
,'/ui/perfstack/' + ProjectID AS [_LinkFor_Project]
,AccountID AS [Created By]
,UpdateDateTime AS [Last Updated On]
,CreateDateTime AS [Created On]

FROM Orion.PerfStack.Projects

WHERE
(AccountID LIKE '%${SEARCH_STRING}%')
OR
(DisplayName LIKE '%${SEARCH_STRING}%')

ORDER BY DisplayName ASC

 

Step 3: View, search, sort, and click through your simple little list of PerfStack projects.

PerfStackTests - Summary_20170614_0812.png

 

 

If you name your PerfStack projects with a little bit of thought, you can filter your SWQL results, only showing a small subset of projects.

 

Example: If you named your projects with a pseudo-label/code, appended to the beginning of the name, you could then build a list which would only show a specific subset of projects.

Let's use the "VLAN" projects for this example.

 

Main SWQL Query:

SELECT
DisplayName AS [Project]
,'/ui/perfstack/' + ProjectID AS [_LinkFor_Project]
,AccountID AS [Created By]
,UpdateDateTime AS [Last Updated On]
,CreateDateTime AS [Created On]

FROM Orion.PerfStack.Projects

WHERE
(DisplayName LIKE 'VLAN_%')

ORDER BY DisplayName ASC

 

Search SWQL Query

SELECT
DisplayName AS [Project]
,'/ui/perfstack/' + ProjectID AS [_LinkFor_Project]
,AccountID AS [Created By]
,UpdateDateTime AS [Last Updated On]
,CreateDateTime AS [Created On]

FROM Orion.PerfStack.Projects

WHERE
(DisplayName LIKE 'VLAN_%')
AND
(AccountID LIKE '%${SEARCH_STRING}%')
OR
(DisplayName LIKE '%${SEARCH_STRING}%')

ORDER BY DisplayName ASC

 

This query will generate the same list of PerfStack projects/links as the first one we did, however, the results are limited to ONLY the "VLAN" projects.

Now you can build your lists based on departments, or types, or anything else you deem necessary.

PerfStackTests - Summary_20170614_0837.png

 

 

Again, nothing ground breaking here... Just a simple way to see a simple list, of very helpful projects.

 

 

 

 

For more ways to customize your SolarWinds environment, make sure to check out this link, by CourtesyIT

How to do various customizations with your Solarwinds

 

 

 

 

Thank you,

 

-Will

Aruba


APC SmartUPS Universal Device Pollers

Adding Live Weather to the "Worldwide Map" Resource

$
0
0

Adding Live Weather to the "Worldwide Map" Resource

 

Summary: This will allow you to add live weather to the worldwide map based on the OpenWeatherMap project (free).

Limitations: The map must be on a page where your can insert HTML/JavaScript. This will probably break during future releases.

Notes: If you want to change the height of your map you must do it within the HTML resource.

Preview:

Capture.PNG

 

Step 1: Get the id of your map element, to do this go to a page where you've inserted the map (don't go to the map page itself). Once there view the source of the page (Ctrl + U in most browsers) and search for the map element (Ctrl + F), search for 'id="worldmap' (without the single quotes but with the double quote). Make note of your map ID, in this case 753.

mapID.PNG

Step 2: Add a HTML resource to the page with the map on it that you would like to modify. To do this go to "Customize Page" >>> "Add Resource To Column X" >>> "Custom HTML".

Step 3: Paste the contents of the attached file into the Custom HTML resource you just added to the page. Make sure you update the file with your map ID you found in step 1 and change others settings you would like to.

How to obtain SNMP v3 passwords from SolarWinds NPM

$
0
0

When I started at my new company, one of the first things I did was bring back to life the SolarWinds environment.  It had not been changed or updated in at least two years.  There were over three hundred down items from devices that were not on the network anymore and another fifty or so duplicate items from people just running Network Discovery and taking in all of the information found.  I also found another five hundred devices that were just using ICMP for the polling method because they “did not see the reason for anything else”. 

 

One of the biggest issues I had was around passwords.  Specifically SNMP Version 3.  The Network team did not want anything to do with me because I was a Server guy and the previous owner of the SolarWinds environment admitted that he had other more important things to do that find what the passwords were.  Solarwinds worked, that is all that mattered.   I tried everything.  I even placed a question on thwack.  The problem was that the password in the database is encrypted, so a direct select statement did not work.

 

After three months, I had consigned myself to the fact that I just had to work a little on the Network team so that they would like me enough to look up the passwords. Even then, that was only the network devices.  I had another three thousand cameras out there with SNMP. 

 

I happen to be setting up new alerts in the system and was adding in some variables when I noticed that there was a field called Privacy that showed the SNMPv3 password. 

 

Hallelujah !!!!!!!  But now, how to get it.  I could not find a way to get an alert variable into a report.  But, with a little help from Google and the Solarwinds knowledge base https://support.solarwinds.com/Success_Center/Network_Performance_Monitor_(NPM)/Track_SNMPv3_credentials_that_are_assigned_to_a_node, I was able to create a process to obtain the passwords. 

 

Here are the steps.

 

NOTE!!!!  Please be kind.  I am a server guy with some scripting skills but not a programmer.  I am sure some of my steps can be easier.  This is just want worked for me. 

 

STEP 1 – Set up an alert

You need to set up a NODE alert.

  • Open Solarwinds and go to Alerts
  • Click on Manage Alerts
  • Click on Add New Alert
  • Name your alert (This really does not matter as the alert will be deleted once you are done, but you do need to remember the name)
  • Set the severity to Notice
  • Click Next
  • This is the tricky part.  You do not want to have to sort through thousands of emails to get the information.  What I did is:
    • Set the “I want to alert on” to Node
    • Under the scope, select “Only following set of objects”.  This will bring up a separate selection screen
      • In the first box, Leave the selection of Node. In the next box, choose Node Name.  Third box shodul say is equal to.  In the last box, just start typing the name of one of your devices (this does not matter now, will change later)
    • In “The actual trigger condition” section, leave Node in the first field.  Second field should be Status.  Third box should be is equal to.  Click the arrow in the last box and choose Up.
    • When you are done, it should look like this

    • Click Next
    • Change the Reset Condition to No reset Action – Manually remove the alert from the active alerts list.

  • Click Naxt
  • Click Next through Time of Day
  • Now we are going to add an Email Action.
    • Click on Add Action.
    • Give you action a name.
    • Recipients should just be yourself.  No need to send passwords to anyone else
    • Under message, you can replace everything else with the following items
      • ${N=SwisEntity;M=SNMPv3Credentials.AuthenticationKey}
      • ${N=SwisEntity;M=SNMPv3Credentials.AuthenticationMethod}
      • ${N=SwisEntity;M=SNMPv3Credentials.PrivacyKey}
      • ${N=SwisEntity;M=SNMPv3Credentials.PrivacyKeyIsPassword}
      • ${N=SwisEntity;M=SNMPv3Credentials.PrivacyMethod}
      • ${N=SwisEntity;M=SNMPv3Credentials.Username}
    • Set your SMTP server

  • Click Next
  • Click Next through Reset Actions
  • Down at the bottom of the screen, you should see that this alert would immediately trigger on 1 Object.  If you see more than that, go back through the instructions.
  • Go ahead and submit
  • You shodul receive one email. 
  • Go back into manage alerts and Disable the alert for now.

Step 2 – Find your SNMP devices.

This part was a little tricky as well.  I did not want to hunt through thousands of devices to find the one or two that had separate SNMP credentials.  Fortunately, this is where the link above to Solarwinds knowledge base saved me. 

 

  • Open an RDP session to your Solarwinds server
  • Go into your programs and look for the “Database Manager” in the SolarWinds group (Not the Database Maintenance but the Manager).  You can also use SQL Management studio if you are so inclined.  I did not have direct access to the database at this time, so this was a workaround
  • Once you have the database manager opened, click on Add Default server
  • Select the correct database
  • Right click on the Database and choose New Query.
  • In the query window, type in SELECT TOP 10000 * FROM [dbo].[NodeSettings] WHERE SettingName LIKE '%SNMP%'
  • Click on the heading “SettingValue” so that it sorts by that value

 

Step 3 – Run the Alert

This is where the big payoff is.  You just need to run through each of these steps until you gather all of the information.  I placed the information in a TXT file and then opened within Excel to separate fields.

 

  • In the left hand window on the Database Manager, find the SolarWinds database and choose New Query
  • In this window, you are going to put in the following query
    • SELECT TOP 10000 Nodesettings.NodeID,Nodes.IP_Address,Nodes.DNS FROM [dbo].[NodeSettings] INNER JOIN Nodes on NodeSettings.NodeID=Nodes.NodeID WHERE SettingName LIKE '%SNMP%' AND SettingValue='####'
  • Replace the #### with the “SettingValue” number that you have listed from the previous query.  It may only be two characters.  You do not need to add 0s
  • Execute the query.  This will bring up all of the devices with that particular SNMP credential set.
  • In Solarwinds, you are going to have two windows open. One on the Manage Nodes screen and one on the Alert Manager screen.
  • In the Manage nodes screen, choose one of the listed devices from the above query and go into Edit Properties.
  • Make sure this node is using Version 3 of SNMP.  When I ran through this, I had one that was version 1. It is a good idea to double check.
  • Once that is verified, go to your Alert Manager window and edit your SNMP alert that you created in Step 1.
  • Go to the Trigger condition screen and type in the name of the node you selected in the Only following set of objects field
  • Next all the way to the end (Solarwinds needs to put in a “Finish” button on these screens)
  • Now Enable the alert
  • Within five seconds, I had my alert.  Depending on your email system, it might take longer.
  • Once you receive the alert in your email.  Disable the alert from Alert Manager.
  • Now you can take a look the alert.  In the alert, you will see the Privacy as well as the authentication password and the username.
  • Once you are done with the information, go to the Database Manager Query window and choose the next “SettingValue” and run through the process again and again until you have captured all of your credentials.

Cisco ASA Failover status

Fortinet -FortiAnalyzer (RAID - DISK HEALTH STATUS)-Universal Device Poller

$
0
0

Universal Device Poller is attached If you are looking to monitor the status for each RAID DISK

 

 

 

Download the attached Poller.

 

Open the Universal Device Poller on the Orion . > File > Import >

SMS Alert Using Send a Get or Post Request to web server

$
0
0

Hello,

 

 

We can use the below method to trigger SMS Alert without having any third party tool, If the Provider has the option of Submitting a message through HTTP(S) API

 

http://URLFORHTTPSAPI?user=USERNAME&pass=PAssword&senderid=SENDERID&mobile=XXXXXXXXX&lang=0&message=${N=SwisEntity;M=ComponentAlert.ComponentName}" of Application "${N=SwisEntity;M=Application.ApplicationAlert.ApplicationName}" on ${N=SwisEntity;M=Application.Node.Caption} is in a ${N=SwisEntity;M=ComponentAlert.ComponentAvailability} state

 

 

One action can trigger SMS to one recipient, you can add multiple actions as required.

Google Maps Integration


Looking for best SQL Server hardware recommendation from Solarwinds ?

$
0
0

Solarwinds Recommend for Optimum Performance you should have SQL with SSD :

 

For more demanding environment its is Strongly recommended for the customer to have the Orion SQL DB on SSD .

 

Traditional Microsoft SQL Server data-base deployments required large data storage typically composed of arrays of rotating hard disks drives (HDD) configured in a storage array network (SAN) over a network connection .

As data volume increases the database performance quickly degrades due to increase I/O and network bottlenecks.

Replacing slower HDD's with faster solid state drives (SSD) instantaneously relives I/O bottlenecks and improves performance but the cost of upgrading a SAN storage can be significant. However performance will be optimum .

 

For more

Reduce Performance Bottlenecks of Microsoft SQL Server Database.

Please see SSD as recommended below.

 

Microsoft SQL Server* on SSD Improving Database Performance

 

For more details about your general questions  please see the post below.

 

  • I have a very large Orion database. What should I check?
  • I have database performance issues. How can i improve my database performance?
  • Why do my Orion database tables have high fragmentation?
  • Why is my Orion database growing so quickly?
  • Why does my Orion performance decrease each day?
  • Why is my Orion Web Console loading data at a slow rate?
  • How can I store a large number of Syslog and Trap files?

Quick Orion database health check guide - SolarWinds Worldwide, LLC. Help and Support

Orion Polling Engine Report

$
0
0

Updated to use hover-overs & expose more details.

 

Polling Engine Report

 

By default, this sorts the Primary Polling Engine first and then all Add'l Polling Engines by Name.

 

If you want to put the SWQL into a Custom Query widget, the code is:

SELECT        CASE                  WHEN [N].Caption IS NULL THEN [E].ServerName                 ELSE CONCAT('<a href="', [N].DetailsUrl, '">', [N].[Caption], '</a>')                END AS [Caption]              , [E].ServerType              , [N].DetailsUrl AS [_LinkFor_Caption]              , ROUND([N].SystemUpTime / 60 / 60 / 24, 2 ) AS [Uptime (Days)]              , MinuteDiff([E].KeepAlive, GETUTCDATE()) AS [Last Checkin (Minutes)]              , [E].Elements AS [Monitored Elements]              , [E].Nodes AS [Monitored Nodes]              , [E].Interfaces AS [Monitored Interfaces]              , [E].Volumes AS [Monitored Volumes]              , [E].Pollers AS [Monitored UnDP]              -- Comment out the follow line if you don't own SAM              , [SAM].ComponentCount AS [Monitored Components]              , [E].EngineVersion              , CONCAT([E].WindowsVersion, '/', [E].ServicePack ) AS [OS/SP]              , [N].CPULoad AS [CPU %]              , [N].PercentMemoryUsed AS [Mem %]              , [E].PollingCompletion AS [Polling Completion %]
FROM Orion.Engines AS [E]
-- Use of LEFT JOIN so that we can show Engines even if we aren't monitoring them... but we should be monitoring them
LEFT JOIN Orion.Nodes AS [N]  ON [E].IP = [N].IP_Address
-- Comment out the follow block if you don't own SAM
-- [BEGIN] SAM Information...
INNER JOIN ( SELECT COUNT([AA].ComponentID) AS ComponentCount                  , [N].EngineID
FROM Orion.APM.Component AS [AA]
INNER JOIN Orion.APM.Application AS [A]   ON [AA].ApplicationID = [A].ApplicationID
INNER JOIN Orion.Nodes AS [N]   ON [A].NodeID = [N].NodeID
WHERE [AA].Disabled = 'False'
GROUP BY [N].EngineID ) AS [SAM]   ON [SAM].EngineID = [E].EngineID
-- [END] SAM Information
ORDER BY [E].ServerType DESC, [N].Caption

 

 

Inspired by Orion_Polling_Engine_Load.OrionReport, I decided to take that and move it to the Web Report.

 

Feedback is appreciated!

Unmanaged Until Report

Coyote Point Systems - Equalizer - Application Delivery Controller MIBs

Time Zone Clocks using javascript

Viewing all 1956 articles
Browse latest View live