SELECT SUM(a.global) as Total_Sessions_Global, SUM(a.nala) as Total_Sessions_NALA, SUM(a.emea) as Total_Sessions_EMEA, SUM(a.apac) as Total_Sessions_APAC FROM (SELECT (case WHEN AssignmentName <Case_1> then Rate END) as global, (case WHEN AssignmentName <Case_2> then Rate END) as nala, (case WHEN AssignmentName <Case_3> then Rate END) as emea, (case WHEN AssignmentName <Case_4> then Rate END) as apac FROM Orion.NPM.CustomPollerStatusOnNodeScalar ) as a
The criteria used to select statistics for each region are dependent on your network architecture and naming standard (in our case it's 'LIKE '%<Custom_Poller_Name>%<Partial_Hostname>%', where Partial_Hostname is common for all ASAs located in a certain regional DC).
2. Regional VPN charts: In our case we display active connections per ASA, peak receive and transmit bps for the Outside interface and Peak CPU utilization (feel free to use whatever makes sense to you).
3. Custom HTML widgets.
Now comes the fun part:
Each widget (three in total) is aligned next to regional charts (by patiently adjusting the Height parameter on the Tall Blank Space widgets) and contains ASA Hostname, Status, Current Active Sessions, Peak Concurrent Sessions and Max Supported Sessions. Colors also change automatically when warning/critical thresholds are reached (WARNING - yellow - active connections >= 85% max supported AND active connections < 95% max supported; CRITICAL - red - active connections >= 95% max supported).
Code is attached, the only thing I would highlight is the queries that generate the content of each widget (again, we have three groups of ASAs, one per region; that might not be appropriate to you):
switch(region) { case "NALA": query= "SELECT n.Caption as Hostname,REPLACE(n.StatusIcon,'.gif','') as Status,n.CustomPollerAssignmentOnNode.CustomPollerName,n.CustomPollerAssignmentOnNode.CurrentValue,n.CustomProperties.VPN_Session_Effective_Limit FROM Orion.Nodes n WHERE n.Caption <Case_Region_1> and n.CustomPollerAssignmentOnNode.CustomPollerName LIKE '%_Session%' ORDER BY n.Caption ASC,n.CustomPollerAssignmentOnNode.CustomPollerName ASC"; break; case "APAC": query= "SELECT n.Caption as Hostname,REPLACE(n.StatusIcon,'.gif','') as Status,n.CustomPollerAssignmentOnNode.CustomPollerName,n.CustomPollerAssignmentOnNode.CurrentValue,n.CustomProperties.VPN_Session_Effective_Limit FROM Orion.Nodes n WHERE n.Caption <Case_Region_2> and n.CustomPollerAssignmentOnNode.CustomPollerName LIKE '%_Session%' ORDER BY n.Caption ASC,n.CustomPollerAssignmentOnNode.CustomPollerName ASC"; break; case "EMEA": query= "SELECT n.Caption as Hostname,REPLACE(n.StatusIcon,'.gif','') as Status,n.CustomPollerAssignmentOnNode.CustomPollerName,n.CustomPollerAssignmentOnNode.CurrentValue,n.CustomProperties.VPN_Session_Effective_Limit FROM Orion.Nodes n WHERE n.Caption <Case_Region_3> and n.CustomPollerAssignmentOnNode.CustomPollerName LIKE '%_Session%' ORDER BY n.Caption ASC,n.CustomPollerAssignmentOnNode.CustomPollerName ASC"; break; }
In my original code <Case_Region_1> .... <Case_Region_2> use either LIKE (partial hostname) or IN (list of ASAs for each widget). Make sure to edit the queries in the attached code.
The code attached only needs to be inserted in the first Custom HTML widget, the other two contain the following code:
<div id="vpn_EMEA"> </div>
<div id="vpn_APAC"> </div>
The JavaScript from the first Custom HTML populates the other two on load.
And that's pretty much it! Easy, right?
Let me know if I failed to explain something or the explanation does not make sense.
Stay safe!