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

Custom Query resource with colors and styles

$
0
0

Many of you may be aware of the beauty of the Custom Query resource when it comes to customisation of the Web Presentation. Simply when a resource/widget is not available out of the box, the Custom Query can do the trick, given that the data to be displayed are in a tabular format.

 

Within the resource, there are hidden gems to beautify the output, also known as the _IconFor_ and _LinkFor_ columns. (See this blog post if you are not familiar with this technique: SolarWinds Orion Custom Query Resource - A Hidden Gem! | Prosperon Networks )

 

So, a regular Custom Query resource would look like this:

 

Today we're going to take it one step further and make it look like this...:

 

 

Another example usage on Citrix Netscaler vserver UnDPs:

 

 

( Quoting wluther for the following content as I really enjoy his documents in this part!)

This mod has been tested against the following SolarWinds environment: (It may, or may not work on other versions)

Orion Platform 2018.4 HF2

Orion Platform 2019.2

Orion Platform 2019.2 HF2

Orion Platform 2019.4

Orion Platform 2019.4 HF1

Orion Platform 2019.4 HF2

Orion Platform 2019.4 HF3

 

WHAT DO YOU NEED?

 

  1. Access to manage views in your Orion environment
  2. Access to your Orion main polling engine (AND any other additional web servers you may have)
  3. HTML skills (not included in this tutorial)

 

 

Before we begin,

 

PLEASE don't edit the system files/database without backing them up first.

If you see a friend or co-worker making changes without backing up first, please alert the authorities.

Friends don't let friends mod without backups.

 

STEPS:

 

1. Download the attached file

2. Make a copy of  \inetpub\SolarWinds\Orion\NetPerfMon\Resources\Misc\CustomQuery.js AND KEEP IT IN YOUR SAFE

3. Copy the attached file (CustomQuery.js) in this document to the above location.

    3a. Repeat as necessary for other Web Servers in your environment 

4. Ready.

 

 

How To Use:

 

Assuming you are familiar with the _IconFor_ and the _LinkFor_ columns, you can now use the _StyleFor_ to apply styling to individual cells.

The above screenshot is based on the following SWQL code, which is reporting the current response time for all nodes with the following conventions:

1. When the response time is less than 0 (node offline) or more than 100ms, then apply the color:red;font-weight:bold;font-size:16px style

2. When the response time is more than 20 ms, apply the following style: color:gold;font-weight:bold

3. If none of the above, just let the style be.

 

SELECT N.Caption AS [Node Name]
,'/Orion/images/StatusIcons/small-' + ToString(N.StatusIcon) AS [_IconFor_Node Name]
,'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(N.NodeID) AS [_LinkFor_Node Name]
,N.ResponseTime
,CASE 
WHEN N.ResponseTime < 0 OR N.ResponseTime > 100 THEN 'color:red;font-weight:bold;font-size:16px'
WHEN N.ResponseTime > 20 THEN 'color:gold;font-weight:bold'
ELSE ''
END AS [_StyleFor_ResponseTime]
FROM Orion.Nodes AS N

 

I'm sure anyone more familiar with HTML than I am will come up with better visual results, so give it a go and let me know how it goes

 

 

Regards,

Antonis


Cisco Wireless Controller 5500 Power Supply Status Pollers ~ CiscoWireless5500-PowerSupply.UnDP

Monitor Cisco ISE appliance in SolarWinds

$
0
0

So you wanna add your ISE appliance in SolarWInds and monitor it via SNMPv3. Sounds straight forward enough, right? Well, not so much.

 

Here’s how I got my ISE appliances added to SolarWinds.

 

First you need to access the CLI of your ISE appliance.

 

You can view SNMP info in the CLI using this command: sh run | inc snmp

 

You need to add in your SNMP if it isn’t already enabled.

Go into config mode then run:

snmp-server enable

 

Next you will need to know your ‘EngineID’. This is the EngineID in SolarWinds.

This can be found by going to your SolarWinds main server.

Open SolarWinds Database Manager

Drill down in the SolarWinds DB and look for “AllEngines”

Execute the query there and it will display your EngineID.

(Or you can run this as a SQL query: SELECT TOP 1000 * FROM [dbo].[AllEngines])

 

Once you have your EngineID you need to go back to your ISE CLI

Get back in enable mode and run:

snmp-server engineID 0x2

(this assumes your EngineID is ‘2’)

Your EngineID must be put in HEX format.

 

Next you need to enter in your SNMPv3 creds

snmp-server host [IP ADDRESS OF YOUR SW SERVER] version 3 [SNMPv3 USERNAME] 0x2 plain authpassword privpassword

(You can use hash instead of plain if you wish)

 

Also:

snmp-server user [SNMPv3 USERNAME] v3 plain authpassword privpassword

(Again, you can use hash instead of plain here)

 

So now you need to exit out of enable mode and wr mem

You may want to verify your edits by running sh run | inc snmp again

 

Once you have your creds in your ISE appliance(s), now we have to get them into SolarWinds.

 

Now, here’s the REAL trick.

Instead of manually ADDING the node into SolarWInds, you need to do a Network Discovery for your nodes.

You can run the discovery on just the IP address or range of IP’s your ISE appliances are on.

 

To do this, go to: Settings > Network Discovery

Click on ‘Add New Discovery’

Follow the wizard and do a scan on either the individual IP addresses of each node one at a time, or enter the IP subnet the appliances are on.

 

The discovery should pick up the appliances and add them as managed nodes using SNMPv3

 

I ran into this issue and had to open a ticket with Cisco TAC. We messed with this for far too long. We kept manually adding the nodes and they would fail to use SNMPv3. Once we did a network discovery, using the exact same creds, it just worked.

 

I hope this helps someone avoid the headache of getting your ISE appliances monitored by SolarWinds.

SAML Single Sign-on

$
0
0

For several years now there has been a growing industry trend towards consolidating user authentication mechanisms by integrating applications into a single sign-on solution. This has the benefit of allowing end-users to authenticate to a variety of different applications throughout the organization using a single set of credentials. For end-users, the benefit is obvious. One set of credentials to remember, regardless of which application they're authenticating to. For the organization though, providing your users with a seamless and transparent single sign-on solution has tremendous security benefits. The first being one security password policy to enforce. Different applications typically implement their own unique password complexity requirements and password expiration policies that are essentially impossible to synchronize across various autonomous systems. The end result is usually either passwords being written down on sticky notes and 'hidden' under keyboards, or routine and unnecessary calls made to the helpdesk to reset passwords for end-users. For these reasons and others, we have received countless requests from people just like you throughout the last few years, requesting Orion support an open standards method of single sign-on.

 

SAML (Security Assertion Markup Language) being the industry standard, was the most oft-requested solution, as there is a wide variety of commercial, free, and open source solutions already available, implemented, and operating in customer environments today. Many of these SAML providers offer the additional added security benefit of supporting multi-factor authentication, such as hardware or software tokens, biometrics such as fingerprints, or facial recognition, and even two-step authentication via cellular using SMS text messages or native mobile apps. Supporting multi-factor authentication has been another frequently requested feature we've also been eager to deliver upon, and with the addition of SAML support to the Orion Platform, this could now become a reality. To that end, this release of NPM 12.4 includes native out-of-the-box support for SAML 2.0 authentication, allowing users to leverage their single sign-on credentials to authenticate to the Orion web console, regardless of the type of credentials used.

 

The following steps outlined below will walk you through how to utilize SAML authentication with Orion. For demonstration purposes, I'll be using Okta as my SAML provider, though you could use ADFS (Active Directory Federation Services) or virtually any other SAML 2.0 provider. The instructions assume you already have Okta installed, running, and users created.

 

 

 

Verify Ports are Open

 

Once you have NPM 12.4 installed in your environment, ensure the Orion server can access Okta by opening a browser on your Orion server and logging into the Okta web interface. This will ensure any ports required between Okta and the Orion server are open. Similarly, you also want to verify your client workstations are also able to access both the Orion web interface, as well as the Okta web portal.

 

Configuring Okta

Create Okta Application

 

1. Once you've verified all necessary ports are opened, you'll want to login to Okta and click 'Admin' from the top menu to access the Okta management interface.

 

2. Click the carrot next to 'Developer Console' if available to expose a drop-down menu. Select 'Classic UI' from the list to switch to the Okta classic interface

 

3. Next, From the Administration page, click 'Applications' from the top menu bar. A drop-down menu will appear. Click on 'Applications' from the list.

 

4. On the 'Applications' page, click 'Add Application'.

 

5. Next, click 'Create New App' on the 'Add Application' page

 

6. Select 'SAML 2.0' from the list of available Sign on methods and click 'Create'.

 

7. In the 'General Settings' step, enter a name for your Orion application in the field next to 'App Name'  I named my application 'aLTeReGo's Orion'.

At this point, you can add an optional Icon that will appear when the user accesses this application directly from within Okta's web portal. If you're looking for an App logo icon, I'm somewhat partial to the one below. Once you've entered a name for your new Okta application click 'next'.

 

7. Open another browser window or tab to obtain your 'Single sign-on URL' and 'Audience URI' required for the next step in the Okta application configuration wizard. Log into your Orion web console and go to [Settings> All Settings> SAML Configuration] and click on the button entitled 'Add Identity Provider'.

 

8. Copy the 'Single Sign-on Service URL' to your clipboard and paste it into Okta's 'Single Sign o URL' field in the SAML settings step of the wizard.

 

9. From Orion's 'Add Identity Provider' page, copy the 'Entity ID' to your clipboard and paste it into the 'Audience URI (SP Entity ID)' field of Okta's SAML configuration wizard.

 

10. When done, the 'General' section of your Okta's SAML Settings Configuration should look similar to the image below.

 

11. Scroll down Okta's SAML Settings page until you reach the 'Attribute Statements (Optional)' section. Create three attributes using the values specified in the following table.

 

NameName formatValue
EmailUnspecifieduser.email
FirstNameUnspecifieduser.firstName
LastNameUnspecifieduser.lastName

 

12. Scroll slightly further down the same page to the section entitled 'Group Attribute Statements (Optional) and create a single attribute using the values shown in the table below

NameName formatFilterValue
GroupNamesUnspecifiedRegex.*

 

Once you've completed steps 11 and 12, verify your 'Attribute Statements (Optional)' and 'Group Attribute Statements (Optional)' field look identical to the following image and click 'Next'.

 

13. If prompted to 'Help Okta support understand how you configured this application' select 'I'm an Okta customer adding an internal app' if asked 'Are you a customer or partner'. Similarly, if you are asked to define the 'App type' select 'This is an internal app that we have created' and click 'Finish'.

 

Grant Okta Users Access to Orion

 

1. Edit the Okta application you just created and click the 'Assignments' tab in the top navigation. Then click the 'Assign' button

 

2. Select from the list of existing Okta users by clicking the 'Assign' button next to their name. Once you've selected all users you wish to access the Orion web console using single sign-on, click 'Done'.

Configuring SAML Authentication in Orion

 

1. Return back to the Orion Web Console and go to [Settings > All Settings > SAML Configuration] and click 'Add Identity Provider'.

 

2. In the 'Add Identity Provider' window click 'Next'

 

3. In the 'Identity Provider Name' enter a friendly name of your SAML provider. Note that the name entered here will appear to your end users when logging into the Orion web console. In my configuration, I named my Identity Provider simply 'Okta' as this is a name well known to my users.

 

4. In a separate browser Window or tab return to the Okta administration console, edit the application you created earlier and click on the 'Sign On' tab. Once there, click on the 'View Setup Instructions' button pictured below.

 

5. Copy the 'Identity Provider Single Sign-On URL' from Okta and paste it into the 'SSO Target URL (Endpoint)' field in Orion.

6. Copy the 'Identity Provider Issuer' from Okta, and past this information into the 'Issuer (Entity ID)' field in Orion

7. Copy the 'X.509 Certificate' in its entirety, including '-----BEGIN CERTIFICATE-----' through to -----END CERTIFICATE----- and paste this into the 'Public Certificate' field in Orion.

 

8. When you're done, the 'Add Identity Provider' wizard should look similar to the following. Once you've validated your changes, click 'Next'.

 

9. On the final step of the 'Add Identity Provider Wizard' simply click 'Save'.

 

10. When you're done you will be returned to the 'SAML Configuration' page. At the top, you will find a slider which allows you to globally enable or disable SAML authentication for Orion. By default, it is enabled once SAML authentication is successfully configured.

 

Creating SAML User Accounts in Orion

 

Now that you have SAML configured both in Okta and Orion, you'll need to create matching SAML user accounts in Orion so can assign permissions and apply any view restrictions you desire, no different than you would any other user in Orion.

 

1. To get started navigate to [Settings > All Settings > Manage Accounts] and click 'Add New Account'.

 

2. In the list of account types to create, choose 'SAML individual account' and click 'Next'.

 

3. In the 'Enter Account Info' step, enter the username of the user you wish to access Orion using SAML authentication into the 'Name ID' field. It's important that this name match identically to what appears in Okta or the user will be unable to login to Orion. Once you've entered the username into the field click 'Next'.

 

4. In the final step of the Wizard, assign any special permissions, views, menu bars, or view limitations you wish the user to have when the login to Orion. When complete, scroll to the bottom of the page and click 'Submit' to save these changes.

 

 

Testing your SAML Authentication

 

1. To test your SAML authentication, log out of the Orion web console or open a different browser from the one you're currently logged in with. E.G. if you're using Google Chrome to configure Orion, open Firefox to test your SAML configuration.

2. When you first access the Orion login page you may notice you now have a new option that wasn't there prior to configuring SAML authentication. Below the usual 'Login' button, there is now an additional button entitled 'Login with Okta'. Okta is the friendly name we gave to our SAML provider in step #3 of 'Configuring SAML Authentication in Orion' above. Click the button 'Login with Okta' to proceed.

 

3. You should now be redirected to the Okta web portal. If you're not already logged into Okta, you will be prompted to authenticate. Simply enter your Okta credentials and click 'Sign in'

 

4. Once you've successfully authenticated to Okta, you should be immediately redirected back to the Orion web console and transparently authenticated

 

Summary

 

As stated earlier, this walkthrough is simply an example of using individual user accounts with Okta. If you've configured Orion SAML authentication, we'd love to hear which identity provider you're using and whether you're leveraging individual user accounts or groups. Also, if you have any tips and tricks or better yet,  a walkthrough on how you configured a different identity provider, we'd love to hear from you!

 

Note that SAML can be used simultaneously in conjunction with all other existing authentication mechanisms supported by Orion, including both Active Directory user and group authentication via LDAP or MSAPI, as well as local Orion user accounts. SAML does, however, require that your IIS be configured to use Forms Based Authentication (default behavior) and cannot be used with Windows Integrated Authentication (optional setting located in the Configuration Wizard).

Using Your Custom HTML Resource To Properly Display SWQL Query Results

How-To: Insert Google Charts (Table Data) within Custom HTML

$
0
0

Here is another example of how to integrate Google Charts into your SolarWinds environment, using an HTML widget, and a SWQL query.

 

 

Please take this, adapt it to your environment, and share what you did back with THWACK.

If you follow the links throughout this post, as well as the links you will find on the previous posts, you will see each example came from someone before. Please consider posting back your results for others to see. I bet you we can build a nice little library of examples with all the feedback.

 

 

How-To Insert Google Charts Within Custom HTML: Table Data Edition

 

This is our endgame here:

The widget in the screenshot above use a "Custom HTML" widget, and the HTML has a SWQL query within it. This is only intended to act as a simple example.

 

 

ESTIMATED TIME TO INSTALL/PERFORM MODIFICATION:<5 Minutes

DIFFICULTY LEVEL:1-Youngling

  1. Youngling(Easiest/Most Basic; no coding experience required, no config wizard required, no system restart required, no system downtime.)
  2. Padawan (Easy/Basic; no coding experience required, possible config wizard required, possible system/services restart required, limited/no downtime.)
  3. Jedi Knight (Moderately Difficult/Advanced; some coding experience required/recommended, config wizard required, possible system/services restart required, limited/short duration downtime.)
  4. Jedi Master (Most Difficult/Advanced; advanced coding experience required, config wizard required, system/services restarts required, 30+ minutes downtime/maintenance window recommended, and other things that I do not even know I would need to know, required...)

 

 

 

This mod was performed on the following SolarWinds environment/versions: (It may, or may not work on other versions)

Orion Platform 2018.4 HF3, SCM 1.1.0, NCM 7.9, NPM 12.4, DPAIM 11.1.1, VMAN 8.4.0, SAM 6.8.0, NetPath 1.1.4

 

 

WHAT DO YOU NEED?

  1. Access to manage views in your Orion environment
  2. The "Custom HTML" resource added to a view
  3. A working method to copy text from the attached file
  4. A working method to paste text, copied in #3 above, into a custom HTML resource, from #2 above.

 

 

Before we begin, (while the following is certainly a good practice, it actually doesn't apply to this customization, for once.)

 

PLEASE don't edit the system files/database without backing them up first.

If you see a friend or co-worker making changes without backing up first, please alert the authorities.

Friends don't let friends mod without backups.

 

 

"If it's not broke, then fix it until it is."

     -The smartest person ever

 

 

STEPS:

     -Download/Open the attached file.

     -Login to you Orion environment.

          -Navigate to the "Custom HTML" resource you want to display the calendar.

               -Click edit.

     -Copy the contents of the attached file.

     -Paste the contents of the attached file into the "Custom HTML" resource you have opened to edit.

     -Click to save the resource edit.

     -Enjoy you new calendar view.

 

 

 

The SWQL Query:

 

SELECT TOLOCAL(EventTime) AS EventTime\
,Events.EventTypeProperties.Name\
,Message\
FROM Orion.Events\
WHERE YEAR(TOLOCAL(EventTime)) = YEAR(GETDATE())\
AND MONTH(TOLOCAL(EventTime)) = MONTH(GETDATE())\
AND DAY(TOLOCAL(EventTime)) = DAY(GETDATE())\
AND Events.EventTypeProperties.Name NOT IN ('Interface Changed','Interface Disappeared','Interface Reappeared')\
AND Message NOT LIKE 'Read or write latency on virtual %'\
AND Message NOT LIKE '%virtual%'\
GROUP BY EventTime, Events.EventTypeProperties.Name, Message\
ORDER BY EventTime DESC\

 

Notice the \ character at the end of each line. This allows me to break the SWQL query down to multiple rows. If you choose to keep the query on a single line, then you will not need to use the \ character. Also note, if you copy this query into SWQL studio without removing the \ characters, it will not process correctly.

 

 

 

The HTML:

 

The very first line of the HTML should only exist 1 time per page.

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

If you are adding multiple Google Charts on the same page, you will need to remove the line shown above from all except the first chart/widget.

 

Additionally, you will need to rename the div id on each additional chart.

var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(data, options);
}
}
})    </script>  </head>  <body>    <div id="table_div"></div>

 

In the example above, you will see "table_div" is the name of the div, and it is referenced 2 times. Both occurrences should match each other for each chart. If you use the same div id on multiple charts, on the same page, you may only see 1 chart actually load.

 

 

 

 

 

Links To Other Goodness:

 

Here is a link to the first example, which dgsmith80 shows the hover over values directly on the bar chart.

How-To: Insert Google Charts within Custom HTML

 

Here is a link to the first version of our Google Charts examples, which is a calendar with dynamic pie charts and table data.

Using Your Custom HTML Resource To Properly Display SWQL Query Results

 

Here is an example from jhaas, showing how to track outages on a Calendar and dynamic Timeline chart.

Interactive Node Outage tracker

 

Here is an example of just the Timeline chart.

Using Your Custom HTML Resource To View Events On A Timeline

 

Here is an example from elevate, showing how to do a Google Pie chart.

(This post was actually done a while back, far before the post I'm making now. I must have missed it in my bookmarks, otherwise I would have skipped this example, as elevate's example is already great!)

Google Charts | Pie Charts

 

Here is another example of a Google Pie chart.

How-To: Insert Google Charts (Pie Chart) within Custom HTML

 

 

 

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

Arista Node Details

Arista Node Details.poller


Aruba/HP Switches

Node and Alert SWQL - link a node and an applicable alert via custom query

$
0
0

With the help of antonis.athanasiou (yay MVP collab!), I came up with the following born out of need:

 

SELECT TriggeredDateTime
,OAA.AlertObjects.Node.Caption as [Node] --find nodes
,OAA.AlertObjects.Node.CPULoad --change this to any relevant node metric
,OAA.AlertObjects.Node.DetailsUrl as [_LinkFor_Node] --add hover information and link
,'Link to Alert' as [Link]
,'https://YOURSERVERNAME/Orion/View.aspx?NetObject=AAT:' + TOSTRING(OAA.AlertObjects.AlertObjectID) AS [_LinkFor_Link] 
--point above to YOUR SERVER NAME OR IP
FROM Orion.AlertActive OAA 
WHERE TriggeredMessage LIKE 'High CPU Utilization with Top 10 Processes' --ALERT DESCRIPTION
--so this custom query will let you list nodes and an applicable filtered alert. 
--This way you can get node status + node alert status all in one go

 

So the gist is this. You specify what alert and what you want to display in your nodes via #SWQL, pop it into a custom query widget, and then you get nodes with their status (maybe the status is associated with the relevant alert).

In my case, I want to display CPU status of the nodes that trigger the high cpu utilization. Pop it all into a custom query and you get this:

 

as a great handy small widget to show you the reason why this node is in alert, because as of last poll it was at....96% CPU. Plus hover information thanks to handy dandy SWQL macros. This will put together the link to the alert as mentioned.

[Report] Devices Not Responding To SNMP, WMI Or Agent Queries

Where is utopia?

$
0
0

Who is in control? I am sure that’s a question that is often debated in conference rooms around the world. There are many recommendations that are adopted to help define who is ultimately  responsible. Yet no governance strategy does anything except to reinforce it’s defined policies and practices as outlined. There is often no measurement to determine if those practices are even compatible with how services are being used. Too often solving one problem creates unintended additional problems. Layering in more complexity. Reinforcing policies and procedures that only add overhead. Reducing agility when that could be the most important resource required. No matter what processes are being followed if you are working in any role in the catch all basket called operations, You need to know what is happening. You are often the person who is responding to text messages in the middle of the night. You are the first person to create a conference call over many things that ultimately are out of your direct control. Despite being the key to keeping everything running there are only a few things that you can actually influence or decide for yourself. Day to day marching forward just hoping to keep the phone from ringing. Only in those quiet moments can you contemplate how to prevent that next email or text message in the middle of the night. So despite your low ranking in the organization it’s time to take control of this situation.

Such a rag-tag collection of technology. Various providers, consultants, developers, contractors, internal infrastructure teams, numerous applications, and business units. With every phone call, email and text message seems nearly impossible to juggle each priority. There is no simple solution. Gathering together disparate teams often representing conflicting interests. Building trust across these factions is never easy. Each group with supporting specialized tools, many technology specific, locked into a limited view, missing out on the big picture. This leaves gaps in support, missing opportunities for integration and efficiency.

Where can you start? There is often common goals to deliver the highest quality at the lowest cost. Yet there is often resistance to change. A long time ago, technology services were provided in the smallest possible footprint. File and print servers, internal email, specific business related applications. In the early days these services barely extended beyond the foundation of the location where the users worked. Today it’s something different but the concepts of providing services remains the same. Each service delivery is supported by a group somewhere. The users of those services are also somewhere. In every case these services require a network. A view into the health of these services without details of the network leaves out much of what could go wrong. Yet too often there is no apparent network related issue for any given incident. Integrated monitoring of network performance in conjunction with monitoring of service infrastructure and when possible application monitoring is key to success. Being able to display the big picture that can be drilled down on to learn specific details. Connecting teams, correlating information between teams and tools used by these teams. Shortening problem resolution, leaving managers and end users with a higher confidence that technology is actually responding to their needs. 

Various tools exist attempting to occupy this space. Many complex highly integrated systems that often prove to be more complicated than the problem that actually needs to be solved. Too often by the time these systems are deployed and customized and users of the tool are trained, the very specifics of what was going to be delivered has shifted. This results in tool development continuing as if attempting to catch up to meet the evolving requirements. Too often even these tools don’t actually cross the boundaries between technology groups. Despite the advanced capabilities the very scope of deployment is limited to specific groups in technology. Leaving out many of the advantages while still being touted as enterprise wide with the cost of being enterprise wide. These tools often require a dedicated team for support leaving yet another faction with a self serving interest in maintaining the status quo.

So it does come down what tools you use. To achieve better integration a tool must not be limited in scope. A shared tool in which users from various teams have access. Each individual being able to get a big picture and specifics for their related supported technology. When an application team can see that the network is up and available they will likely look elsewhere before calling for network support. An infrastructure team can quickly determine that all required services are up before or after rebooting a virtual machine. Network teams can devote resources to drinking more coffee. When the network is trusted other technology issues come into better focus. Of course there will be moments when all of that utopia flies out the window. Imagine that other technology groups are quickly informed when a network issue exists. Leaving network resources more time to resolve an issue and less time talking about it. Having one pane of glass to work from is almost better than a conference call. Possibly in conjunction with a conference call where everyone can agree on what the next steps should be. Having a tool where users of the tool actually configure the tool to meet the current need. No turn around, or development or addition cost. A tool that is simple to use, with an intuitive interface that can be used with a minimal amount of formal training. A tool that is owned by those users of the tool. A tool that fosters collaboration between teams. A tool that is modular that does not require total replacement to meet additional requirements. There is one obstacle, changing the status quo. Yet it is clear something must change the status quo is not instilling confidence or reducing cost. The marching orders have been issued, “Do more with less”. Using a tool that brings teams together, reduces incident cycle time, has the flexibility in terms of modularity and cost, and does not require much overhead are all essential requirements.

Are you wondering where you can find a tool like this? 

 

PerfStack Custom Colors

$
0
0

Recently in a conversation with some Thwack MVPs there was some lamenting over PerfStack™ color palette. I had a few minutes so I decided to look into it. This is a quick write up from the results of that conversation.

 

 

I found the path for the cascading style sheets is here: \inetpub\SolarWinds\ui\modules\perfstack\css

 

At the moment I do not understand the difference between perfstack.css and the perfstack.min.css - how they interact or if only one is necessary. The kicker for a simple search and replace is the values in perfstack.min.css don't exactly match what is in perfstack.css. An example is .color-1 rgba(181, 34, 0, 0.8) will be in perfstack.css and .color-1 rgba(181,34,0,.8) will be in perfstack.min.css. The spaces are removed and the leading zero on the saturation is dropped. In addition, perfstack.min.css has no CR/LFs, so it is one line. It would be nice to understand the relationship between the two files. Is perfstack.css used as the base and the perfstack.min.css was created after the web server started? Otherwise, it can be a little painful but you only have to do it once.

 

I thought it would be neat to be able to create several sets of files based on some "top x" list of web color schemes then post them with an article saying, if you want to use this color palette use this perfstack_Iowa_State_.css file set and replace your originals. Or perhaps write a PowerShell script that would take a file containing a color palette of your design and create the PerfStack™ color palette files for you. Alas, I do not have the time right now to do either of these things.

 

 

So using the site http://paletton.com and data from the Iowa State University web site I created a scheme based on Iowa State University. There are five basic colors from ISU, but there are 17 in the css. I used the basic colors and had paletton give me the rest of the color palette to create the two files. After making a backup of the original file and storing it in a safe place, simply replace perfstack.min.css on the web server with the perfstack.min.IowaState.css file. Do the same with perfstack.IowaState.css and perfstack.css.

 

The files use a combination of HEX and RGBA color definitions. The colors are paired up in different classes so that the legends in PerfStack™ and the charts match up.These color changes will effect all your PerfStack™ charts.

 

I hope to expand upon this as time permits. [I used Iowa State since my boss went there, my undergraduate school didn't have a football team.]

Example of PerfStack Colors

NetScaler CPU/RAM

Alternative Perfstack Colors


Obtaining Lat/Long Coordinates Using Google's Geocoding API

$
0
0

About the Geocoding API

Google's Geocoding API provides a way to convert physical addresses into geographic coordinates. We can leverage this service to obtain the latitude and longitude coordinates for a list of cities or street addresses.

To use the Geocoding API, you must first obtain an API key. When you first sign up, Google will give you a $300 credit to use within a year, and then a $200 credit each month. These will allow you to use the API for free. Check out their pay-as-you-go pricing model here.

Once you sign up and obtain an API key you may begin making requests!

 

Example Request

 

<https://maps.googleapis.com/maps/api/geocode/json?address=405+Brushy+Creek+Road,+Cedar+Park,+TX&key=YOUR_API_KEY> 

 

 

Sending that Request with PowerShell

$url = "<https://maps.googleapis.com/maps/api/geocode/json?"> 
$params = @{ address = "405 Brushy Creek Rd, Cedar Park, TX"; key = $APIKEY }  

Invoke-WebRequest $url -Method Get -Body $params -UseBasicParsing | ConvertFrom-Json 

 

 

Complete PowerShell Script

Of course, it would be better if we had a list of locations and were able to convert them all at once. For that, we can write a PowerShell script that reads a CSV of locations, iterates through each entry, and writes the response to a CSV.

Check out the full repo at Loop1's GitHub: https://github.com/loop1systems/geocoder

 

param (
 [Parameter(Mandatory = $true)][string]$inputFile
 )  

$APIKEY = "thisIsMyAPIKEY"  

# Verify that the API key is not empty
 if ($APIKEY -eq $null -or $APIKEY -eq "") {
   Write-Output "Please provide an API key."   Exit
 }  

# Read input csv
 $locations = Import-Csv -Path $inputFile -Header "location"  

# Geocoding endpoint
 $url = "<https://maps.googleapis.com/maps/api/geocode/json?">  

# arraylist for storing response
 $locData = New-Object System.Collections.ArrayList
 foreach ($loc in $locations) {
   # build the query parameters   $params = @{ address = $loc ; key = $APIKEY }   # send API request   $response = Invoke-WebRequest $url -Method Get -Body $params -UseBasicParsing | ConvertFrom-Json  if ($response.status -ne "OK") {    $response.error_message    Exit  }    $detailsObject = [PSCustomObject]@{     location = $loc.location     lat      = $response.results.geometry.location.lat     lng      = $response.results.geometry.location.lng   }    $locData.Add($detailsObject) | Out-Null 
}  

$locData | Export-Csv -Path "lat-long.csv" -NoTypeInformation

 

 

P.S. Stay tuned for a post about how to use this data to create World Map Points!

----------------------

Ana Cruz

Loop1 Systems

How-To: Insert Google Charts (Pie Chart) within Custom HTML

$
0
0

I was recently talking with dgsmith80 in regards to showing the hover over values directly on the bar chart. He was able to get it working, however, as the conversation continued, and more folks joined in, we came to the conclusion we need more SolarWinds specific examples of these charts. As dgsmith80, KMSigma, and myself discussed, here is another example of how to integrate Google Charts into your SolarWinds environment, using an HTML widget, and a SWQL query.

 

 

Please take this, adapt it to your environment, and share what you did back with THWACK.

If you follow the links throughout this post, as well as the links you will find on the previous posts, you will see each example came from someone before. Please consider posting back your results for others to see. I bet you we can build a nice little library of examples with all the feedback.

 

 

 

How-To Insert Google Charts Within Custom HTML: Pie Chart Edition

 

This is our endgame here:

 

Both widgets in the screenshot above use the same HTML and SWQL query, however, I simply did a top 10 for the left one, and top 5 for the right one. This is only intended to act as a simple example.

 

ESTIMATED TIME TO INSTALL/PERFORM MODIFICATION:<5 Minutes

DIFFICULTY LEVEL:1-Youngling

  1. Youngling(Easiest/Most Basic; no coding experience required, no config wizard required, no system restart required, no system downtime.)
  2. Padawan (Easy/Basic; no coding experience required, possible config wizard required, possible system/services restart required, limited/no downtime.)
  3. Jedi Knight (Moderately Difficult/Advanced; some coding experience required/recommended, config wizard required, possible system/services restart required, limited/short duration downtime.)
  4. Jedi Master (Most Difficult/Advanced; advanced coding experience required, config wizard required, system/services restarts required, 30+ minutes downtime/maintenance window recommended, and other things that I do not even know I would need to know, required...)

 

 

This mod was performed on the following SolarWinds environment/versions: (It may, or may not work on other versions)

Orion Platform 2018.4 HF3, SCM 1.1.0, NCM 7.9, NPM 12.4, DPAIM 11.1.1, VMAN 8.4.0, SAM 6.8.0, NetPath 1.1.4

 

 

WHAT DO YOU NEED?

  1. Access to manage views in your Orion environment
  2. The "Custom HTML" resource added to a view
  3. A working method to copy text from the attached file
  4. A working method to paste text, copied in #3 above, into a custom HTML resource, from #2 above.

 

 

Before we begin, (while the following is certainly a good practice, it actually doesn't apply to this customization, for once.)

 

PLEASE don't edit the system files/database without backing them up first.

If you see a friend or co-worker making changes without backing up first, please alert the authorities.

Friends don't let friends mod without backups.

 

 

"If it's not broke, then fix it until it is."

     -The smartest person ever

 

 

STEPS:

     -Download/Open the attached file.

     -Login to you Orion environment.

          -Navigate to the "Custom HTML" resource you want to display the calendar.

               -Click edit.

     -Copy the contents of the attached file.

     -Paste the contents of the attached file into the "Custom HTML" resource you have opened to edit.

     -Click to save the resource edit.

     -Enjoy you new calendar view.

 

 

 

The SWQL Query:

 

SELECT TOP 10\
Events.EventTypeProperties.Name\
,COUNT(*) AS Qty\
,TOSTRING(COUNT(*)) AS Label\
FROM Orion.Events\
WHERE YEAR(TOLOCAL(EventTime)) = YEAR(GETDATE())\
AND MONTH(TOLOCAL(EventTime)) = MONTH(GETDATE())\
AND DAY(TOLOCAL(EventTime)) = DAY(GETDATE())\
GROUP BY Events.EventTypeProperties.Name\
ORDER BY Qty DESC\

 

Notice the \ character at the end of each line. This allows me to break the SWQL query down to multiple rows. If you choose to keep the query on a single line, then you will not need to use the \ character. Also note, if you copy this query into SWQL studio without removing the \ characters, it will not process correctly.

 

 

 

The HTML:

 

The very first line of the HTML should only exist 1 time per page.

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

 

If you are adding multiple Google Charts on the same page, you will need to remove the line shown above from all except the first chart/widget.

 

Additionally, you will need to rename the div id on each additional chart.

var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
}
})    </script><div id="piechart" style="width: 900px; height: 500px;"></div>

 

In the example above, you will see "piechart" is the name of the div, and it is referenced 2 times. Both occurrences should match each other for each chart. If you use the same div id on multiple charts, on the same page, you may only see 1 chart actually load.

 

 

 

 

 

Links To Other Goodness:

 

Here is a link to the first example, which dgsmith80 shows the hover over values directly on the bar chart.

How-To: Insert Google Charts within Custom HTML

 

Here is a link to the first version of our Google Charts examples, which is a calendar with dynamic pie charts and table data.

Using Your Custom HTML Resource To Properly Display SWQL Query Results

 

Here is an example from jhaas, showing how to track outages on a Calendar and dynamic Timeline chart.

Interactive Node Outage tracker

 

Here is an example of just the Timeline chart.

Using Your Custom HTML Resource To View Events On A Timeline

 

Here is an example of showing simple table data.

How-To: Insert Google Charts (Table Data) within Custom HTML

 

And here is an example from elevate, showing how to do a Google Pie chart.

(This post was actually done a while back, far before the post I'm making now. I must have missed it in my bookmarks, otherwise I would have skipped this example, as elevate's example is already great!)

Google Charts | Pie Charts

 

 

 

 

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

Create Worldwide Map Points Using Custom Properties and Google's Geocoding API

$
0
0

After learning a little bit about the Geocoding API and using it to obtain a list of latitude and longitude coordinates, I wanted to take a step forward and apply it to automate the creation of points for the Worldwide Map. If you saw the previous document, Obtaining Lat/Long Coordinates Using Google's Geocoding API, and checked out Loop1's GitHub repo, you might have already seen this script. Here is the thinking behind it.

 

Prerequisite:

  1. Create a nodes custom property called "City" and populate it with the location of each node. For example, "Austin, TX".

 

Script:

  1. Get a list of all the unique values currently set for the "City" custom property.
  2. For each city, send a request to the Geocoding API to get the latitude and longitude coordinates.
  3. For each node that you wish to add to the map, read the value of its "City" custom property and get the matching latitude and longitude coordinates obtained in the previous step.
  4. If a point does not already exist for this node, create it.
  5. If a point already exists for this node, update it. (Maybe it's in a different city now.)

 

Here is the full script:

$APIKEY = "" 

# Verify that the API key is not empty 
if ($APIKEY -eq $null -or $APIKEY -eq "") {
     Write-Output "Please provide an API key."     Exit 
}

# Connect to SolarWinds
$swis = Connect-Swis -Hostname "" -Username "" -Password ""

# Query SolarWinds for distinct values in the City custom property 
$cities = Get-SwisData $swis "SELECT DISTINCT City FROM Orion.NodesCustomProperties WHERE City IS NOT NULL" 

# Geocoding base url 
$url = "https://maps.googleapis.com/maps/api/geocode/json?" 

# hash table for storing response 
$cityData = @{ }

# Iterate through cities 
foreach ($city in $cities) { 
     if ($cityData[$city] -ne $null) {           Continue      }      # build the query parameters      $params = @{ address = $city ; key = $APIKEY }      # send API request      $response = Invoke-WebRequest $url -Method Get -Body $params -UseBasicParsing | ConvertFrom-Json      # check response status      if ($response.status -ne "OK") {           $response.error_message           Exit      }      # add the response to the hash map      if ($response.results.geometry.location -is [system.array]) {           $cityData[$city] = $response.results.geometry.location.lat[0], $response.results.geometry.location.lng[0]      } else {           $cityData[$city] = $response.results.geometry.location.lat, $response.results.geometry.location.lng      } 
}

# Query SolarWinds for a list of NodeID & City 
$nodes = Get-SwisData $swis "SELECT n.NodeID, cp.City FROM Orion.Nodes n JOIN Orion.NodesCustomProperties cp ON n.NodeID = cp.NodeID WHERE cp.City IS NOT NULL" 

# Iterate through each node 
foreach ($node in $nodes) { 
     # Get the lat/long coordinates matching the node's city          $coordinates = $cityData[$node.City]      # Query SolarWinds for a matching point uri      $pointUri = Get-SwisData $swis "SELECT Uri FROM Orion.WorldMap.Point WHERE InstanceID = $($node.NodeID) AND Instance = 'Orion.Nodes'"      # If no point exists for this NodeID     # create Orion.WorldMapPoint      if ($pointUri -eq $null) {           "creating point for node $($node.NodeID)"           $pointProperties = @{                Instance = "Orion.Nodes";               InstanceID = $node.NodeID;                Latitude = $coordinates[0];                Longitude = $coordinates[1];                StreetAddress = $node.City;           }           New-SwisObject $swis -EntityType "Orion.WorldMap.Point" -Properties $pointProperties | Out-Null      }      # If a point exists for this NodeID      # Update Orion.WorldMapPoint      else {           "updating point for node $($node.NodeID)"           $pointProperties = @{                Latitude = $coordinates[0];                Longitude = $coordinates[1];                StreetAddress = $node.City;           }           Set-SwisObject $swis -Uri $pointUri -Properties $pointProperties      } 
}

 

And my resulting map:

 

Possible Modifications:

  • Use a specific address instead of just the city.
  • Use the location node property instead of creating a custom property.
  • Apply this to groups instead of nodes.

 

----------------------

Ana Cruz

Loop1 Systems

SWQL - Active Alerts Report

Node Uptime Report (swql)

$
0
0

Someone asked for a node up report and I came up with this one.  The person asked for the ability to search for vendor as well as node name and IP address.  And duration in a easy to read format.

 

SELECT

n.Caption AS [Node Name]

,DetailsUrl AS [_LinkFor_Node Name]

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

,n.IP_Address as IP_Address

,DetailsUrl AS [_LinkFor_IP_Address]

,'/NetPerfMon/Images/Vendors/' + n.VendorIcon as [_IconFor_IP_Address]

,tostring(tolocal(n.LastBoot)) as LastBoot

,CONCAT(HOURDIFF(tolocal(n.LastBoot),getdate())/24,' Day(s) ',

        HOURDIFF(tolocal(n.LastBoot),getdate())-(HOURDIFF(tolocal(n.LastBoot),getdate())/24)*24,'h ',

        MINUTEDIFF(tolocal(n.LastBoot),getdate())-(MINUTEDIFF(tolocal(n.LastBoot),getdate())/60)*60,'m') AS Duration

FROM Orion.Nodes n

WHERE n.LastBoot IS NOT NULL

and

(n.caption like '%${SEARCH_STRING}%'

or n.ip_address like '%${SEARCH_STRING}%'

or n.vendor like '%${SEARCH_STRING}%')

ORDER BY MINUTEDIFF(tolocal(n.LastBoot),getdate())  desc

 

 

Thanks

Amit

Viewing all 1956 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>