Updated timeseries list and added tops

This commit is contained in:
MatteoBiscosi 2022-11-08 16:57:17 +01:00
parent 12817e6ce9
commit 4624d07289
16 changed files with 322 additions and 439 deletions

View file

@ -5,11 +5,6 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if(ntop.isPro()) then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local snmp_utils = require "snmp_utils"
end
require "lua_utils"
local graph_utils = require "graph_utils"
local ts_utils = require("ts_utils")
@ -27,7 +22,6 @@ local ifId = interface.getId()
local as_info = interface.getASInfo(asn) or {}
local asname = as_info["asname"]
local base_url = ntop.getHttpPrefix() .. "/lua/as_details.lua"
local asn_behavior_update_freq = 300 -- An update each 300 seconds
local page_params = {}
@ -77,27 +71,6 @@ end
-- #######################
local function addDropdownEntries(entries, base_url, param_arr, param_filter, curr_filter)
local dropdownString = ""
for _, htype in ipairs(entries) do
if type(htype) == "string" then
-- plain html
dropdownString = htype
goto continue
end
param_arr[param_filter] = htype[1]
dropdownString = dropdownString .. '<li><a class="dropdown-item' .. (htype[1] == curr_filter and 'active' or '') .. '" href="' .. getPageUrl(base_url, param_arr) .. '">' .. htype[2] .. '</a></li>'
::continue::
end
return dropdownString
end
-- #######################
page_utils.set_active_menu_entry(page_utils.menu_entries.autonomous_systems)
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
@ -138,7 +111,6 @@ if isEmptyString(page) or page == "historical" then
print(" "..i18n("as_details.as_timeseries_enable_message",{url = ntop.getHttpPrefix().."/lua/admin/prefs.lua?tab=on_disk_ts",icon_flask="<i class=\"fas fa-flask\"></i>"})..'</div>')
else
-- top_protocols = "top:asn:ndpi"
graph_utils.drawNewGraphs(tonumber(asn), interface.getId())
end

View file

@ -310,15 +310,6 @@ for key in pairsByValues(sort_to_key, sOrder) do
record["column_periodicity"] = format_utils.secondsToTime(script_stats.stats.periodicity)
if areInternalTimeseriesEnabled(script_stats.ifid) then
if script_stats.ifid == getSystemInterfaceId() then
record["column_chart"] = '<A HREF=\"'..ntop.getHttpPrefix()..'/lua/system_periodic_script_details.lua?periodic_script='..script_stats.script..'&ts_schema=periodic_script:duration\"><i class=\'fas fa-chart-area fa-lg\'></i></A>'
else
record["column_chart"] = '<A HREF=\"'..ntop.getHttpPrefix()..'/lua/periodic_script_details.lua?periodic_script='..script_stats.script..'&ts_schema=periodic_script:duration&ifid='..script_stats.ifid..'\"><i class=\'fas fa-chart-area fa-lg\'></i></A>'
end
end
res[#res + 1] = record
end

View file

@ -396,23 +396,6 @@ elseif(page == "snmp" and has_snmp_location) then
print[[</table>]]
elseif(page == "historical") then
graph_utils.drawNewGraphs(nil, interface.getId())
-- local schema = _GET["ts_schema"] or "mac:traffic"
-- local selected_epoch = _GET["epoch"] or ""
-- tprint(hostinfo2hostkey(host_info))
-- url = url..'&page=historical&mac='..hostinfo2hostkey(host_info)
-- --..hostinfo2url(host_info, nil, nil, "mac")
-- local tags = {
-- ifid = ifId,
-- mac = mac,
-- category = _GET["category"],
-- }
-- graph_utils.drawGraphs(ifId, schema, tags, _GET["zoom"], url, selected_epoch, {
-- top_categories = "top:mac:ndpi_categories",
-- timeseries = table.merge({
-- {schema="mac:traffic", label=i18n("traffic"), split_directions = true --[[ split RX and TX directions ]]},
-- }, graph_utils.getDeviceCommonTimeseries())
-- })
elseif(page == "config") then
if(not isAdministrator()) then
return

View file

@ -87,15 +87,6 @@ $("#table-system-interfaces-stats").datatable({
textAlign: 'left',
width: '10%',
}
}, {
title: "]] print(i18n("chart")) print[[",
field: "column_chart",
hidden: ]] if not ifid or not ts_creation then print('true') else print('false') end print[[,
sortable: false,
css: {
textAlign: 'center',
width: '1%',
}
}, {
title: "]] print(i18n("internals.state_active")) print[[",
field: "column_active_entries",
@ -348,15 +339,6 @@ $("#table-internals-periodic-activities").datatable({
textAlign: 'right',
width: '3%',
}
}, {
title: "]] print(i18n("chart")) print[[",
field: "column_chart",
hidden: ]] if not ts_creation then print('true') else print('false') end print[[,
sortable: false,
css: {
textAlign: 'center',
width: '1%',
}
}, {
title: "]] print(i18n("internals.time_usage")) print[[",
field: "column_time_perc",
@ -682,105 +664,4 @@ end
-- ###########################################
function internals_utils.printPeriodicActivityDetails(ifId, url)
local periodic_script = _GET["periodic_script"]
local schema = _GET["ts_schema"] or "custom:flow_script:stats"
local selected_epoch = _GET["epoch"] or ""
url = url..'&page=historical'
if ifId and tostring(getSystemInterfaceId()) ~= ifId then
url = url..'&ifid='..ifId
end
local tags = {
ifid = ifId,
periodic_script = periodic_script,
}
local periodic_scripts_ts = {}
for script, script_details in pairsByKeys(periodic_activities_utils.periodic_activities) do
local max_duration = script_details["max_duration"]
periodic_scripts_ts[#periodic_scripts_ts + 1] = {
schema = "periodic_script:duration",
label = i18n("internals.chart_script_duration", {script = script}),
extra_params = {periodic_script = script},
metrics_labels = {i18n("flow_checks.last_duration"), },
-- Horizontal line with max duration
extra_series = {
{
label = i18n("internals.max_duration_ms"),
axis = 1,
type = "line",
color = "red",
value = max_duration * 1000,
class = "line-dashed",
},
}
}
if ts_utils.getDriverName() == "rrd" then
periodic_scripts_ts[#periodic_scripts_ts + 1] = {
schema = "periodic_script:timeseries_writes",
label = i18n("internals.chart_script_rrds", {script = script}),
extra_params = {periodic_script = script},
metrics_labels = {i18n("internals.num_writes"), i18n("internals.num_drops")},
value_formatter = {"NtopUtils.fpoints", "formatPoints"}
}
end
end
if ts_utils.getDriverName() == "rrd" then
periodic_scripts_ts[#periodic_scripts_ts + 1] = {
separator = 1,
}
periodic_scripts_ts[#periodic_scripts_ts + 1] = {
schema = "iface:ts_queue_length",
label = i18n("internals.timeseries_queue_length"),
metrics_labels = {i18n("internals.timeseries_queued_points")},
}
end
local timeseries = periodic_scripts_ts
if tostring(ifId) ~= getSystemInterfaceId() and ntop.getPref("ntopng.prefs.checks_rrd_creation") == "1" then
timeseries = table.merge(timeseries,
{
{
separator = 1,
label="dequeue_flows_for_hooks.lua"
},
{
schema = "flow_script:lua_duration",
label = i18n("internals.flow_lua_duration"),
metrics_labels = {
i18n("duration")
}
},
{
schema = "custom:flow_script:stats",
label = i18n("internals.flow_calls_stats"),
metrics_labels =
{
i18n("internals.missed_idle"),
i18n("internals.missed_proto_detected"),
i18n("internals.missed_periodic_update"),
i18n("internals.pending_proto_detected"),
i18n("internals.pending_periodic_update"),
i18n("internals.successful_calls")
},
},
})
end
graph_utils.drawGraphs(ifId, schema, tags, _GET["zoom"], url, selected_epoch, { timeseries = timeseries })
end
-- ###########################################
return internals_utils

View file

@ -49,6 +49,28 @@ local series_extra_info = {
-- #################################
local timeseries_id = {
iface = "iface",
host = "host",
mac = "mac",
network = "subnet",
asn = "asn",
country = "country",
os = "os",
vlan = "vlan",
host_pool = "host_pool",
pod = "pod",
container = "container",
hash_state = "ht",
system = "system",
profile = "profile",
redis = "redis",
influxdb = "influxdb",
active_monitoring = "am"
}
-- #################################
function timeseries_info.get_timeseries_color(subject)
if series_extra_info[subject] then
return series_extra_info[subject].color
@ -63,124 +85,239 @@ end
-- Timeseries list
local community_timeseries = {
{ schema = "iface:traffic_rxtx", label = i18n("graphs.traffic_rxtx"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "iface:flows", label = i18n("graphs.active_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:new_flows", label = i18n("graphs.new_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { new_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:alerted_flows", label = i18n("graphs.total_alerted_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:hosts", label = i18n("graphs.active_hosts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.hosts'), timeseries = { num_hosts = { label = i18n('graphs.metric_labels.num_hosts'), color = timeseries_info.get_timeseries_color('hosts') }}},
{ schema = "iface:engaged_alerts", label = i18n("graphs.engaged_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { engaged_alerts = { label = i18n('graphs.engaged_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
{ schema = "iface:dropped_alerts", label = i18n("graphs.dropped_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { dropped_alerts = { label = i18n('graphs.dropped_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
{ schema = "iface:devices", label = i18n("graphs.active_devices"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.devices'), timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_devices'), color = timeseries_info.get_timeseries_color('devices') }}},
{ schema = "iface:http_hosts", label = i18n("graphs.active_http_servers"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.servers'), timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_servers'), color = timeseries_info.get_timeseries_color('devices') }}, nedge_exclude = true },
{ schema = "iface:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.traffic'), color = timeseries_info.get_timeseries_color('devices') }}, nedge_exclude = true },
{ schema = "iface:score", label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { cli_score = { label = i18n('graphs.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') }}},
{ schema = "iface:packets_vs_drops", label = i18n("graphs.packets_vs_drops"), priority = 0, measure_unit = "number", scale = 0, timeseries = { packets = { label = i18n('graphs.metric_labels.packets'), color = timeseries_info.get_timeseries_color('packets') }, drops = { label = i18n('graphs.metric_labels.drops'), draw_type = "line", color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "iface:nfq_pct", label = i18n("graphs.num_nfq_pct"), priority = 0, measure_unit = "percentage", scale = 0, timeseries = { num_nfq_pct = { label = i18n('graphs.num_nfq_pct'), color = timeseries_info.get_timeseries_color('default') }}, nedge_only = true },
{ schema = "iface:hosts_anomalies", label = i18n("graphs.hosts_anomalies"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.anomalies'), timeseries = { num_loc_hosts_anom = { label = i18n('graphs.loc_host_anomalies'), color = timeseries_info.get_timeseries_color('hosts') }, num_rem_hosts_anom = { label = i18n('graphs.rem_host_anomalies'), draw_type = "line", color = timeseries_info.get_timeseries_color('hosts') }}},
{ schema = "iface:disc_prob_bytes", label = i18n("graphs.discarded_probing_bytes"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.drops'), color = timeseries_info.get_timeseries_color('bytes') }}, nedge_exclude = true },
{ schema = "iface:disc_prob_pkts", label = i18n("graphs.discarded_probing_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets = { label = i18n('graphs.metric_labels.drops'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:dumped_flows", label = i18n("graphs.dumped_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { dumped_flows = { label = i18n('graphs.dumped_flows'), color = timeseries_info.get_timeseries_color('flows') }, dropped_flows = { label = i18n('graphs.dumped_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:zmq_recv_flows", label = i18n("graphs.zmq_received_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { flows = { label = i18n('graphs.zmq_received_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:zmq_flow_coll_drops", label = i18n("graphs.zmq_flow_coll_drops"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { drops = { label = i18n('graphs.zmq_flow_coll_drops'), color = timeseries_info.get_timeseries_color('default') }}, nedge_exclude = true },
{ schema = "iface:zmq_flow_coll_udp_drops", label = i18n("graphs.zmq_flow_coll_udp_drops"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { drops = { label = i18n('graphs.zmq_flow_coll_udp_drops'), color = timeseries_info.get_timeseries_color('default') }}, nedge_exclude = true },
{ schema = "iface:tcp_lost", label = i18n("graphs.tcp_packets_lost"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_lost'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_out_of_order", label = i18n("graphs.tcp_packets_ooo"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_ooo'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_retransmissions", label = i18n("graphs.tcp_packets_retr"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_retr'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_keep_alive", label = i18n("graphs.tcp_packets_keep_alive"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_keep_alive'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_syn", label = i18n("graphs.tcp_syn_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_syn_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_synack", label = i18n("graphs.tcp_synack_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_syn_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_finack", label = i18n("graphs.tcp_finack_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_finack_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_rst", label = i18n("graphs.tcp_rst_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:traffic_rxtx", id = timeseries_id.iface, label = i18n("graphs.traffic_rxtx"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "iface:flows", id = timeseries_id.iface, label = i18n("graphs.active_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:new_flows", id = timeseries_id.iface, label = i18n("graphs.new_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { new_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:alerted_flows", id = timeseries_id.iface, label = i18n("graphs.total_alerted_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:hosts", id = timeseries_id.iface, label = i18n("graphs.active_hosts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.hosts'), timeseries = { num_hosts = { label = i18n('graphs.metric_labels.num_hosts'), color = timeseries_info.get_timeseries_color('hosts') }}},
{ schema = "iface:engaged_alerts", id = timeseries_id.iface, label = i18n("graphs.engaged_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { engaged_alerts = { label = i18n('graphs.engaged_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
{ schema = "iface:dropped_alerts", id = timeseries_id.iface, label = i18n("graphs.dropped_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { dropped_alerts = { label = i18n('graphs.dropped_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
{ schema = "iface:devices", id = timeseries_id.iface, label = i18n("graphs.active_devices"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.devices'), timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_devices'), color = timeseries_info.get_timeseries_color('devices') }}},
{ schema = "iface:http_hosts", id = timeseries_id.iface, label = i18n("graphs.active_http_servers"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.servers'), timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_servers'), color = timeseries_info.get_timeseries_color('devices') }}, nedge_exclude = true },
{ schema = "iface:traffic", id = timeseries_id.iface, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.traffic'), color = timeseries_info.get_timeseries_color('devices') }}, nedge_exclude = true },
{ schema = "iface:score", id = timeseries_id.iface, label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { cli_score = { label = i18n('graphs.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') }}},
{ schema = "iface:packets_vs_drops", id = timeseries_id.iface, label = i18n("graphs.packets_vs_drops"), priority = 0, measure_unit = "number", scale = 0, timeseries = { packets = { label = i18n('graphs.metric_labels.packets'), color = timeseries_info.get_timeseries_color('packets') }, drops = { label = i18n('graphs.metric_labels.drops'), draw_type = "line", color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "iface:nfq_pct", id = timeseries_id.iface, label = i18n("graphs.num_nfq_pct"), priority = 0, measure_unit = "percentage", scale = 0, timeseries = { num_nfq_pct = { label = i18n('graphs.num_nfq_pct'), color = timeseries_info.get_timeseries_color('default') }}, nedge_only = true },
{ schema = "iface:hosts_anomalies", id = timeseries_id.iface, label = i18n("graphs.hosts_anomalies"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.anomalies'), timeseries = { num_loc_hosts_anom = { label = i18n('graphs.loc_host_anomalies'), color = timeseries_info.get_timeseries_color('hosts') }, num_rem_hosts_anom = { label = i18n('graphs.rem_host_anomalies'), draw_type = "line", color = timeseries_info.get_timeseries_color('hosts') }}},
{ schema = "iface:disc_prob_bytes", id = timeseries_id.iface, label = i18n("graphs.discarded_probing_bytes"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.drops'), color = timeseries_info.get_timeseries_color('bytes') }}, nedge_exclude = true },
{ schema = "iface:disc_prob_pkts", id = timeseries_id.iface, label = i18n("graphs.discarded_probing_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets = { label = i18n('graphs.metric_labels.drops'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:dumped_flows", id = timeseries_id.iface, label = i18n("graphs.dumped_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { dumped_flows = { label = i18n('graphs.dumped_flows'), color = timeseries_info.get_timeseries_color('flows') }, dropped_flows = { label = i18n('graphs.dumped_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:zmq_recv_flows", id = timeseries_id.iface, label = i18n("graphs.zmq_received_flows"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { flows = { label = i18n('graphs.zmq_received_flows'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "iface:zmq_flow_coll_drops", id = timeseries_id.iface, label = i18n("graphs.zmq_flow_coll_drops"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { drops = { label = i18n('graphs.zmq_flow_coll_drops'), color = timeseries_info.get_timeseries_color('default') }}, nedge_exclude = true },
{ schema = "iface:zmq_flow_coll_udp_drops", id = timeseries_id.iface, label = i18n("graphs.zmq_flow_coll_udp_drops"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.flows'), timeseries = { drops = { label = i18n('graphs.zmq_flow_coll_udp_drops'), color = timeseries_info.get_timeseries_color('default') }}, nedge_exclude = true },
{ schema = "iface:tcp_lost", id = timeseries_id.iface, label = i18n("graphs.tcp_packets_lost"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_lost'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_out_of_order", id = timeseries_id.iface, label = i18n("graphs.tcp_packets_ooo"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_ooo'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_retransmissions", id = timeseries_id.iface, label = i18n("graphs.tcp_packets_retr"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_retr'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_keep_alive", id = timeseries_id.iface, label = i18n("graphs.tcp_packets_keep_alive"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_packets_keep_alive'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_syn", id = timeseries_id.iface, label = i18n("graphs.tcp_syn_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_syn_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_synack", id = timeseries_id.iface, label = i18n("graphs.tcp_synack_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_syn_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_finack", id = timeseries_id.iface, label = i18n("graphs.tcp_finack_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_finack_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "iface:tcp_rst", id = timeseries_id.iface, label = i18n("graphs.tcp_rst_packets"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
-- host_details.lua (HOST): --
{ schema = "host:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "host:score", label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { cli_score = { label = i18n('graphs.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') }}},
{ schema = "host:active_flows", label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:total_flows", label = i18n("graphs.total_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:num_blacklisted_flows", label = i18n("graphs.num_blacklisted_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:alerted_flows", label = i18n("graphs.total_alerted_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:unreachable_flows", label = i18n("graphs.total_unreachable_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:host_unreachable_flows", label = i18n("graphs.host_unreachable_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:contacts", label = i18n("graphs.active_host_contacts"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { num_as_clients = { label = i18n('graphs.metric_labels.as_cli'), color = timeseries_info.get_timeseries_color('flows') }, num_as_server = { label = i18n('graphs.metric_labels.as_srv'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:contacts_behaviour", label = i18n("graphs.host_contacts_behaviour"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.contacts'), timeseries = { value = { label = i18n('graphs.score'), color = timeseries_info.get_timeseries_color('score') }, lower_bound = { label = i18n('graphs.lower_bound'), draw_type = "line", color = timeseries_info.get_timeseries_color('score') }, upper_bound = { label = i18n('graphs.upper_bound'), draw_type = "line", color = timeseries_info.get_timeseries_color('score') }}, nedge_exclude = true },
{ schema = "host:total_alerts", label = i18n("graphs.alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { alerts = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:engaged_alerts", label = i18n("graphs.engaged_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { alerts = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:dns_qry_sent_rsp_rcvd", label = i18n("graphs.dns_qry_sent_rsp_rcvd"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.queries'), timeseries = { queries_pkts = { label = i18n('graphs.metric_labels.queries_pkts'),color = timeseries_info.get_timeseries_color('default') }, replies_ok_pkts = { label = i18n('graphs.metric_labels.ok_pkts'), color = timeseries_info.get_timeseries_color('default') }, replies_error_pkts = { label = i18n('graphs.metric_labels.error_pkts'), color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "host:dns_qry_rcvd_rsp_sent", label = i18n("graphs.dns_qry_rcvd_rsp_sent"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.queries'), timeseries = { queries_pkts = { label = i18n('graphs.metric_labels.queries_pkts'),color = timeseries_info.get_timeseries_color('default') }, replies_ok_pkts = { label = i18n('graphs.metric_labels.ok_pkts'), color = timeseries_info.get_timeseries_color('default') }, replies_error_pkts = { label = i18n('graphs.metric_labels.error_pkts'), color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "host:tcp_rx_stats", label = i18n("graphs.tcp_rx_stats"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { retran_pkts = { label = i18n('graphs.metric_labels.retra_pkts'), color = timeseries_info.get_timeseries_color('packets') }, out_of_order_pkts = { label = i18n('graphs.metric_labels.ooo_pkts'), color = timeseries_info.get_timeseries_color('packets') }, lost_packets = { label = i18n('graphs.metric_labels.lost_pkts'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:tcp_tx_stats", label = i18n("graphs.tcp_tx_stats"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { retran_pkts = { label = i18n('graphs.metric_labels.retra_pkts'), color = timeseries_info.get_timeseries_color('packets') }, out_of_order_pkts = { label = i18n('graphs.metric_labels.ooo_pkts'), color = timeseries_info.get_timeseries_color('packets') }, lost_packets = { label = i18n('graphs.metric_labels.lost_pkts'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:udp_pkts", label = i18n("graphs.udp_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:echo_reply_packets", label = i18n("graphs.echo_reply_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:echo_packets", label = i18n("graphs.echo_request_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:tcp_packets", label = i18n("graphs.tcp_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:udp_sent_unicast", label = i18n("graphs.udp_sent_unicast_vs_non_unicast"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent_unicast = { label = i18n('graphs.metric_labels.sent_uni'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_sent_non_uni = { label = i18n('graphs.metric_labels.sent_non_uni'), color = timeseries_info.get_timeseries_color('bytes') }}},
{ schema = "host:dscp", label = i18n("graphs.dscp_classes"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }}},
{ schema = "host:host_tcp_unidirectional_flows", label = i18n("graphs.unidirectional_tcp_flows"), priority = 0, measure_unit = "fps",scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:traffic", id = timeseries_id.host, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "host:score", id = timeseries_id.host, label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { cli_score = { label = i18n('graphs.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') }}},
{ schema = "host:active_flows", id = timeseries_id.host, label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:total_flows", id = timeseries_id.host, label = i18n("graphs.total_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:num_blacklisted_flows", id = timeseries_id.host, label = i18n("graphs.num_blacklisted_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:alerted_flows", id = timeseries_id.host, label = i18n("graphs.total_alerted_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:unreachable_flows", id = timeseries_id.host, label = i18n("graphs.total_unreachable_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:host_unreachable_flows", id = timeseries_id.host, label = i18n("graphs.host_unreachable_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:contacts", id = timeseries_id.host, label = i18n("graphs.active_host_contacts"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { num_as_clients = { label = i18n('graphs.metric_labels.as_cli'), color = timeseries_info.get_timeseries_color('flows') }, num_as_server = { label = i18n('graphs.metric_labels.as_srv'), color = timeseries_info.get_timeseries_color('flows') }}},
{ schema = "host:contacts_behaviour", id = timeseries_id.host, label = i18n("graphs.host_contacts_behaviour"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.contacts'), timeseries = { value = { label = i18n('graphs.score'), color = timeseries_info.get_timeseries_color('score') }, lower_bound = { label = i18n('graphs.lower_bound'), draw_type = "line", color = timeseries_info.get_timeseries_color('score') }, upper_bound = { label = i18n('graphs.upper_bound'), draw_type = "line", color = timeseries_info.get_timeseries_color('score') }}, nedge_exclude = true },
{ schema = "host:total_alerts", id = timeseries_id.host, label = i18n("graphs.alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { alerts = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:engaged_alerts", id = timeseries_id.host, label = i18n("graphs.engaged_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { alerts = { label = i18n('graphs.tcp_rst_packets'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:dns_qry_sent_rsp_rcvd", id = timeseries_id.host, label = i18n("graphs.dns_qry_sent_rsp_rcvd"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.queries'), timeseries = { queries_pkts = { label = i18n('graphs.metric_labels.queries_pkts'),color = timeseries_info.get_timeseries_color('default') }, replies_ok_pkts = { label = i18n('graphs.metric_labels.ok_pkts'), color = timeseries_info.get_timeseries_color('default') }, replies_error_pkts = { label = i18n('graphs.metric_labels.error_pkts'), color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "host:dns_qry_rcvd_rsp_sent", id = timeseries_id.host, label = i18n("graphs.dns_qry_rcvd_rsp_sent"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.queries'), timeseries = { queries_pkts = { label = i18n('graphs.metric_labels.queries_pkts'),color = timeseries_info.get_timeseries_color('default') }, replies_ok_pkts = { label = i18n('graphs.metric_labels.ok_pkts'), color = timeseries_info.get_timeseries_color('default') }, replies_error_pkts = { label = i18n('graphs.metric_labels.error_pkts'), color = timeseries_info.get_timeseries_color('default') }}},
{ schema = "host:tcp_rx_stats", id = timeseries_id.host, label = i18n("graphs.tcp_rx_stats"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { retran_pkts = { label = i18n('graphs.metric_labels.retra_pkts'), color = timeseries_info.get_timeseries_color('packets') }, out_of_order_pkts = { label = i18n('graphs.metric_labels.ooo_pkts'), color = timeseries_info.get_timeseries_color('packets') }, lost_packets = { label = i18n('graphs.metric_labels.lost_pkts'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:tcp_tx_stats", id = timeseries_id.host, label = i18n("graphs.tcp_tx_stats"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { retran_pkts = { label = i18n('graphs.metric_labels.retra_pkts'), color = timeseries_info.get_timeseries_color('packets') }, out_of_order_pkts = { label = i18n('graphs.metric_labels.ooo_pkts'), color = timeseries_info.get_timeseries_color('packets') }, lost_packets = { label = i18n('graphs.metric_labels.lost_pkts'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:udp_pkts", id = timeseries_id.host, label = i18n("graphs.udp_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:echo_reply_packets", id = timeseries_id.host, label = i18n("graphs.echo_reply_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:echo_packets", id = timeseries_id.host, label = i18n("graphs.echo_request_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:tcp_packets", id = timeseries_id.host, label = i18n("graphs.tcp_packets"), priority = 0, measure_unit = "pps", scale = 0, timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}},
{ schema = "host:udp_sent_unicast", id = timeseries_id.host, label = i18n("graphs.udp_sent_unicast_vs_non_unicast"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent_unicast = { label = i18n('graphs.metric_labels.sent_uni'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_sent_non_uni = { label = i18n('graphs.metric_labels.sent_non_uni'), color = timeseries_info.get_timeseries_color('bytes') }}},
{ schema = "host:dscp", id = timeseries_id.host, label = i18n("graphs.dscp_classes"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }}},
{ schema = "host:host_tcp_unidirectional_flows", id = timeseries_id.host, label = i18n("graphs.unidirectional_tcp_flows"), priority = 0, measure_unit = "fps",scale = 0, timeseries = { flows_as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, flows_as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('flows') }}},
-- mac_details.lua (MAC): --
{ schema = "mac:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "mac:traffic", id = timeseries_id.mac, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
-- network_details.lua (SUBNET): --
{ schema = "subnet:traffic", label = i18n("graphs.traffic"), measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }}, default_visible = true },
{ schema = "subnet:broadcast_traffic", label = i18n("broadcast_traffic"), measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }} },
{ schema = "subnet:engaged_alerts", label = i18n("show_alerts.engaged_alerts"), measure_unit = "number", scale = 0, timeseries = { alerts = { label = i18n('graphs.engaged_alerts') }} },
{ schema = "subnet:score", label = i18n("score"), measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
{ schema = "subnet:tcp_retransmissions", label = i18n("graphs.tcp_packets_retr"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_out_of_order", label = i18n("graphs.tcp_packets_ooo"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_lost", label = i18n("graphs.tcp_packets_lost"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_keep_alive", label = i18n("graphs.tcp_packets_keep_alive"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:traffic", id = timeseries_id.network, label = i18n("graphs.traffic"), measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }}, default_visible = true },
{ schema = "subnet:broadcast_traffic", id = timeseries_id.network, label = i18n("broadcast_traffic"), measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }} },
{ schema = "subnet:engaged_alerts", id = timeseries_id.network, label = i18n("show_alerts.engaged_alerts"), measure_unit = "number", scale = 0, timeseries = { alerts = { label = i18n('graphs.engaged_alerts') }} },
{ schema = "subnet:score", id = timeseries_id.network, label = i18n("score"), measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
{ schema = "subnet:tcp_retransmissions", id = timeseries_id.network, label = i18n("graphs.tcp_packets_retr"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_out_of_order", id = timeseries_id.network, label = i18n("graphs.tcp_packets_ooo"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_lost", id = timeseries_id.network, label = i18n("graphs.tcp_packets_lost"), measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
{ schema = "subnet:tcp_keep_alive", id = timeseries_id.network, label = i18n("graphs.tcp_packets_keep_alive"),measure_unit = "number", scale = 0, timeseries = { packets_ingress = { label = i18n('if_stats_overview.ingress_packets') }, packets_egress = { label = i18n('if_stats_overview.egress_packets') }, packets_inner = { label = 'Inner Packets' } }},
-- as_details.lua (ASN): --
{ schema = "asn:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "asn:rtt", label = i18n("graphs.rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { millis_rtt = { label = i18n('graphs.metric_labels.rtt'), color = timeseries_info.get_timeseries_color('default') } }, nedge_exclude = true },
{ schema = "asn:traffic_sent", label = i18n("graphs.traffic_sent"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') } }, nedge_exclude = true },
{ schema = "asn:traffic_rcvd", label = i18n("graphs.traffic_rcvd"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') } }, nedge_exclude = true },
{ schema = "asn:score", label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { score = { label = i18n('graphs.metric_labels.score'), color = timeseries_info.get_timeseries_color('score') }, cli_score = { label = i18n('graphs.metric_labels.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.metric_labels.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') } }},
{ schema = "asn:tcp_retransmissions", label = i18n("graphs.tcp_packets_retr"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_keep_alive", label = i18n("graphs.tcp_packets_keep_alive"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_out_of_order", label = i18n("graphs.tcp_packets_ooo"), priority = 0, measure_unit = "number", scale = i18n('graphs.tcp_packets_ooo'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_lost", label = i18n("graphs.tcp_packets_lost"), priority = 0, measure_unit = "number", scale = i18n('graphs.tcp_packets_lost'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:traffic", id = timeseries_id.asn, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "asn:rtt", id = timeseries_id.asn, label = i18n("graphs.rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { millis_rtt = { label = i18n('graphs.metric_labels.rtt'), color = timeseries_info.get_timeseries_color('default') } }, nedge_exclude = true },
{ schema = "asn:traffic_sent", id = timeseries_id.asn, label = i18n("graphs.traffic_sent"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') } }, nedge_exclude = true },
{ schema = "asn:traffic_rcvd", id = timeseries_id.asn, label = i18n("graphs.traffic_rcvd"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') } }, nedge_exclude = true },
{ schema = "asn:score", id = timeseries_id.asn, label = i18n("graphs.score"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.score'), timeseries = { score = { label = i18n('graphs.metric_labels.score'), color = timeseries_info.get_timeseries_color('score') }, cli_score = { label = i18n('graphs.metric_labels.cli_score'), color = timeseries_info.get_timeseries_color('cli_score') }, srv_score = { label = i18n('graphs.metric_labels.srv_score'), color = timeseries_info.get_timeseries_color('srv_score') } }},
{ schema = "asn:tcp_retransmissions", id = timeseries_id.asn, label = i18n("graphs.tcp_packets_retr"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_keep_alive", id = timeseries_id.asn, label = i18n("graphs.tcp_packets_keep_alive"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.packets'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_out_of_order", id = timeseries_id.asn, label = i18n("graphs.tcp_packets_ooo"), priority = 0, measure_unit = "number", scale = i18n('graphs.tcp_packets_ooo'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
{ schema = "asn:tcp_lost", id = timeseries_id.asn, label = i18n("graphs.tcp_packets_lost"), priority = 0, measure_unit = "number", scale = i18n('graphs.tcp_packets_lost'), timeseries = { packets_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('packets') }, packets_rcvd = { label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('packets') }}, nedge_exclude = true },
-- country_details.lua (Country): --
{ schema = "country:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }}, default_visible = true },
{ schema = "country:score", label = i18n("score"), priority = 0, measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
{ schema = "country:traffic", id = timeseries_id.country, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }, bytes_inner = { label = i18n('graphs.metrics_suffixes.inner') }}, default_visible = true },
{ schema = "country:score", id = timeseries_id.country, label = i18n("score"), priority = 0, measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
-- os_details.lua (Operative System): --
{ schema = "os:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }}, default_visible = true },
{ schema = "os:traffic", id = timeseries_id.os, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_egress = { label = i18n('graphs.metrics_suffixes.egress') }, bytes_ingress = { label = i18n('graphs.metrics_suffixes.ingress') }}, default_visible = true },
-- vlan_details.lua (VLAN): --
{ schema = "vlan:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "vlan:score", label = i18n("score"), priority = 0, measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
{ schema = "vlan:traffic", id = timeseries_id.vlan, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "vlan:score", id = timeseries_id.vlan, label = i18n("score"), priority = 0, measure_unit = "number", scale = 0, timeseries = { score = { label = i18n('score') }, scoreAsClient = { label = i18n('score_as_client') }, scoreAsServer = { label = i18n('score_as_server') } }},
-- pool_details.lua (Host Pool): --
{ schema = "host_pool:traffic", label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "host_pool:blocked_flows", label = i18n("graphs.blocked_flows"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "host_pool:hosts", label = i18n("graphs.active_hosts"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_hosts = { label = i18n('graphs.metric_labels.num_hosts'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "host_pool:devices", label = i18n("graphs.active_devices"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_devices'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "host_pool:traffic", id = timeseries_id.host_pool, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes_sent') }, bytes_rcvd = { invert_direction = true, label = i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "host_pool:blocked_flows", id = timeseries_id.host_pool, label = i18n("graphs.blocked_flows"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_flows = { label = i18n('graphs.metric_labels.num_flows'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "host_pool:hosts", id = timeseries_id.host_pool, label = i18n("graphs.active_hosts"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_hosts = { label = i18n('graphs.metric_labels.num_hosts'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "host_pool:devices", id = timeseries_id.host_pool, label = i18n("graphs.active_devices"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_devices = { label = i18n('graphs.metric_labels.num_devices'), color = timeseries_info.get_timeseries_color('default') } } },
-- pod_details.lua (Pod): --
{ schema = "pod:num_flows", label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "pod:num_containers", label = i18n("containers_stats.containers"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_containers = { label = i18n('graphs.metric_labels.num_containers'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "pod:rtt", label = i18n("containers_stats.avg_rtt"), priority = 0, measure_unit = "rtt", scale = 0, timeseries = { as_client = { label = i18n('graphs.rtt_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.rtt_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "pod:rtt_variance", label = i18n("containers_stats.avg_rtt_variance"),priority = 0, measure_unit = "rtt", scale = 0, timeseries = { as_client = { label = i18n('graphs.variance_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.variance_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "pod:num_flows", id = timeseries_id.pod, label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "pod:num_containers", id = timeseries_id.pod, label = i18n("containers_stats.containers"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_containers = { label = i18n('graphs.metric_labels.num_containers'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "pod:rtt", id = timeseries_id.pod, label = i18n("containers_stats.avg_rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { as_client = { label = i18n('graphs.rtt_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.rtt_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "pod:rtt_variance", id = timeseries_id.pod, label = i18n("containers_stats.avg_rtt_variance"),priority = 0, measure_unit = "ms", scale = 0, timeseries = { as_client = { label = i18n('graphs.variance_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.variance_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
-- container_details.lua (Container): --
{ schema = "container:num_flows", label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "container:rtt", label = i18n("containers_stats.avg_rtt"), priority = 0, measure_unit = "rtt", scale = 0, timeseries = { as_client = { label = i18n('graphs.rtt_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.rtt_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "container:rtt_variance", label = i18n("containers_stats.avg_rtt_variance"),priority = 0, measure_unit = "rtt", scale = 0, timeseries = { as_client = { label = i18n('graphs.variance_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.variance_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "container:num_flows", id = timeseries_id.container, label = i18n("graphs.active_flows"), priority = 0, measure_unit = "fps", scale = 0, timeseries = { as_client = { label = i18n('graphs.flows_as_client'), color = timeseries_info.get_timeseries_color('flows') }, as_server = { label = i18n('graphs.flows_as_server'), color = timeseries_info.get_timeseries_color('bytes_rcvd') }}, default_visible = true },
{ schema = "container:rtt", id = timeseries_id.container, label = i18n("containers_stats.avg_rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { as_client = { label = i18n('graphs.rtt_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.rtt_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "container:rtt_variance", id = timeseries_id.container, label = i18n("containers_stats.avg_rtt_variance"),priority = 0, measure_unit = "ms", scale = 0, timeseries = { as_client = { label = i18n('graphs.variance_as_client'), color = timeseries_info.get_timeseries_color('default') }, as_server = { label = i18n('graphs.variance_as_server'), color = timeseries_info.get_timeseries_color('default') } } },
-- hash_table_details.lua (Hash Table): --
{ schema = "ht:state", label = i18n("hash_table.CountriesHash"), priority = 0, measure_unit = "number", ts_query = "CountriesHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.HostHash"), priority = 0, measure_unit = "number", ts_query = "HostHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.MacHash"), priority = 0, measure_unit = "number", ts_query = "MacHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.FlowHash"), priority = 0, measure_unit = "number", ts_query = "FlowHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.AutonomousSystemHash"), priority = 0, measure_unit = "number", ts_query = "AutonomousSystemHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.ObservationPointHash"), priority = 0, measure_unit = "number", ts_query = "ObservationPointHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", label = i18n("hash_table.VlanHash"), priority = 0, measure_unit = "number", ts_query = "VlanHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("about.cpu_load"), priority = 0, measure_unit = "number", ts_query = "CountriesHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.HostHash"), priority = 0, measure_unit = "number", ts_query = "HostHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.MacHash"), priority = 0, measure_unit = "number", ts_query = "MacHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.FlowHash"), priority = 0, measure_unit = "number", ts_query = "FlowHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.AutonomousSystemHash"), priority = 0, measure_unit = "number", ts_query = "AutonomousSystemHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.ObservationPointHash"), priority = 0, measure_unit = "number", ts_query = "ObservationPointHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
{ schema = "ht:state", id = timeseries_id.hash_state, label = i18n("hash_table.VlanHash"), priority = 0, measure_unit = "number", ts_query = "VlanHash", scale = 0, timeseries = { num_idle = { label = i18n('graphs.metric_labels.num_idle'), color = timeseries_info.get_timeseries_color('default') }, num_active = { label = i18n('graphs.metric_labels.num_active'), color = timeseries_info.get_timeseries_color('default') }}, default_visible = true },
-- system_stats.lua (System Stats): --
{ schema = "system:cpu_states", id = timeseries_id.system, label = i18n("about.cpu_load"), priority = 0, measure_unit = "number", scale = 0, timeseries = { iowait_pct = { label = i18n('about.iowait'), color = timeseries_info.get_timeseries_color('default') }, active_pct = { label = i18n('about.active'), color = timeseries_info.get_timeseries_color('default') }, idle_pct = { label = i18n('about.idle'), color = timeseries_info.get_timeseries_color('default') } }, default_visible = true },
{ schema = "process:resident_memory", id = timeseries_id.system, label = i18n("graphs.process_memory"), priority = 0, measure_unit = "bytes", scale = 0, timeseries = { resident_bytes = { label = i18n('graphs.metric_labels.bytes'), color = timeseries_info.get_timeseries_color('bytes') } } },
{ schema = "process:num_alerts", id = timeseries_id.system, label = i18n("graphs.process_alerts"), priority = 0, measure_unit = "bytes", scale = 0, timeseries = { written_alerts = { label = i18n('about.alerts_stored'), color = timeseries_info.get_timeseries_color('default') }, alerts_queries = { label = i18n('about.alert_queries'), color = timeseries_info.get_timeseries_color('default') }, dropped_alerts = { label = i18n('about.alerts_dropped'), color = timeseries_info.get_timeseries_color('default') } } },
-- { schema = "iface:engaged_alerts", id = timeseries_id.system, label = i18n("graphs.engaged_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { engaged_alerts = { label = i18n('graphs.engaged_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
-- { schema = "iface:dropped_alerts", id = timeseries_id.system, label = i18n("graphs.dropped_alerts"), priority = 0, measure_unit = "number", scale = i18n('graphs.metric_labels.alerts'), timeseries = { dropped_alerts = { label = i18n('graphs.dropped_alerts'), color = timeseries_info.get_timeseries_color('alerts') }}},
-- profile_details.lua (Profile): --
{ schema = "profile:traffic", id = timeseries_id.profile, label = i18n("graphs.traffic"), priority = 0, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = i18n('graphs.metric_labels.bytes'), color = timeseries_info.get_timeseries_color('bytes') } } },
-- redis_monitor.lua (Redis): --
{ schema = "redis:memory", id = timeseries_id.redis, label = i18n("about.ram_memory"), priority = 0, measure_unit = "bytes", scale = 0, timeseries = { resident_bytes = { label = i18n('graphs.metric_labels.bytes'), color = timeseries_info.get_timeseries_color('bytes') } } },
{ schema = "redis:keys", id = timeseries_id.redis, label = i18n("system_stats.redis.redis_keys"), priority = 0, measure_unit = "number", scale = 0, timeseries = { num_keys = { label = i18n('graphs.metric_labels.keys'), color = timeseries_info.get_timeseries_color('default') } } },
-- influxdb_monitor.lua (Influx DB): --
{ schema = "influxdb:storage_size", id = timeseries_id.influxdb, label = i18n("traffic_recording.storage_utilization"), priority = 0, measure_unit = "bytes", scale = 0, timeseries = { disk_bytes = { label = i18n('graphs.metric_labels.bytes'), color = timeseries_info.get_timeseries_color('bytes') } } },
{ schema = "influxdb:memory_size", id = timeseries_id.influxdb, label = i18n("about.ram_memory"), priority = 0, measure_unit = "bytes", scale = 0, timeseries = { mem_bytes = { label = i18n('graphs.metric_labels.bytes'), color = timeseries_info.get_timeseries_color('bytes') } } },
{ schema = "influxdb:write_successes", id = timeseries_id.influxdb, label = i18n("system_stats.write_througput"), priority = 0, measure_unit = "number",scale = 0, timeseries = { points = { label = i18n('graphs.metric_labels.num_points'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "influxdb:exports", id = timeseries_id.influxdb, label = i18n("system_stats.exports_label"), priority = 0, measure_unit = "number",scale = 0, timeseries = { num_exports = { label = i18n('system_stats.exports_label'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "influxdb:exported_points", id = timeseries_id.influxdb, label = i18n("system_stats.exported_points"), priority = 0, measure_unit = "number",scale = 0, timeseries = { points = { label = i18n('graphs.metric_labels.num_points'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "influxdb:dropped_points", id = timeseries_id.influxdb, label = i18n("system_stats.dropped_points"), priority = 0, measure_unit = "number",scale = 0, timeseries = { points = { label = i18n('graphs.metric_labels.num_points'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "influxdb:rtt", id = timeseries_id.influxdb, label = i18n("graphs.num_ms_rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { millis_rtt = { label = i18n('graphs.num_ms_rtt'), color = timeseries_info.get_timeseries_color('default') } } },
-- active_monitoring.lua (Active Monitoring): --
{ schema = "am_host:val_min", id = timeseries_id.active_monitoring, label = i18n("graphs.num_ms_rtt"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { value = { label = i18n('graphs.num_ms_rtt'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "am_host:cicmp_stats_min", id = timeseries_id.active_monitoring, label = i18n("flow_details.round_trip_time"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { min_rtt = { label = i18n('graphs.min_rtt'), color = timeseries_info.get_timeseries_color('default') }, max_rtt = { label = i18n('graphs.max_rtt'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "am_host:jitter_stats_min", id = timeseries_id.active_monitoring, label = i18n("active_monitoring_stats.rtt_vs_jitter"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { latency = { label = i18n('flow_details.mean_rtt'), color = timeseries_info.get_timeseries_color('default') }, jitter = { label = i18n('flow_details.rtt_jitter'), color = timeseries_info.get_timeseries_color('default') } } },
{ schema = "am_host:http_stats_min", id = timeseries_id.active_monitoring, label = i18n("graphs.http_stats"), priority = 0, measure_unit = "ms", scale = 0, timeseries = { lookup_ms = { label = i18n('graphs.name_lookup'), color = timeseries_info.get_timeseries_color('default') }, other_ms = { label = i18n('other'), color = timeseries_info.get_timeseries_color('default') } } },
}
-- #################################
local function add_top_vlan_timeseries(tags, timeseries)
local vlan_ts_enabled = ntop.getCache("ntopng.prefs.vlan_rrd_creation")
ts_utils.loadSchemas()
-- Top l7 Protocols
if vlan_ts_enabled then
local series = ts_utils.listSeries("vlan:ndpi", table.clone(tags), os.time() - 1800 --[[ 30 min is the default time ]])
if not table.empty(series) then
for _, serie in pairs(series or {}) do
timeseries[#timeseries + 1] = { schema = "top:vlan:ndpi", group = i18n("graphs.l7_proto"), priority = 2, query = "protocol:" .. serie.protocol , label = serie.protocol, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }} }
end
end
end
return timeseries
end
-- #################################
local function add_top_host_pool_timeseries(tags, timeseries)
local host_pool_ts_enabled = ntop.getCache("ntopng.prefs.host_pools_rrd_creation")
ts_utils.loadSchemas()
-- Top l7 Protocols
if host_pool_ts_enabled then
local series = ts_utils.listSeries("host_pool:ndpi", table.clone(tags), os.time() - 1800 --[[ 30 min is the default time ]])
if not table.empty(series) then
for _, serie in pairs(series or {}) do
timeseries[#timeseries + 1] = { schema = "top:host_pool:ndpi", group = i18n("graphs.l7_proto"), priority = 2, query = "protocol:" .. serie.protocol , label = serie.protocol, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }} }
end
end
end
return timeseries
end
-- #################################
local function add_top_asn_timeseries(tags, timeseries)
local asn_ts_enabled = ntop.getCache("ntopng.prefs.asn_rrd_creation")
ts_utils.loadSchemas()
-- Top l7 Protocols
if asn_ts_enabled then
local series = ts_utils.listSeries("asn:ndpi", table.clone(tags), os.time() - 1800 --[[ 30 min is the default time ]])
if not table.empty(series) then
for _, serie in pairs(series or {}) do
timeseries[#timeseries + 1] = { schema = "top:asn:ndpi", group = i18n("graphs.l7_proto"), priority = 2, query = "protocol:" .. serie.protocol , label = serie.protocol, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }} }
end
end
end
return timeseries
end
-- #################################
local function add_top_mac_timeseries(tags, timeseries)
local mac_ts_enabled = ntop.getCache("ntopng.prefs.l2_device_rrd_creation")
local mac_top_ts_enabled = ntop.getCache("ntopng.prefs.l2_device_ndpi_timeseries_creation")
ts_utils.loadSchemas()
-- Top l7 Categories
if mac_ts_enabled and mac_top_ts_enabled then
local series = ts_utils.listSeries("mac:ndpi_categories", table.clone(tags), os.time() - 1800 --[[ 30 min is the default time ]])
if not table.empty(series) then
for _, serie in pairs(series or {}) do
local category_name = getCategoryLabel(serie.category, interface.getnDPICategoryId(serie.category))
timeseries[#timeseries + 1] = { schema = "top:mac:ndpi_categories", group = i18n("graphs.category"), priority = 3, query = "category:" .. category_name , label = category_name, measure_unit = "bps", scale = 0, timeseries = { bytes = { label = category_name, color = timeseries_info.get_timeseries_color('bytes') }} }
end
end
end
return timeseries
end
-- #################################
local function add_top_host_timeseries(tags, timeseries)
local host_ts_enabled = ntop.getCache("ntopng.prefs.host_ndpi_timeseries_creation")
local has_top_protocols = host_ts_enabled == "both" or host_ts_enabled == "per_protocol" or host_ts_enabled ~= "0"
@ -193,7 +330,7 @@ local function add_top_host_timeseries(tags, timeseries)
local series = ts_utils.listSeries("host:ndpi", table.clone(tags), os.time() - 1800 --[[ 30 min is the default time ]])
if not table.empty(series) then
for _, serie in pairs(series) do
for _, serie in pairs(series or {}) do
timeseries[#timeseries + 1] = { schema = "top:host:ndpi", group = i18n("graphs.l7_proto"), priority = 2, query = "protocol:" .. serie.protocol , label = serie.protocol, measure_unit = "bps", scale = 0, timeseries = { bytes_sent = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.sent'), color = timeseries_info.get_timeseries_color('bytes') }, bytes_rcvd = { label = serie.protocol .. " " .. i18n('graphs.metric_labels.rcvd'), color = timeseries_info.get_timeseries_color('bytes') }} }
end
end
@ -257,6 +394,18 @@ local function add_top_timeseries(tags, prefix, timeseries)
elseif prefix == 'host' then
-- Add the top host timeseries
timeseries = add_top_host_timeseries(tags, timeseries)
elseif prefix == 'asn' then
-- Add the top asn timeseries
timeseries = add_top_asn_timeseries(tags, timeseries)
elseif prefix == 'host_pool' then
-- Add the top host pool timeseries
timeseries = add_top_host_pool_timeseries(tags, timeseries)
elseif prefix == 'vlan' then
-- Add the top vlan timeseries
timeseries = add_top_vlan_timeseries(tags, timeseries)
elseif prefix == 'mac' then
-- Add the top vlan timeseries
timeseries = add_top_mac_timeseries(tags, timeseries)
end
return timeseries

View file

@ -153,30 +153,7 @@ refreshInfluxStats();
print("</ul>")
elseif(page == "historical" and charts_available) then
local schema = _GET["ts_schema"] or "influxdb:storage_size"
local selected_epoch = _GET["epoch"] or ""
local tags = {ifid = getSystemInterfaceId()}
url = url.."&page=historical"
graph_utils.drawGraphs(getSystemInterfaceId(), schema, tags, _GET["zoom"], url, selected_epoch, {
timeseries = {
{schema="influxdb:storage_size", label=i18n("traffic_recording.storage_utilization")},
{schema="influxdb:memory_size", label=i18n("about.ram_memory")},
{schema="influxdb:write_successes", label=i18n("system_stats.write_througput")},
{schema="influxdb:exports", label=i18n("system_stats.exports_label"),
value_formatter = {"NtopUtils.export_rate", "NtopUtils.exports_format"},
metrics_labels = {i18n("system_stats.exports_label")}},
{schema="influxdb:exported_points", label=i18n("system_stats.exported_points")},
{schema="influxdb:dropped_points", label=i18n("system_stats.dropped_points")},
{schema="custom:infludb_exported_vs_dropped_points", label=i18n("system_stats.exported_vs_dropped_points"),
custom_schema = {
bases = {"influxdb:exported_points", "influxdb:dropped_points"},
types = {"area", "line"}, axis = {1,2},
},
metrics_labels = {i18n("system_stats.exported_points"), i18n("system_stats.dropped_points")},
},
{schema="influxdb:rtt", label=i18n("graphs.num_ms_rtt")},
}})
graph_utils.drawNewGraphs(nil, interface.getId())
end
-- #######################################################

View file

@ -162,37 +162,8 @@ $("#table-redis-stats").datatable({
</script>
]]
elseif(page == "historical" and charts_available) then
local ts_utils = require("ts_utils")
local schema = _GET["ts_schema"] or "redis:memory"
local selected_epoch = _GET["epoch"] or ""
local tags = {ifid = getSystemInterfaceId(), command = _GET["redis_command"]}
url = url.."&page=historical"
local timeseries = {
{schema = "redis:memory", label = i18n("about.ram_memory")},
{schema = "redis:keys", label = i18n("system_stats.redis.redis_keys")},
{separator=1, label=i18n("system_stats.redis.commands")},
}
-- Populate individual commands timeseries
local series = ts_utils.listSeries("redis:hits", {ifid = getSystemInterfaceId()}, 0)
if(series) then
for _, serie in pairsByField(series, "command", asc) do
timeseries[#timeseries + 1] = {
schema = "redis:hits",
label = i18n("system_stats.redis.command_hits", {cmd = string.upper(string.sub(serie.command, 5))}),
extra_params = {redis_command = serie.command},
metrics_labels = {i18n("graphs.num_calls")},
}
end
end
graph_utils.drawGraphs(getSystemInterfaceId(), schema, tags, _GET["zoom"], url, selected_epoch, {
top_redis_hits = "top:redis:hits",
timeseries = timeseries,
})
elseif(page == "historical" and charts_available) then
graph_utils.drawNewGraphs(nil, interface.getId())
end
-- #######################################################

View file

@ -90,63 +90,6 @@ Selectively render information pages
--]]
if page == "historical" then
graph_utils.drawNewGraphs(network_name, interface.getId())
-- local schema = _GET["ts_schema"] or "subnet:traffic"
-- local selected_epoch = _GET["epoch"] or ""
-- local url = ntop.getHttpPrefix()..'/lua/network_details.lua?ifid='..ifId..'&network='..network_id..'&page=historical'
-- local tags = {
-- ifid = ifId,
-- subnet = network_name,
-- subnet_2 = subnet2,
-- }
-- local timeseries = {}
-- local all_timeseries = {
-- {schema="subnet:traffic", label=i18n("traffic"), split_directions = true --[[ split RX and TX directions ]]},
-- {schema="subnet:broadcast_traffic", label=i18n("broadcast_traffic")},
-- {schema="subnet:engaged_alerts", label=i18n("show_alerts.engaged_alerts")},
-- {schema="subnet:score", label=i18n("score"), split_directions = true},
-- {schema="subnet:tcp_retransmissions", label=i18n("graphs.tcp_packets_retr"), nedge_exclude=1},
-- {schema="subnet:tcp_out_of_order", label=i18n("graphs.tcp_packets_ooo"), nedge_exclude=1},
-- {schema="subnet:tcp_lost", label=i18n("graphs.tcp_packets_lost"), nedge_exclude=1},
-- {schema="subnet:tcp_keep_alive", label=i18n("graphs.tcp_packets_keep_alive"), nedge_exclude=1},
-- }
-- if ntop.isPro() then
-- local pro_timeseries = {
-- {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_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)
-- network.select(tonumber(network_id))
-- local net_stats = network.getNetworkStats() or {}
-- local net_matrix_ts = {}
-- for second_subnet, _ in pairs(net_stats["intranet_traffic"]) do
-- local label_1 = getFullLocalNetworkName(network_name)
-- local label_2 = getFullLocalNetworkName(second_subnet)
-- net_matrix_ts[#net_matrix_ts + 1] = {
-- schema="subnet:intranet_traffic_min",
-- label= i18n("graphs.intranet_traffic", { net_1 = label_1, net_2 = label_2 }),
-- split_directions = true --[[ split RX and TX directions ]],
-- extra_params = {
-- subnet_2 = second_subnet,
-- }
-- }
-- end
-- all_timeseries = table.merge(all_timeseries, net_matrix_ts)
-- end
-- timeseries["timeseries"] = all_timeseries
-- graph_utils.drawGraphs(ifId, schema, tags, _GET["zoom"], url, selected_epoch, timeseries)
elseif (page == "config") then
if(not isAdministrator()) then
return

View file

@ -1,43 +0,0 @@
--
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if(ntop.isPro()) then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local snmp_utils = require "snmp_utils"
end
require "lua_utils"
local graph_utils = require "graph_utils"
local page_utils = require("page_utils")
local internals_utils = require "internals_utils"
local ifstats = interface.getStats()
local ifId = ifstats.id
sendHTTPContentTypeHeader('text/html')
page_utils.set_active_menu_entry(page_utils.menu_entries.interface, {ifname = getHumanReadableInterfaceName(ifId)})
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
local nav_url = ntop.getHttpPrefix().."/lua/periodic_script_details.lua?ifid="..ifId
local title = i18n("internals.iface_periodic_scripts", {iface = getHumanReadableInterfaceName(ifId)})
page_utils.print_navbar(title, nav_url,
{
{
active = true,
page_name = "historical",
label = "<i class='fas fa-lg fa-chart-area'></i>",
},
}
)
internals_utils.printPeriodicActivityDetails(_GET["ifid"] or ifId, nav_url)
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")

View file

@ -125,7 +125,6 @@ elseif page == "historical" then
print("<div class=\"alert alert alert-danger\"><i class='fas fa-exclamation-triangle fa-lg fa-ntopng-warning'></i> "..i18n("pool_details.no_available_data_for_host_pool_message",{pool_name=pool_name}))
print(" "..i18n("pool_details.host_pool_timeseries_enable_message",{url=ntop.getHttpPrefix().."/lua/admin/prefs.lua?tab=on_disk_ts",icon_flask="<i class=\"fas fa-flask\"></i>"})..'</div>')
else
--top_protocols = "top:host_pool:ndpi",
graph_utils.drawNewGraphs(tonumber(pool_id), interface.getId())
end
end

View file

@ -12,6 +12,10 @@ local rc = rest_utils.consts.success.ok
local ifid = tostring(_GET["ifid"] or interface.getId())
local query = _GET["query"]
local host = _GET["host"]
local asn = _GET["asn"]
local pool = _GET["pool"]
local vlan = _GET["vlan"]
local mac = _GET["mac"]
local res = {}
@ -21,7 +25,11 @@ end
local tags = {
ifid = ifid,
host = host
host = host,
asn = asn,
pool = pool,
vlan = vlan,
mac = mac,
}
res = table.merge(res, timeseries_info.retrieve_specific_timeseries(tags, query))

View file

@ -1,45 +0,0 @@
--
-- (C) 2013-22 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if(ntop.isPro()) then
package.path = dirs.installdir .. "/pro/scripts/lua/modules/?.lua;" .. package.path
local snmp_utils = require "snmp_utils"
end
require "lua_utils"
local graph_utils = require "graph_utils"
local page_utils = require("page_utils")
local internals_utils = require "internals_utils"
-- Save the interface id of the currently selected NON-system interface
-- so that it can be passed to the url to maintain the functionalities of
-- the header and footer
local ifId = interface.getId()
sendHTTPContentTypeHeader('text/html')
page_utils.set_active_menu_entry(page_utils.menu_entries.system_status, {ifname = getSystemInterfaceName()})
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
local nav_url = ntop.getHttpPrefix().."/lua/system_periodic_script_details.lua?ifid="..ifId
local title = i18n("internals.system_iface_periodic_scripts")
page_utils.print_navbar(title, nav_url,
{
{
active = page == "historical" or not page,
page_name = "historical",
label = "<i class='fas fa-lg fa-chart-area'></i>",
},
}
)
internals_utils.printPeriodicActivityDetails(getSystemInterfaceId(), nav_url)
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")

View file

@ -171,51 +171,7 @@ print [[/lua/system_stats_data.lua',
]]
elseif(page == "historical" and ts_creation) then
local sys_stats = ntop.systemHostStat()
local selected_epoch = _GET["epoch"] or ""
local tags = {ifid = getSystemInterfaceId()}
local skip_cpu_load = (sys_stats.cpu_load == nil)
local schema = _GET["ts_schema"] or ternary(skip_cpu_load, "process:num_alerts", "system:cpu_load")
url = url.."&page=historical"
graph_utils.drawGraphs(getSystemInterfaceId(), schema, tags, _GET["zoom"], url, selected_epoch, {
timeseries = {
{
schema = "system:cpu_load",
label=i18n("about.cpu_load"),
metrics_labels = {i18n("about.cpu_load")},
value_formatter = {"NtopUtils.ffloat"},
skip = skip_cpu_load,
},
{
schema="system:cpu_states",
label=i18n("about.cpu_states"),
metrics_labels = {i18n("about.iowait"), i18n("about.active"), i18n("about.idle")},
value_formatter = {"NtopUtils.fpercent"}
},
{
schema="process:resident_memory",
label=i18n("graphs.process_memory")
},
{
schema="process:num_alerts",
label=i18n("graphs.process_alerts"),
metrics_labels = {i18n("about.alerts_stored"), i18n("about.alert_queries"), i18n("about.alerts_dropped")},
},
{
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()
},
}
})
graph_utils.drawNewGraphs(nil, interface.getId())
elseif page == "internals" then
internals_utils.printInternals(getSystemInterfaceId(), false --[[ hash tables ]], true --[[ periodic activities ]], true --[[ checks]], true --[[ queues --]])
end

View file

@ -72,16 +72,6 @@ else
Selectively render information pages
--]]
if page == "historical" then
local schema = _GET["ts_schema"] or "vlan:traffic"
local selected_epoch = _GET["epoch"] or ""
local vlan_url = ntop.getHttpPrefix()..'/lua/vlan_details.lua?ifid='..ifId..'&vlan='..vlan_id..'&page=historical'
local tags = {
ifid = ifId,
vlan = vlan_id,
protocol = _GET["protocol"],
}
-- top_protocols = "top:vlan:ndpi",
graph_utils.drawNewGraphs(tonumber(vlan_id), interface.getId())
elseif (page == "config") then
if(not isAdministrator()) then