Google Map in SolarWinds Orion
Overview
After struggling to make an 8yo script called GoogleHacks work in Orion, for way longer than I should have, I finally said “screw it,” and wrote my own. Three reasons for this: 1) Orion’s back-end schemas have changed, 2) Google’s map API has changed, and 3) the previous author knew nothing about properly formatting code or how to use whitespace.
What You Need
Before you start, there are a couple of things you need:
- The server name, instance name, username, and password where your Orion database lives.
- A Custom Property called “onMap” that is an integer type, applied to all nodes. (This is how you’ll get stuff to show-up on the map.)
- A Google Maps API key.
- A copy of the SimpleMap.ASPX file.
- A text editor (you can use Notepad if you’re a caveman.)
- The location of the Orion root server for the website.
What You Do
- Open SimpleMap.ASPX in your text editor
- Edit TWO parts in SimpleMap.ASPX:
- The SQL connect string on line 9
- The Google Maps API key on line 92
- Save SimpleMap.ASPX
- Move SimpleMap.ASPX to the Orion website root (on my box, this was C:\inetpub\SolarWinds\Orion, but double check your own environment.)
- Add the onMap Custom Property to all nodes and set the nodes you want mapped to have a value of 1 for onMap.
- Make sure the map works by checking it out at http[s]:\\yourserver\Orion\SimpleMap.aspx
- Assuming all went well in testing, add it to SolarWinds by adding a Custom HTML widget with a path of “/Orion/SimpleMap.aspx”.
Conclusion
There’s not a lot to it at this point – the hard parts have been done for you.
This was done on NPM 12.3.