Fixed charts metric labels

This commit is contained in:
MatteoBiscosi 2022-06-30 16:47:22 +02:00
parent 145b70d1be
commit e1ddd59b77
2 changed files with 18 additions and 10 deletions

View file

@ -934,18 +934,18 @@ end
-- #################################################
local default_timeseries = {
{schema="iface:flows", label=i18n("graphs.active_flows")},
{schema="iface:new_flows", label=i18n("graphs.new_flows"), value_formatter = {"NtopUtils.fflows", "NtopUtils.formatFlows"}},
{schema="iface:alerted_flows", label=i18n("graphs.total_alerted_flows")},
{schema="iface:hosts", label=i18n("graphs.active_hosts")},
{schema="iface:flows", label=i18n("graphs.active_flows"), metrics_labels = { i18n("graphs.metric_labels.num_flows") }},
{schema="iface:new_flows", label=i18n("graphs.new_flows"), value_formatter = {"NtopUtils.fflows", "NtopUtils.formatFlows"}, metrics_labels = { i18n("graphs.metric_labels.num_flows") }},
{schema="iface:alerted_flows", label=i18n("graphs.total_alerted_flows"), metrics_labels = { i18n("graphs.metric_labels.alerted_flows") }},
{schema="iface:hosts", label=i18n("graphs.active_hosts"), metrics_labels = { i18n("graphs.metric_labels.num_hosts") }},
{schema="iface:engaged_alerts", label=i18n("show_alerts.engaged_alerts"), metrics_labels = { i18n("show_alerts.engaged_alerts") }, skip=hasAllowedNetworksSet()},
{schema="iface:dropped_alerts", label=i18n("show_alerts.dropped_alerts"), metrics_labels = { i18n("show_alerts.dropped_alerts") }, skip=hasAllowedNetworksSet()},
{schema="custom:flows_vs_local_hosts", label=i18n("graphs.flows_vs_local_hosts"), check={"iface:flows", "iface:local_hosts"}, step=60},
{schema="custom:flows_vs_traffic", label=i18n("graphs.flows_vs_traffic"), check={"iface:flows", "iface:traffic"}, step=60},
{schema="custom:memory_vs_flows_hosts", label=i18n("graphs.memory_vs_hosts_flows"), check={"process:resident_memory", "iface:flows", "iface:hosts"}},
{schema="iface:devices", label=i18n("graphs.active_devices")},
{schema="iface:http_hosts", label=i18n("graphs.active_http_servers"), nedge_exclude=1},
{schema="iface:traffic", label=i18n("traffic")},
{schema="custom:flows_vs_local_hosts", label=i18n("graphs.flows_vs_local_hosts"), metrics_labels = { i18n("graphs.metric_labels.num_flows"), i18n("graphs.metric_labels.num_hosts") }, check={"iface:flows", "iface:local_hosts"}, step=60},
{schema="custom:flows_vs_traffic", label=i18n("graphs.flows_vs_traffic"), metrics_labels = { i18n("graphs.metric_labels.traffic"), i18n("graphs.metric_labels.num_flows") }, check={"iface:flows", "iface:traffic"}, step=60},
{schema="custom:memory_vs_flows_hosts", label=i18n("graphs.memory_vs_hosts_flows"), metrics_labels = { i18n("graphs.metric_labels.memory_vs_hosts_flows") }, check={"process:resident_memory", "iface:flows", "iface:hosts"}},
{schema="iface:devices", label=i18n("graphs.active_devices"), metrics_labels = { i18n("graphs.metric_labels.num_devices") }},
{schema="iface:http_hosts", label=i18n("graphs.active_http_servers"), metrics_labels = { i18n("graphs.metric_labels.num_servers") }, nedge_exclude=1},
{schema="iface:traffic", label=i18n("traffic"), metrics_labels = { i18n("graphs.metric_labels.traffic") }},
{schema="iface:score", label=i18n("score"), metrics_labels = { i18n("graphs.cli_score"), i18n("graphs.srv_score")}},
{schema="custom:score_vs_flows_hosts", label=i18n("graphs.score_vs_hosts_flows"), check={"iface:score", "iface:flows", "iface:hosts"}, metrics_labels = { i18n("graphs.cli_score"), i18n("graphs.srv_score")}},
{schema="iface:traffic_rxtx", label=i18n("graphs.traffic_rxtx"), split_directions = true, layout={ ["bytes_sent"] = "area", ["bytes_rcvd"] = "line" }, value_formatter = {"NtopUtils.fbits_from_bytes", "NtopUtils.bytesToSize"} },