mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Removed no more used code
This commit is contained in:
parent
afae98faf6
commit
2c70d0c3f1
2 changed files with 0 additions and 383 deletions
|
|
@ -1130,257 +1130,6 @@ end
|
|||
|
||||
-- #################################################
|
||||
|
||||
function graph_utils.getDeviceCommonTimeseries()
|
||||
return {{
|
||||
schema = "mac:arp_rqst_sent_rcvd_rpls",
|
||||
label = i18n("graphs.arp_rqst_sent_rcvd_rpls")
|
||||
}}
|
||||
end
|
||||
|
||||
-- #################################################
|
||||
|
||||
local default_timeseries = {{
|
||||
schema = "iface:flows",
|
||||
label = i18n("graphs.active_flows"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_flows")}
|
||||
}, {
|
||||
schema = "iface:new_flows",
|
||||
label = i18n("graphs.new_flows"),
|
||||
value_formatter = {"NtopUtils.fflows", "NtopUtils.formatFlows"},
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_flows")}
|
||||
}, {
|
||||
schema = "iface:alerted_flows",
|
||||
label = i18n("graphs.total_alerted_flows"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.alerted_flows")}
|
||||
}, {
|
||||
schema = "iface:hosts",
|
||||
label = i18n("graphs.active_hosts"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_hosts")}
|
||||
}, {
|
||||
schema = "iface:engaged_alerts",
|
||||
label = i18n("show_alerts.engaged_alerts"),
|
||||
metrics_labels = {i18n("show_alerts.engaged_alerts")},
|
||||
skip = hasAllowedNetworksSet()
|
||||
}, {
|
||||
schema = "iface:dropped_alerts",
|
||||
label = i18n("show_alerts.dropped_alerts"),
|
||||
metrics_labels = {i18n("show_alerts.dropped_alerts")},
|
||||
skip = hasAllowedNetworksSet()
|
||||
}, {
|
||||
schema = "custom:flows_vs_local_hosts",
|
||||
label = i18n("graphs.flows_vs_local_hosts"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_flows"), i18n("graphs.metric_labels.num_hosts")},
|
||||
check = {"iface:flows", "iface:local_hosts"},
|
||||
step = 60
|
||||
}, {
|
||||
schema = "custom:flows_vs_traffic",
|
||||
label = i18n("graphs.flows_vs_traffic"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.traffic"), i18n("graphs.metric_labels.num_flows")},
|
||||
check = {"iface:flows", "iface:traffic"},
|
||||
step = 60
|
||||
}, {
|
||||
schema = "custom:memory_vs_flows_hosts",
|
||||
label = i18n("graphs.memory_vs_hosts_flows"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.memory_vs_hosts_flows")},
|
||||
check = {"process:resident_memory", "iface:flows", "iface:hosts"}
|
||||
}, {
|
||||
schema = "iface:devices",
|
||||
label = i18n("graphs.active_devices"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_devices")}
|
||||
}, {
|
||||
schema = "iface:http_hosts",
|
||||
label = i18n("graphs.active_http_servers"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.num_servers")},
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:traffic",
|
||||
label = i18n("traffic"),
|
||||
metrics_labels = {i18n("graphs.metric_labels.traffic")}
|
||||
}, {
|
||||
schema = "iface:score",
|
||||
label = i18n("score"),
|
||||
metrics_labels = {i18n("graphs.cli_score"), i18n("graphs.srv_score")}
|
||||
}, {
|
||||
schema = "custom:score_vs_flows_hosts",
|
||||
label = i18n("graphs.score_vs_hosts_flows"),
|
||||
check = {"iface:score", "iface:flows", "iface:hosts"},
|
||||
metrics_labels = {i18n("graphs.cli_score"), i18n("graphs.srv_score")}
|
||||
}, {
|
||||
schema = "iface:traffic_rxtx",
|
||||
label = i18n("graphs.traffic_rxtx"),
|
||||
split_directions = true,
|
||||
layout = {
|
||||
["bytes_sent"] = "area",
|
||||
["bytes_rcvd"] = "line"
|
||||
},
|
||||
value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"}
|
||||
}, {
|
||||
schema = "iface:packets_vs_drops",
|
||||
label = i18n("graphs.packets_vs_drops")
|
||||
}, {
|
||||
schema = "iface:nfq_pct",
|
||||
label = i18n("graphs.num_nfq_pct"),
|
||||
nedge_only = 1
|
||||
}, {
|
||||
schema = "iface:hosts_anomalies",
|
||||
label = i18n("graphs.hosts_anomalies"),
|
||||
layout = {
|
||||
["num_local_hosts_anomalies"] = "area",
|
||||
["num_remote_hosts_anomalies"] = "area"
|
||||
},
|
||||
metrics_labels = {i18n("graphs.loc_host_anomalies"), i18n("graphs.rem_host_anomalies")}
|
||||
}, {
|
||||
schema = "iface:behavioural_maps",
|
||||
label = i18n("graphs.behavioural_maps"),
|
||||
layout = {
|
||||
["periodicity_map_entries"] = "area",
|
||||
["service_map_entries"] = "area"
|
||||
},
|
||||
metrics_labels = {i18n("graphs.periodicity_map_entries"), i18n("graphs.service_map_entries")}
|
||||
}, {
|
||||
schema = "iface:disc_prob_bytes",
|
||||
label = i18n("graphs.discarded_probing_bytes"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:disc_prob_pkts",
|
||||
label = i18n("graphs.discarded_probing_packets"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:dumped_flows",
|
||||
label = i18n("graphs.dumped_flows"),
|
||||
metrics_labels = {i18n("graphs.dumped_flows"), i18n("graphs.dropped_flows")}
|
||||
}, {
|
||||
schema = "iface:zmq_recv_flows",
|
||||
label = i18n("graphs.zmq_received_flows"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "custom:zmq_msg_rcvd_vs_drops",
|
||||
label = i18n("graphs.zmq_msg_rcvd_vs_drops"),
|
||||
check = {"iface:zmq_rcvd_msgs", "iface:zmq_msg_drops"},
|
||||
metrics_labels = {i18n("if_stats_overview.zmq_message_rcvd"), i18n("if_stats_overview.zmq_message_drops")},
|
||||
value_formatter = {"NtopUtils.fmsgs", "NtopUtils.formatMessages"}
|
||||
}, {
|
||||
schema = "iface:zmq_flow_coll_drops",
|
||||
label = i18n("graphs.zmq_flow_coll_drops"),
|
||||
nedge_exclude = 1,
|
||||
value_formatter = {"NtopUtils.fflows", "NtopUtils.formatFlows"}
|
||||
}, {
|
||||
schema = "iface:zmq_flow_coll_udp_drops",
|
||||
label = i18n("graphs.zmq_flow_coll_udp_drops"),
|
||||
nedge_exclude = 1,
|
||||
value_formatter = {"NtopUtils.fpackets", "NtopUtils.formatPackets"}
|
||||
}, {
|
||||
separator = 1,
|
||||
nedge_exclude = 1,
|
||||
label = i18n("tcp_stats")
|
||||
}, {
|
||||
schema = "iface:tcp_lost",
|
||||
label = i18n("graphs.tcp_packets_lost"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:tcp_out_of_order",
|
||||
label = i18n("graphs.tcp_packets_ooo"),
|
||||
nedge_exclude = 1
|
||||
}, -- {schema="tcp_retr_ooo_lost", label=i18n("graphs.tcp_retr_ooo_lost"), nedge_exclude=1},
|
||||
{
|
||||
schema = "iface:tcp_retransmissions",
|
||||
label = i18n("graphs.tcp_packets_retr"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:tcp_keep_alive",
|
||||
label = i18n("graphs.tcp_packets_keep_alive"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
separator = 1,
|
||||
label = i18n("tcp_flags")
|
||||
}, {
|
||||
schema = "iface:tcp_syn",
|
||||
label = i18n("graphs.tcp_syn_packets"),
|
||||
nedge_exclude = 1,
|
||||
pro_skip = 1
|
||||
}, {
|
||||
schema = "iface:tcp_synack",
|
||||
label = i18n("graphs.tcp_synack_packets"),
|
||||
nedge_exclude = 1,
|
||||
pro_skip = 1
|
||||
}, {
|
||||
schema = "custom:iface_tcp_syn_vs_tcp_synack",
|
||||
label = i18n("graphs.tcp_syn_vs_tcp_synack"),
|
||||
nedge_exclude = 1,
|
||||
metrics_labels = {"SYN", "SYN+ACK"}
|
||||
}, {
|
||||
schema = "iface:tcp_finack",
|
||||
label = i18n("graphs.tcp_finack_packets"),
|
||||
nedge_exclude = 1
|
||||
}, {
|
||||
schema = "iface:tcp_rst",
|
||||
label = i18n("graphs.tcp_rst_packets"),
|
||||
nedge_exclude = 1
|
||||
}}
|
||||
|
||||
if ntop.isPro() then
|
||||
local pro_timeseries = {{
|
||||
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_v3",
|
||||
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_v3",
|
||||
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:local_hosts",
|
||||
label = i18n("graphs.iface_active_local_hosts"),
|
||||
metrics_labels = {i18n("graphs.metrics_prefixes.num_hosts")}
|
||||
}}
|
||||
|
||||
default_timeseries = table.merge(pro_timeseries, default_timeseries)
|
||||
end
|
||||
|
||||
-- #################################################
|
||||
|
||||
function graph_utils.get_default_timeseries()
|
||||
return (default_timeseries)
|
||||
end
|
||||
|
||||
-- #################################################
|
||||
|
||||
function graph_utils.get_timeseries_layout(schema)
|
||||
|
||||
local ret = {"area"} -- default
|
||||
|
||||
for k, v in pairs(default_timeseries) do
|
||||
if (v.schema == schema) then
|
||||
if (v.layout) then
|
||||
ret = v.layout
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
return (ret)
|
||||
end
|
||||
|
||||
-- #################################################
|
||||
|
||||
-- Convert to the format accepted by the vue Chart/Pie component
|
||||
-- js_formatter: render function (e.g. 'format_bytes')
|
||||
-- Input format (res):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue