Version 17

    HI All,

     

    just wanted to share a requirement i recently had from a customer.  The requirement was quite cool, they wanted a view that at a glance they would know the number of nodes were either up or down/warning, a map that would dynamically change based on site hours for different regions/ counties and for alerts to be surpassed during offline times.

     

    as an example. if you have an office in London that comes online at 9am to 18pm, then you have Mexico that comes online at 9pm till 2 am, you don't necessary want alerts for Mexico at 2pm because the site is offline, vice-versa, Also you don't want maps to show sites that are down that don't really need to be there,

     

    The view consists of 3 objects, Network atlas map, Ajax group dropdown and the scoreboard (also from Network Atlas) (requires some knowledge of SQL)

     

    ill try my best to walk you through how to build such dynamic solution:

    firstly ill briefly cover off the map and how the map dynamically changes based on operation hours, your need to create and order your sites in to groups i use custom properties to group and using the 'build dynamic query' feature in 'manage groups', throughout this article your need to add the below custom properties(your description can be anything )

     

    NameFormatDescription
    n_regionTextregion of node
    g_muteTrue/False

    used to mute node from dashboard workflow

    n_countryTextcountry of node
    n_site_IDText

    nodes Site ID

    n_muteTrue/Falsemutes node alerts

     

    setting up dynamic group for map:

    dynamic group is checking for n_region and g_mute is set to false, the reason the g_mute is set to false is because this value will update to true when operation hours are active.

     

    for example:

    n_region                                                                                                                                        n_country

    Now all you need to do is replicate this for other regions and also for countries (probably the hardest part but worth it:)) . once completed the grouping your be able to populate the network atles with your recently created groups simply drag and drop them.

        

    counties in region Asia

     

    ok that's pretty much it for now in network atlse until a little later

     

    on a side note at this point i run into a slight problem the problem was that a country can have multiple locations and i want to make sure that some devices always send out alerts and appear on the dashboard, so this is when n_site_id custom property come in handy, if i don't want the device to be apart of the workflow i just don't give the node a site_id and just give it  n_country, n_region.

     

    Site online query:

     

    this query is going to mute alerts and remove the device from the workflow.

     

    UPDATE ncp
    --set g_mute to false and enable alerting, your need n_mute as a check in your trigger condition.
     SET ncp.g_mute = 0,
     ncp.n_mute = 0
    --i prefer to update records in nodes custom properties and use an IN list to specify sites. 
     FROM NodesCustomProperties ncp
    -- Set Site ID's that have been assigned to nodes to be updated 
     WHERE n_siteid IN  ('CRHD07',
    'HNSP01',
    'HRZG01')

     

    Site offline query:

    this query is going to unmute the alerts so devices are now live and will be back in workflow

     

    UPDATE ncp
    --set g_mute to true and enable alerting, your need n_mute as a check in your trigger condition.
     SET ncp.g_mute = 1,
     ncp.n_mute = 1
    --i prefer to update records in nodes custom properties and use an IN list to specify sites. 
     FROM NodesCustomProperties ncp
    -- Set Site ID's that have been assigned to nodes to be updated 
     WHERE n_siteid IN  ('CRHD07',
    'HNSP01',
    'HRZG01')

     

    the way i make sure that these run at the right time i use 'SQL Server agent' jobs i just run the online as its own script (ONLINE TIME) and the offline (OFFLINE TIME) as its own script and set the time within the job itself, so job will run when site is online of offline. this will now suppress and un-suppress the alerts for a schedule time and remove the node from the dashboard and workflow.

     

    for example on times and how mine looks:

     

    RAG Count View:

    originally, i was looking for a pie chart for number of nodes that are down/up, but it seems that you can only have pie charts for NCM, NTA and think for hardware as well anyway, i went on a little  Thwack hunt, and found this Scoreboard  by cscoengineer thanks again bud

     

    For this your need 3 custom properties and then head back to Network Atlas to build out the status boxes that will hold the data from the custom properties.

    all the custom properties will do is just update from a COUNT (*) from a SQL job.

     

    NameFormatDescription
    count1_upIntegernumber of devices that are up
    count2_downIntegernumber of devices that are down
    count3_warnintegernumber of devices that are warning

     

    now simply create your status icons. something like this:

     

    your need to now pick a node that will hold the COUNT data, for example below i use our primary polling engine NodeID which is nodeid 267 in the example below. this is the node that needs to dragged onto the map, your need to drag the same object 3 times, each with a different name ${count1_up} , ${count3_warn} and ${count2_down} .

     

    secondly, your need to create another 'SQL agent job' and all within the same script input the below. just ensure you select your NodID that you used just above. (remove the 267 nodeid)  i have mine running every 1 minutes because i want to capture the 'warning' status, with the check n_mute and g_mute it wont pickup the devices outside of the operation hours.

     

    this query is counting all node status in region America.

     

    -- Americas Update 
    
    --UPDATE SITES UP 
    update ncp
    SET  ncp.count1_up = ISNULL((select COUNT(*) from Nodes n  
    WHERE  (status=1 and n_region = 'Americas' AND ( n.n_mute = 0 or g_mute = 0))),0)
    FROM NodesCustomProperties ncp
    -- primary polling ID
    Where NodeID = 267
    
    -- UPDATE SITES DOWN
    update ncp
    SET  ncp.count2_down  =  
    ISNULL((select COUNT(*) from nodes n
    WHERE  (status=2 and n_region = 'Americas'  AND  ( n.n_mute = 0 or g_mute = 0))),0)
    FROM NodesCustomProperties ncp
    Where NodeID = 267
    
    --UPDATE SITES WARNING
    update ncp
    SET  ncp.count3_warn =  
    ISNULL((select COUNT(*) from Nodes n 
    WHERE  (status=3 and n_region = 'Americas'  AND ( n.n_mute = 0 or g_mute = 0))),0)
    FROM NodesCustomProperties ncp
    Where NodeID = 267

     

    to finish off add a All Nodes - Tree (AJAX) resource and add the filter if you dont want to see the nodes outside of them operation hours.

     

    filter: ((g_mute = '0') OR (g_mute = '0'))

    group by n_region

     

    think that does it now all maps, operation hours , status are in sync with each other

     

    feel free to take a look at

     

    Serials & Version SWQL Search Resource

    ..Alert > Reset > [Custom Property Delay] > Alert > Reset..

    NCM Status, Backup status/download configs and last transfer message. NPM Node details resource

     

    thanks,

     

    Dan