Removed dscp ts from hosts when light is configured (#6029)

This commit is contained in:
MatteoBiscosi 2021-11-02 11:50:47 +01:00
parent 676a14d526
commit 8bcf3509c0
2 changed files with 32 additions and 13 deletions

View file

@ -524,18 +524,6 @@ function ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
packets_rcvd = host["tcp.packets.rcvd"]},
when)
-- Total number of alerts
ts_utils.append("host:total_alerts", {ifid = ifstats.id, host = hostname,
alerts = host["total_alerts"]},
when)
-- Engaged alerts
if host["engaged_alerts"] then
ts_utils.append("host:engaged_alerts", {ifid = ifstats.id, host = hostname,
alerts = host["engaged_alerts"]},
when)
end
-- Contacts
if host["contacts.as_client"] then
ts_utils.append("host:contacts", {ifid=ifstats.id, host=hostname,
@ -724,6 +712,8 @@ function ts_dump.host_update_rrd(when, hostname, host, ifstats, verbose, config)
traceError(TRACE_NORMAL, TRACE_CONSOLE, "@".. when .." Going to update host " .. hostname)
end
------ Light stats ------
-- Traffic stats
ts_utils.append("host:traffic", {ifid=ifstats.id, host=hostname,
bytes_sent=host["bytes.sent"], bytes_rcvd=host["bytes.rcvd"]}, when)
@ -731,6 +721,22 @@ function ts_dump.host_update_rrd(when, hostname, host, ifstats, verbose, config)
-- Score
ts_utils.append("host:score", {ifid=ifstats.id, host=hostname, score_as_cli = host["score.as_client"], score_as_srv = host["score.as_server"]}, when)
-- Total number of alerts
ts_utils.append("host:total_alerts", {ifid = ifstats.id, host = hostname,
alerts = host["total_alerts"]},
when)
-- Engaged alerts
if host["engaged_alerts"] then
ts_utils.append("host:engaged_alerts", {ifid = ifstats.id, host = hostname,
alerts = host["engaged_alerts"]},
when)
end
------------------------
------ Full Stats ------
if(config.host_ts_creation == "full") then
ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
@ -742,6 +748,8 @@ function ts_dump.host_update_rrd(when, hostname, host, ifstats, verbose, config)
ts_dump.host_update_categories_rrds(when, hostname, host, ifstats, verbose)
end
end
------------------------
end
end