diff --git a/scripts/lua/as_details.lua b/scripts/lua/as_details.lua index 19692deffc..466611d877 100644 --- a/scripts/lua/as_details.lua +++ b/scripts/lua/as_details.lua @@ -167,8 +167,8 @@ if isEmptyString(page) or page == "historical" then {schema="asn:score_anomalies", label=i18n("graphs.iface_score_anomalies")}, {schema="asn:score_behavior", label=i18n("graphs.iface_score_behavior"), split_directions = true, first_timeseries_only = true, metrics_labels = {i18n("graphs.score"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, {schema="asn:traffic_anomalies", label=i18n("graphs.iface_traffic_anomalies")}, - {schema="asn:traffic_rx_behavior", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = asn_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, - {schema="asn:traffic_tx_behavior", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = asn_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="asn:traffic_rx_behavior_v2", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = asn_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="asn:traffic_tx_behavior_v2", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = asn_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, } all_timeseries = table.merge(all_timeseries, pro_timeseries) end diff --git a/scripts/lua/modules/graph_utils.lua b/scripts/lua/modules/graph_utils.lua index 760a5ddb39..dd46605811 100644 --- a/scripts/lua/modules/graph_utils.lua +++ b/scripts/lua/modules/graph_utils.lua @@ -1089,8 +1089,8 @@ if ntop.isPro() then {schema="iface:score_anomalies", label=i18n("graphs.iface_score_anomalies")}, {schema="iface:score_behavior", label=i18n("graphs.iface_score_behavior"), split_directions = true --[[ split RX and TX directions ]], first_timeseries_only = true, metrics_labels = {i18n("graphs.score"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, {schema="iface:traffic_anomalies", label=i18n("graphs.iface_traffic_anomalies")}, - {schema="iface:traffic_rx_behavior", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true --[[ split RX and TX directions ]], first_timeseries_only = true, time_elapsed = iface_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, - {schema="iface:traffic_tx_behavior", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true --[[ split RX and TX directions ]], first_timeseries_only = true, time_elapsed = iface_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="iface:traffic_rx_behavior_v2", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true --[[ split RX and TX directions ]], first_timeseries_only = true, time_elapsed = iface_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="iface:traffic_tx_behavior_v2", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true --[[ split RX and TX directions ]], first_timeseries_only = true, time_elapsed = iface_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, } default_timeseries = table.merge(pro_timeseries, default_timeseries) diff --git a/scripts/lua/modules/timeseries/schemas/ts_5min.lua b/scripts/lua/modules/timeseries/schemas/ts_5min.lua index c53d1bb959..1699b7b146 100644 --- a/scripts/lua/modules/timeseries/schemas/ts_5min.lua +++ b/scripts/lua/modules/timeseries/schemas/ts_5min.lua @@ -603,7 +603,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("asn:traffic_tx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("asn:traffic_tx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addTag("asn") schema:addMetric("value") @@ -612,7 +612,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("asn:traffic_rx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("asn:traffic_rx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addTag("asn") schema:addMetric("value") @@ -644,7 +644,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("iface:traffic_tx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("iface:traffic_tx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addMetric("value") schema:addMetric("lower_bound") @@ -652,7 +652,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("iface:traffic_rx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("iface:traffic_rx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addMetric("value") schema:addMetric("lower_bound") @@ -683,7 +683,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("subnet:traffic_tx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("subnet:traffic_tx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addTag("subnet") schema:addMetric("value") @@ -692,7 +692,7 @@ if ntop.isPro() then -- ############################################## - schema = ts_utils.newSchema("subnet:traffic_rx_behavior", {step=300, metrics_type=ts_utils.metrics.gauge}) + schema = ts_utils.newSchema("subnet:traffic_rx_behavior_v2", {step=300, metrics_type=ts_utils.metrics.gauge}) schema:addTag("ifid") schema:addTag("subnet") schema:addMetric("value") diff --git a/scripts/lua/modules/timeseries/ts_utils_core.lua b/scripts/lua/modules/timeseries/ts_utils_core.lua index fd1871d67b..3be2d3a0a0 100644 --- a/scripts/lua/modules/timeseries/ts_utils_core.lua +++ b/scripts/lua/modules/timeseries/ts_utils_core.lua @@ -829,20 +829,20 @@ function ts_utils.getPossiblyChangedSchemas() "iface:score_behavior", "iface:score_anomalies", "iface:traffic_anomalies", - "iface:traffic_rx_behavior", - "iface:traffic_tx_behavior", + "iface:traffic_rx_behavior_v2", + "iface:traffic_tx_behavior_v2", "subnet:score_anomalies", - "subnet:traffic_tx_behavior", - "subnet:traffic_rx_behavior", + "subnet:traffic_tx_behavior_v2", + "subnet:traffic_rx_behavior_v2", "subnet:traffic_anomalies", "subnet:score_behavior", "asn:score_anomalies", "asn:score_behavior", "asn:traffic_anomalies", - "asn:traffic_rx_behavior", - "asn:traffic_tx_behavior", + "asn:traffic_rx_behavior_v2", + "asn:traffic_tx_behavior_v2", -- Host timeseries "host:contacts", -- split in "as_client" and "as_server" diff --git a/scripts/lua/modules/ts_5min_dump_utils.lua b/scripts/lua/modules/ts_5min_dump_utils.lua index f3c6ff6165..4a0b68191d 100644 --- a/scripts/lua/modules/ts_5min_dump_utils.lua +++ b/scripts/lua/modules/ts_5min_dump_utils.lua @@ -84,13 +84,13 @@ function ts_dump.subnet_update_rrds(when, ifstats, verbose) anomaly=anomaly}, when) -- Traffic Behaviour - ts_utils.append("subnet:traffic_rx_behavior", + ts_utils.append("subnet:traffic_rx_behavior_v2", {ifid=ifstats.id, subnet=subnet, value=sstats["traffic_rx_behavior"]["value"], lower_bound = sstats["traffic_rx_behavior"]["lower_bound"], upper_bound = sstats["traffic_rx_behavior"]["upper_bound"]}, when) - ts_utils.append("subnet:traffic_tx_behavior", + ts_utils.append("subnet:traffic_tx_behavior_v2", {ifid=ifstats.id, subnet=subnet, value=sstats["traffic_tx_behavior"]["value"], lower_bound=sstats["traffic_tx_behavior"]["lower_bound"], @@ -135,11 +135,11 @@ function ts_dump.iface_update_stats_rrds(when, ifstats, verbose) ts_utils.append("iface:score_anomalies", {ifid=ifstats.id, anomaly=anomaly}, when) -- Traffic Behaviour - ts_utils.append("iface:traffic_rx_behavior", {ifid=ifstats.id, + ts_utils.append("iface:traffic_rx_behavior_v2", {ifid=ifstats.id, value=ifstats["traffic_rx_behavior"]["value"], lower_bound=ifstats["traffic_rx_behavior"]["lower_bound"], upper_bound=ifstats["traffic_rx_behavior"]["upper_bound"]}, when) - ts_utils.append("iface:traffic_tx_behavior", {ifid=ifstats.id, + ts_utils.append("iface:traffic_tx_behavior_v2", {ifid=ifstats.id, value=ifstats["traffic_tx_behavior"]["value"], lower_bound=ifstats["traffic_tx_behavior"]["lower_bound"], upper_bound=ifstats["traffic_tx_behavior"]["upper_bound"]}, when) @@ -236,13 +236,13 @@ function ts_dump.asn_update_rrds(when, ifstats, verbose) anomaly=anomaly}, when) -- Traffic Behaviour - ts_utils.append("asn:traffic_rx_behavior", + ts_utils.append("asn:traffic_rx_behavior_v2", {ifid=ifstats.id, asn=asn, value=asn_stats["traffic_rx_behavior"]["value"], lower_bound=asn_stats["traffic_rx_behavior"]["lower_bound"], upper_bound = asn_stats["traffic_rx_behavior"]["upper_bound"]}, when) - ts_utils.append("asn:traffic_tx_behavior", + ts_utils.append("asn:traffic_tx_behavior_v2", {ifid=ifstats.id, asn=asn, value=asn_stats["traffic_tx_behavior"]["value"], lower_bound=asn_stats["traffic_tx_behavior"]["lower_bound"], diff --git a/scripts/lua/network_details.lua b/scripts/lua/network_details.lua index cc21d280f2..182aef5593 100644 --- a/scripts/lua/network_details.lua +++ b/scripts/lua/network_details.lua @@ -118,8 +118,8 @@ if page == "historical" then {schema="subnet:score_anomalies", label=i18n("graphs.iface_score_anomalies")}, {schema="subnet:score_behavior", label=i18n("graphs.iface_score_behavior"), split_directions = true, first_timeseries_only = true, metrics_labels = {i18n("graphs.score"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, {schema="subnet:traffic_anomalies", label=i18n("graphs.iface_traffic_anomalies")}, - {schema="subnet:traffic_rx_behavior", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = network_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, - {schema="subnet:traffic_tx_behavior", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = network_behavior_update_freq,value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="subnet:traffic_rx_behavior_v2", label=i18n("graphs.iface_traffic_rx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = network_behavior_update_freq, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_rcvd"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, + {schema="subnet:traffic_tx_behavior_v2", label=i18n("graphs.iface_traffic_tx_behavior"), split_directions = true, first_timeseries_only = true, time_elapsed = network_behavior_update_freq,value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}, metrics_labels = {i18n("graphs.traffic_sent"), i18n("graphs.lower_bound"), i18n("graphs.upper_bound")}}, } all_timeseries = table.merge(all_timeseries, pro_timeseries) end