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 @@
dragonlab:
# Measuremet network/variant parameters
title: "Dragonlab"
default_event_type: "gap" # Event type to apply if no relevant is available
event_type:
# Event types for variant
gapsum:
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:
down_ppm:
title: "Unavailability"
unit: "ppm"
type: "number"
aggr: "sum"
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
big_gaps:
title: "Avg delay"
unit: "ms"
title: "Big gaps"
unit: "#"
type: "number"
aggr: "sum"
big_time:
title: "Big gap time"
unit: "s"
type: "number"
aggr: "sum"
small_gaps:
title: "Small gaps"
unit: "#"
type: "number"
aggr: "sum"
small_time:
title: "Small gap time"
unit: "s"
# Data field to select as default
default_field: "down_ppm"
type: "number"
aggr: "sum"
gap:
title: "Gaps"
field:
down_ppm:
title: "Unavailability"
unit: "ppm"
type: "number"
aggr: "sum"
tloss:
title: "Time lost"
unit: "ms"
type: "number"
aggr: "sum"
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
h_slope_10:
title: "Slope"
unit: ""
type: "number"
aggr: "avg"
default_field: "down_ppm"
jitter:
title: "Queues"
default_field: "h_ddelay"
field:
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
h_slope_10:
title: "Slope"
unit: ""
default_field: "h_ddelay"
type: "number"
aggr: "avg"
routesum:
title: "Route summary"
default_field: "routes_failed"
field:
routes_failed:
title: "Routes failed"
unit: "#"
type: "number"
aggr: "sum"
routes_reached:
title: "Routes completed"
unit: "#"
type: "number"
aggr: "sum"
scale: "reversed" # Large numbers are desirable
routes_analysed:
title: "Routes analysed"
unit: "#"
type: "number"
aggr: "sum"
scale: "reversed" # Large numbers are desirable
min_length:
title: "Min length"
unit: "hops"
type: "number"
aggr: "min"
max_length:
title: "Max length"
unit: "hops"
type: "number"
aggr: "max"
unique_hosts:
title: "Unique hosts"
unit: "#"
#unique_hosts_per_hop:
# title: "Hosts per hop"
# unit: ""
default_field: "routes_failed"
type: "number"
aggr: "max"
unique_hosts_per_hop:
title: "Hosts per hop"
unit: "hops"
type: "vector" # I.e. space separated list of numbers
aggr: "max"
routeerr:
title: "Route errors"
default_field: "anomaly_count"
field:
anomaly_count:
title: "Routes failed"
unit: "#"
type: "number"
aggr: "sum"
duration:
title: "Route down times"
unit: "s"
type: "number"
aggr: "sum"
last_hop:
title: "Last hop"
unit: "hop#"
descr: "Hop no of last host responding"
type: "number"
aggr: "max"
max_length:
title: "Normal length"
unit: "hops"
descr: "Maximum observed lenght of route to destination"
type: "number"
aggr: "max"
last_reply_from:
title: "Last host"
unit: ""
descr: "Address of last host responding"
type: "string"
aggr: ""
icmp_errors:
title: "ICMP messages"
unit: ""
descr: "ICMP messages received from last host"
default_field: "anomaly_count"
type: "string"
aggr: ""
routechange:
title: "Route changes"
default_field: "no_hops_over_ce_limit"
field:
anomality_class:
title: "Status"
unit: ""
descr: "New or well known route"
descr: "New / well known route"
type: "string"
aggr: ""
ce_delta:
title: "Per hop anomaly"
unit: ""
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:
title: "Changed from"
unit: ""
descr: "List of hosts in previous routes"
type: "string"
aggr: ""
new_normal:
title: "Changed to"
unit: ""
descr: "List of hosts in latest routes"
default_field: "anomality_class"
default_event_type: "gap"
type: "string"
aggr: ""
uninett:
title: "Uninett"
default_event_type: "gap" # Event type to apply if no relevant is available
event_type:
# Event types for variant
gapsum:
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:
down_ppm:
title: "Unavailability"
unit: "ppm"
type: "number"
aggr: "sum"
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
big_gaps:
title: "Avg delay"
unit: "ms"
title: "Big gaps"
unit: "#"
type: "number"
aggr: "sum"
big_time:
title: "Big gap time"
unit: "s"
type: "number"
aggr: "sum"
small_gaps:
title: "Small gaps"
unit: "#"
type: "number"
aggr: "sum"
small_time:
title: "Small gap time"
unit: "s"
# Data field to select as default
default_field: "down_ppm"
type: "number"
aggr: "sum"
gap:
title: "Gaps"
field:
down_ppm:
title: "Unavailability"
unit: "ppm"
type: "number"
aggr: "sum"
tloss:
title: "Time lost"
unit: "ms"
type: "number"
aggr: "sum"
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
h_slope_10:
title: "Slope"
unit: ""
type: "number"
aggr: "avg"
default_field: "down_ppm"
jitter:
title: "Queues"
default_field: "h_ddelay"
field:
h_ddelay:
title: "Queue"
unit: "ms"
type: "number"
aggr: "avg"
h_jit:
title: "Jitter"
unit: "ms"
type: "number"
aggr: "avg"
h_min_d:
title: "Min delay"
unit: "ms"
type: "number"
aggr: "min"
h_slope_10:
title: "Slope"
unit: ""
default_field: "h_ddelay"
default_event_type: "jitter"
type: "number"
aggr: "avg"
......@@ -255,25 +255,26 @@ var points_cache=[];
// Repopulate property structures based on given measuerment network variant and config file
// Also re-init event type and variable select-lists
if (jQuery.isEmptyObject(conffile)) {
// No config file data available
return
}
// Clear list first
prop_names_list ={};
prop_desc ={};
event_desc={};
for (const e in conffile[parms.net].event_type) {
prop_names_list[e]=[];
event_desc[e] = conffile[parms.net].event_type[e].title
for (const f in conffile[parms.net].event_type[e].field) {
prop_names_list[e].push(f);
var unit = conffile[parms.net].event_type[e].field[f].unit
var title = conffile[parms.net].event_type[e].field[f].title
prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ;
if (! jQuery.isEmptyObject(conffile)) {
// Config file data is available. Update lists.
prop_names_list ={};
prop_desc ={};
event_desc={};
for (const e in conffile[parms.net].event_type) {
prop_names_list[e]=[];
event_desc[e] = conffile[parms.net].event_type[e].title
for (const f in conffile[parms.net].event_type[e].field) {
// Add only numeric properties/variables
if (conffile[parms.net].event_type[e].field[f].type == "number") {
prop_names_list[e].push(f);
var unit = conffile[parms.net].event_type[e].field[f].unit
var title = conffile[parms.net].event_type[e].field[f].title
prop_desc[f] = title + ( unit ? " (" + unit + ")" : "") ;
}
}
}
}
// Init select list for measurement types / datasets / event types
event_names = Object.keys(prop_names_list);
make_prop_select("event_type", event_names, event_desc );
......@@ -394,6 +395,7 @@ function update_url(parameter, value){
"period=" + $("#period").val() ];
if ( etype === "jitter" && $("#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 )
pars.push( parameter + "=" + value );
url = urlBase+'?'+pars.join('&');
......@@ -1874,11 +1876,15 @@ function hhmmss(d){
$(document).ready ( function(){
parms=get_parms( );
// OJW 2021-12-09 BEGIN CONFIG FILE LOAD
// Fetch config info and initialize page
$.getJSON( "yaml-to-json.cgi?inputfile=mapconfig.yml", function(read_conffile) {
// Fetch config info and initialize page
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) {
console.log("Config file non-empty: " + read_conffile.msg);
console.log("Config file " + conffilename + " non-empty: " + read_conffile.msg);
conffile = read_conffile.config;
// Remove default measurement variants from select list
$("#network").empty();
......@@ -1886,6 +1892,10 @@ $(document).ready ( function(){
// Add option for measurement variant
$("#network").append("<option value=" + mvar + ">" + conffile[mvar].title + "</option>");
}
// Sort list alphabetically (from https://stackoverflow.com/questions/667010/sorting-dropdown-list-using-javascript/667198#667198)
$("#network").html($("#network option").sort(function (a, b) {
return a.text == b.text ? 0 : a.text < b.text ? -1 : 1
}))
//Select first measurement variant in list
$("#network option:eq(0)").prop("selected", true);
// $("#network").selectmenu("refresh");
......@@ -1894,7 +1904,6 @@ $(document).ready ( function(){
// OJW 2021-12-09 CONTINUES AT END OF "document ready"
parms=get_parms( );
if ( parms.net){
$("#network").val(parms.net);
......@@ -1902,7 +1911,7 @@ $(document).ready ( function(){
parms.net = $("#network").val();
}
// Update properties according to selected measurement network variant
update_props(parms.net);
update_props();
if ( parms.palette === "auto"){
colors=generate_colors(10, [0.8,0.2,0.2]); // 5 colors in red with 50% green and blue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment