# dashboard commented structure follows # everything from '#' character till end of line is artificially added for the purpose of documenting the dashboard structure # generally, the dashboard is accessible only locally # the dashboard is available at http://127.0.0.1:8484/g/dashb via HTTP GET or POST request with no parameters { "groups": [ # "groups" array, constant name, contains array of all monitoring groups with their status { # every group has: # - a number of fields (simple pair "prefeined id" : value) # - a number of metrics. Metric is an object in the type "variable id" : { object content } # - a metric should be rendered as three lights, one lit and two not lit. See below. "name":"a name", # caption to be shown for a group "state":"B", # the general group state, letters G/W/B, see below on more comments "id":1, # group id, fixed identificator 'id', it is equal to the id in DB "devices":7, # number of devices in group, fixed identificator 'devices' "lights":[ # the metrics with composite lights for the group, representing breakdown of the group into logical subsets "name":"Freshness", # "Freshness" metric, sum of counters in all freshness clases must equal to number of devices in group "state":"B", # - metric state, id "state" is fixed, present in every metric # - the value is always one of: "G","W","B" telling which light should be lit # - the usual logic in determing the resulting light is: # - if any number in bad state -> "B" # - or if any number in warning state -> "W" # - or good state -> "G" # - however, some metrics can have different logic, example being this freshness metric: # - if all devices are in late state -> "B" # - or if some devices are in late state -> "W" # - or good state -> "G" "lights":[ # array of the composite lights for the metric { "caption":"Online", # caption for the sublight "onlight":"0", # the number to print on (inside) the light "subset_id":0 # the ID to use for the /g/mgget wbservice to get IDs of the devices in this subset }, { "caption":"Delayed", "onlight":"0", "subset_id":1 }, { "caption":"Late", "onlight":"1", "subset_id":2 } ] }, { "name":"Sync Status", "state":"G", "lights":[ { "caption":"Synced", "onlight":"1", "subset_id":3 }, { "caption":"Pending", "onlight":"0", "subset_id":4 }, { "caption":"Error", "onlight":"0", "subset_id":5 } ] }, { "name":"Alerts", # Alerts metric. This one is a bit special but only for the 'all' group and only from the number POV. # - Alerts that are defined against a group (if at least 3 devices in group ABC...) # do fall in that particular group # - Alerts, that are defined against a device (regardless of group) are always enumerated # into the 'all' group and nowhere else. Otherwise, it would affect multiple groups # (a device could be part of multiple monitoring groups) "state":"B", "lights":[ { "caption":"Active", "onlight":"3", "subset_id":6 }, { "caption":"Past+Inv", "onlight":"0", "subset_id":7 }, { "caption":"Raised", "onlight":"1", "subset_id":8 } ] } ] } ], "lights":[ # an array of the global lights (pertaining to the whole system, not to a single group only "Global": { # First global MAMAS metric. As first one, it should always sport the biggest light # This generally represents overall MAMAS status. # The string ('Global' in this case) should be used as caption above the light. # Unless MAMAS is NOT providing service, this should never be Bad # Every global metric should be visualized as exactly one light, always lit # Also, a number or text could be placed at the light center and comment below it, see below { "name":"Global", # global light name (to be put above the light). The 'Global' light is the biggest of all lights "caption":"Groups", # global light caption (to be put below the light) "onlight":"", # text to put on (inside) the light "state":"W" # state determining the light color (see G/W/B comment above) }, { "name":"Free #", "caption":"Remains", "onlight":"59999", "state":"G" }, { "name":"Days left", "caption":"Remains", "onlight":"79", "state":"G" }, { "name":"Tunnels", "caption":"Defined", "onlight":"0", "state":"G" }, { "name":"Groups", "caption":"Bad", "onlight":"1", "state":"B" } ], "helptxt":[ # Array of hopefully helpful description/comments of what is happening in the system and 'clever' remarks on how to resolve it... "Some groups have late devices, synchronization errors or triggered alerts. See red groups below." ], "triggered alerts":[ # array of all triggered alerts (fixed id), respectively their id in DB 2 ], "invalid alerts":[ # array of all invalid alerts (fixed id) ... ], "past alerts":[ # array of all past alerts (fixed id) ... ] }