Submit a ticketCall us

Quickly Address Software Vulnerabilities
Patch Manager is an intuitive patch management software which extends the capabilities of WSUS and SCCM to not only patch Windows® servers and workstations, and Microsoft® applications, but also other 3rd-party applications which are commonly exploited by hackers. Learn More.

 

Home > Success Center > Network Performance Monitor (NPM) > Integrate Google Maps to NPM

Integrate Google Maps to NPM

Table of contents
Created by David Clark, last modified by Rodim Suarez on Aug 02, 2016

Views: 140 Votes: 1 Revisions: 7

Overview

This article describes how to integrate Google Maps into your Orion NPM Web Console.

Environment

NPM  11.5.3 and earlier

Steps

Google Maps Integration into NPM

How-to video

Disclaimer: Please note, any custom scripts or other content posted herein are provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software that you have purchased from SolarWinds, and the information set forth herein may come from third party customers. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. Any custom scripts obtained herein are provided to you “AS IS” without indemnification, support, or warranty of any kind, express or implied. You elect to utilize the custom scripts at your own risk, and you will be solely responsible for the incorporation of the same, if any.

Use at your own risk

 

Known Issues

There is an issue with the maps when loading into the new browser windows in Internet Explorer, however this works just fine in Firefox and Chrome. If you do not use IE, the drill-down behavior can be changed to launch new browser windows when drilling down from map to map.

Look for the HTML code that defines target=_parent and change to target=_blank. These can be found in the MyStateHack.aspx (Line 14), MyCityStateHack, and MyBuildingCityStateHack.aspx (the "menu" pages). You can choose to stay within the iFrame for navigation simply to support IE alongside your favorite Brand-X browsers. There were cases that this did not work in IE.

Objective

The purpose of this is to take the path all the way down to the building/site level, however at this time the path stops at 'City.'   

Requirements

Your Orion server will need to have Internet access to the following websites to load the maps and weather: maps.google.com, wunderground.com and weather.gov.

Installation Procedure

  1. Deposit the ASP Pages into the inetpub directory on the Orion Server that is hosting your Orion Web Console.
  2. Create the folder GoogleHack:  C:\inetpub\SolarWinds\Orion\GoogleHack\.
  3. For each ASP page, locate and configure the database connection string:  A DB Conn String looks like:

oConn = New System.Data.SQLClient.SQLConnection ("server=SQLSERVER\INSTANCE; initial catalog=YOURDATABASE;uid=DATABASEUSER;pwd=DATABASEUSERPASSWORD")

  1. Open the Custom Properties Editor on the Orion server, and create Latitude, Longitude, Country, State, and City text properties for the Nodes table. Populate these properties.

Note:  State: The Two letter state code is hard coded, so you will want to use same for your US states in Custom Properties. Just to show that I'm not entirely inflexible or consistent, our non-US sites received a three letter country code in place of the states.

  1. Country: MyHack.aspx uses Country to filter nodes for Country='US' - This may not be entirely necessary for you, and if no nodes exist outside of the US, remove AND country='US' from the query (MyHack.aspx Line 20), and you can ignore using Country as a custom property.
  2. In the Orion Web Console page where you want to add the map, customize this page and add a Custom HTML Resource to the page. Below is an example iFrame:
    1.  <iframe src="/Orion/GoogleHack/MyHack.aspx" width="100%" frameborder=0 height=600 scrolling=no align=center></iframe>

  

Finding Your Latitude & Longitude Values

There are two ways to do this:

  1. Go to maps.google.com, then grab the link http://screencast.com/t/21QjuNvBa
    https://maps.google.com/maps=austin,+tx&hl=en&sll=37.0625,-95.677068&sspn=48.15347,70.927734&t=h&hnear=Austin,+Travis,+Texas&z=11
  2. Go to http://itouchmap.com/latlong.html.

 

Weather On/Off or looping

  • To change the weather portion from looping to static & back, just switch the commenting to the other link (Lines 186 & 187 from MyHack.aspx)
  • To turn weather off, comment the weather section out (weather is currently enabled only on the first page because it gets too busy when you drill down). If you need an example of no weather, look at the MyStateMapHack.aspx. The code is there in case you wanted to have it added back. You can also choose to either hard code the radar and map type, or pass it along to the next map.
  • Download the Google Map API.

 

Additional notes and hints

You can use custom icons instead of the default LEDs for status, the path is defined in the code and it is worth mentioning because it is easy. For example, you will see in MyHack.aspx (Line 78):

var image_dir = '/Orion/images/StatusIcons/Small-';

This can be manipulated into something like:  var image_dir = '/Orion/images/StatusIcons/Small-Purple-Bunnies-';

...Assuming your icons all read like 'Small-Purple-Bunnies-Warning.jpg'

 

For more information, see this Thwack topic.

Last modified
18:43, 1 Aug 2016

Tags

Classifications

Public