Commit 7d16c87b authored by Otto Jonassen Wittner's avatar Otto Jonassen Wittner
Browse files

Updated config with types ++. Added routechange pluss filter on types.

parent b20d6255
Pipeline #50570 passed with stages
in 1 minute and 1 second
...@@ -5,222 +5,345 @@ ...@@ -5,222 +5,345 @@
dragonlab: dragonlab:
# Measuremet network/variant parameters # Measuremet network/variant parameters
title: "Dragonlab" title: "Dragonlab"
default_event_type: "gap" # Event type to apply if no relevant is available
event_type: event_type:
# Event types for variant # Event types for variant
gapsum: gapsum:
title: "Gap summary" title: "Gap summary"
# Relevant data field for event type (matches ES field names) default_field: "down_ppm" # Data field to select as default
# Relevant data fields for event type (matches ES field names)
field: field:
down_ppm: down_ppm:
title: "Unavailability" title: "Unavailability"
unit: "ppm" unit: "ppm"
type: "number"
aggr: "sum"
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
big_gaps: big_gaps:
title: "Avg delay" title: "Big gaps"
unit: "ms" unit: "#"
type: "number"
aggr: "sum"
big_time: big_time:
title: "Big gap time" title: "Big gap time"
unit: "s" unit: "s"
type: "number"
aggr: "sum"
small_gaps: small_gaps:
title: "Small gaps" title: "Small gaps"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
small_time: small_time:
title: "Small gap time" title: "Small gap time"
unit: "s" unit: "s"
# Data field to select as default type: "number"
default_field: "down_ppm" aggr: "sum"
gap: gap:
title: "Gaps" title: "Gaps"
field: field:
down_ppm: down_ppm:
title: "Unavailability" title: "Unavailability"
unit: "ppm" unit: "ppm"
type: "number"
aggr: "sum"
tloss: tloss:
title: "Time lost" title: "Time lost"
unit: "ms" unit: "ms"
type: "number"
aggr: "sum"
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
h_slope_10: h_slope_10:
title: "Slope" title: "Slope"
unit: "" unit: ""
type: "number"
aggr: "avg"
default_field: "down_ppm" default_field: "down_ppm"
jitter: jitter:
title: "Queues" title: "Queues"
default_field: "h_ddelay"
field: field:
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
h_slope_10: h_slope_10:
title: "Slope" title: "Slope"
unit: "" unit: ""
default_field: "h_ddelay" type: "number"
aggr: "avg"
routesum: routesum:
title: "Route summary" title: "Route summary"
default_field: "routes_failed"
field: field:
routes_failed: routes_failed:
title: "Routes failed" title: "Routes failed"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
routes_reached: routes_reached:
title: "Routes completed" title: "Routes completed"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
scale: "reversed" # Large numbers are desirable scale: "reversed" # Large numbers are desirable
routes_analysed: routes_analysed:
title: "Routes analysed" title: "Routes analysed"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
scale: "reversed" # Large numbers are desirable scale: "reversed" # Large numbers are desirable
min_length: min_length:
title: "Min length" title: "Min length"
unit: "hops" unit: "hops"
type: "number"
aggr: "min"
max_length: max_length:
title: "Max length" title: "Max length"
unit: "hops" unit: "hops"
type: "number"
aggr: "max"
unique_hosts: unique_hosts:
title: "Unique hosts" title: "Unique hosts"
unit: "#" unit: "#"
#unique_hosts_per_hop: type: "number"
# title: "Hosts per hop" aggr: "max"
# unit: "" unique_hosts_per_hop:
default_field: "routes_failed" title: "Hosts per hop"
unit: "hops"
type: "vector" # I.e. space separated list of numbers
aggr: "max"
routeerr: routeerr:
title: "Route errors" title: "Route errors"
default_field: "anomaly_count"
field: field:
anomaly_count: anomaly_count:
title: "Routes failed" title: "Routes failed"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
duration: duration:
title: "Route down times" title: "Route down times"
unit: "s" unit: "s"
type: "number"
aggr: "sum"
last_hop: last_hop:
title: "Last hop" title: "Last hop"
unit: "hop#" unit: "hop#"
descr: "Hop no of last host responding" descr: "Hop no of last host responding"
type: "number"
aggr: "max"
max_length: max_length:
title: "Normal length" title: "Normal length"
unit: "hops" unit: "hops"
descr: "Maximum observed lenght of route to destination" descr: "Maximum observed lenght of route to destination"
type: "number"
aggr: "max"
last_reply_from: last_reply_from:
title: "Last host" title: "Last host"
unit: "" unit: ""
descr: "Address of last host responding" descr: "Address of last host responding"
type: "string"
aggr: ""
icmp_errors: icmp_errors:
title: "ICMP messages" title: "ICMP messages"
unit: "" unit: ""
descr: "ICMP messages received from last host" descr: "ICMP messages received from last host"
default_field: "anomaly_count" type: "string"
aggr: ""
routechange: routechange:
title: "Route changes" title: "Route changes"
default_field: "no_hops_over_ce_limit"
field: field:
anomality_class: anomality_class:
title: "Status" title: "Status"
unit: "" unit: ""
descr: "New or well known route" descr: "New / well known route"
type: "string"
aggr: ""
ce_delta: ce_delta:
title: "Per hop anomaly" title: "Per hop anomaly"
unit: "" unit: ""
descr: "Anomaly factors (delta cross entropy) per hop along route" descr: "Anomaly factors (delta cross entropy) per hop along route"
type: "vector"
aggr: "sum"
ce_delta_max:
title: "Max hop anomaly"
unit: ""
descr: "Largest anomaly factor (delta cross entropy) observed along route"
type: "number"
aggr: "max"
ce_delta_total:
title: "Route anomaly"
unit: ""
descr: "Sum of anomaly factors (delta cross entropy) observed along route"
type: "number"
aggr: "sum"
no_hops_over_ce_limit:
title: "Abnormal hops"
unit: "#"
descr: "No of hops with anomaly factor (delta cross entropy) above threshold."
type: "number"
aggr: "sum"
prev_normal: prev_normal:
title: "Changed from" title: "Changed from"
unit: "" unit: ""
descr: "List of hosts in previous routes" descr: "List of hosts in previous routes"
type: "string"
aggr: ""
new_normal: new_normal:
title: "Changed to" title: "Changed to"
unit: "" unit: ""
descr: "List of hosts in latest routes" descr: "List of hosts in latest routes"
default_field: "anomality_class" type: "string"
default_event_type: "gap" aggr: ""
uninett: uninett:
title: "Uninett" title: "Uninett"
default_event_type: "gap" # Event type to apply if no relevant is available
event_type: event_type:
# Event types for variant # Event types for variant
gapsum: gapsum:
title: "Gap summary" title: "Gap summary"
# Relevant data field for event type (matches ES field names) default_field: "down_ppm" # Data field to select as default
# Relevant data fields for event type (matches ES field names)
field: field:
down_ppm: down_ppm:
title: "Unavailability" title: "Unavailability"
unit: "ppm" unit: "ppm"
type: "number"
aggr: "sum"
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
big_gaps: big_gaps:
title: "Avg delay" title: "Big gaps"
unit: "ms" unit: "#"
type: "number"
aggr: "sum"
big_time: big_time:
title: "Big gap time" title: "Big gap time"
unit: "s" unit: "s"
type: "number"
aggr: "sum"
small_gaps: small_gaps:
title: "Small gaps" title: "Small gaps"
unit: "#" unit: "#"
type: "number"
aggr: "sum"
small_time: small_time:
title: "Small gap time" title: "Small gap time"
unit: "s" unit: "s"
# Data field to select as default type: "number"
default_field: "down_ppm" aggr: "sum"
gap: gap:
title: "Gaps" title: "Gaps"
field: field:
down_ppm: down_ppm:
title: "Unavailability" title: "Unavailability"
unit: "ppm" unit: "ppm"
type: "number"
aggr: "sum"
tloss: tloss:
title: "Time lost" title: "Time lost"
unit: "ms" unit: "ms"
type: "number"
aggr: "sum"
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
h_slope_10: h_slope_10:
title: "Slope" title: "Slope"
unit: "" unit: ""
type: "number"
aggr: "avg"
default_field: "down_ppm" default_field: "down_ppm"
jitter: jitter:
title: "Queues" title: "Queues"
default_field: "h_ddelay"
field: field:
h_ddelay: h_ddelay:
title: "Queue" title: "Queue"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_jit: h_jit:
title: "Jitter" title: "Jitter"
unit: "ms" unit: "ms"
type: "number"
aggr: "avg"
h_min_d: h_min_d:
title: "Min delay" title: "Min delay"
unit: "ms" unit: "ms"
type: "number"
aggr: "min"
h_slope_10: h_slope_10:
title: "Slope" title: "Slope"
unit: "" unit: ""
default_field: "h_ddelay" type: "number"
default_event_type: "jitter" aggr: "avg"
...@@ -255,25 +255,26 @@ var points_cache=[]; ...@@ -255,25 +255,26 @@ var points_cache=[];
// Repopulate property structures based on given measuerment network variant and config file // Repopulate property structures based on given measuerment network variant and config file
// Also re-init event type and variable select-lists // Also re-init event type and variable select-lists
if (jQuery.isEmptyObject(conffile)) { if (! jQuery.isEmptyObject(conffile)) {
// No config file data available // Config file data is available. Update lists.
return prop_names_list ={};
} prop_desc ={};
// Clear list first event_desc={};
prop_names_list ={}; for (const e in conffile[parms.net].event_type) {
prop_desc ={}; prop_names_list[e]=[];
event_desc={}; event_desc[e] = conffile[parms.net].event_type[e].title
for (const e in conffile[parms.net].event_type) { for (const f in conffile[parms.net].event_type[e].field) {
prop_names_list[e]=[]; // Add only numeric properties/variables
event_desc[e] = conffile[parms.net].event_type[e].title if (conffile[parms.net].event_type[e].field[f].type == "number") {
for (const f in conffile[parms.net].event_type[e].field) { prop_names_list[e].push(f);
prop_names_list[e].push(f); var unit = conffile[parms.net].event_type[e].field[f].unit
var unit = conffile[parms.net].event_type[e].field[f].unit var title = conffile[parms.net].event_type[e].field[f].title
var title = conffile[parms.net].event_type[e].field[f].title prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ;
prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ; }
}
} }
} }
// Init select list for measurement types / datasets / event types // Init select list for measurement types / datasets / event types
event_names = Object.keys(prop_names_list); event_names = Object.keys(prop_names_list);
make_prop_select("event_type", event_names, event_desc ); make_prop_select("event_type", event_names, event_desc );
...@@ -394,6 +395,7 @@ function update_url(parameter, value){ ...@@ -394,6 +395,7 @@ function update_url(parameter, value){
"period=" + $("#period").val() ]; "period=" + $("#period").val() ];
if ( etype === "jitter" && $("#stats_type").val() ) if ( etype === "jitter" && $("#stats_type").val() )
pars.push( "stats=" + $("#stats_type").val() ); pars.push( "stats=" + $("#stats_type").val() );
if (parms.conffile) pars.push( "conffile=" + parms.conffile); // Add configfile to url if relevant
if ( parameter ) if ( parameter )
pars.push( parameter + "=" + value ); pars.push( parameter + "=" + value );
url = urlBase+'?'+pars.join('&'); url = urlBase+'?'+pars.join('&');
...@@ -1874,11 +1876,15 @@ function hhmmss(d){ ...@@ -1874,11 +1876,15 @@ function hhmmss(d){
$(document).ready ( function(){ $(document).ready ( function(){
parms=get_parms( );
// OJW 2021-12-09 BEGIN CONFIG FILE LOAD // OJW 2021-12-09 BEGIN CONFIG FILE LOAD
// Fetch config info and initialize page // Fetch config info and initialize page
$.getJSON( "yaml-to-json.cgi?inputfile=mapconfig.yml", function(read_conffile) { var conffilename = parms.conffile
if (! conffilename) conffilename = 'mapconfig.yml'
$.getJSON( "yaml-to-json.cgi?inputfile=" + conffilename, function(read_conffile) {
if (Object.keys(read_conffile).length > 0) { if (Object.keys(read_conffile).length > 0) {
console.log("Config file non-empty: " + read_conffile.msg); console.log("Config file " + conffilename + " non-empty: " + read_conffile.msg);
conffile = read_conffile.config; conffile = read_conffile.config;
// Remove default measurement variants from select list // Remove default measurement variants from select list
$("#network").empty(); $("#network").empty();
...@@ -1886,6 +1892,10 @@ $(document).ready ( function(){ ...@@ -1886,6 +1892,10 @@ $(document).ready ( function(){