Skip to content

Commit

Permalink
Merge pull request #10 from ntop/dev
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
SalvatoreCostantino authored Apr 1, 2019
2 parents 385ddbd + a121b6a commit f002b94
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/lua/host_details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@ drawGraphs(ifId, schema, tags, _GET["zoom"], url, selected_epoch, {
{schema="host:host_unreachable_flows", label="Host Unreachable Flows"},
{schema="host:dns_sent", label="DNS Packets Sent"},
{schema="host:dns_rcvd", label="DNS Packets Rcvd"},
{schema="host:udp_pkts", label="UDP Packets"},

{schema="host:1d_delta_traffic_volume", label="1 Day Traffic Delta"}, -- TODO localize
{schema="host:1d_delta_flows", label="1 Day Active Flows Delta"}, -- TODO localize
Expand Down
1 change: 1 addition & 0 deletions scripts/lua/mac_details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ elseif(page == "historical") then
top_categories = "top:mac:ndpi_categories",
timeseries = {
{schema="mac:traffic", label=i18n("traffic")},
{schema="mac:arp_requests", label="ARP Requests"},
}
})

Expand Down
16 changes: 16 additions & 0 deletions scripts/lua/modules/timeseries/schemas/ts_5min.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ schema:addMetric("bytes_rcvd")

-- ##############################################

schema = ts_utils.newSchema("mac:arp_requests", {step=300})
schema:addTag("ifid")
schema:addTag("mac")
schema:addMetric("request_packets_sent")
schema:addMetric("request_packets_rcvd")

-- ##############################################

-- NOTE: always disabled?
schema = ts_utils.newSchema("mac:ndpi_categories", {step=300})
schema:addTag("ifid")
Expand Down Expand Up @@ -224,6 +232,14 @@ schema:addMetric("replies_error_packets")

--##############################################

schema = ts_utils.newSchema("host:udp_pkts", {step = 300})
schema:addTag("ifid")
schema:addTag("host")
schema:addMetric("packets_sent")
schema:addMetric("packets_rcvd")

--##############################################

schema = ts_utils.newSchema("host:total_alerts", {step = 300, rrd_fname = "total_alerts"})
schema:addTag("ifid")
schema:addTag("host")
Expand Down
17 changes: 14 additions & 3 deletions scripts/lua/modules/ts_5min_dump_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ end
function ts_dump.l2_device_update_stats_rrds(when, devicename, device, ifstats, verbose)
ts_utils.append("mac:traffic", {ifid=ifstats.id, mac=devicename,
bytes_sent=device["bytes.sent"], bytes_rcvd=device["bytes.rcvd"]}, when, verbose)

ts_utils.append("mac:arp_requests", {ifid=ifstats.id, mac=devicename,
request_packets_sent = device["arp_requests.sent"],
request_packets_rcvd = device["arp_requests.rcvd"]},
when,verbose)
end

-- ########################################################
Expand Down Expand Up @@ -201,20 +206,26 @@ function ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
flows_as_client = host["host_unreachable_flows.as_client"]},
when, verbose)

--Number of dns packets sent
-- Number of dns packets sent
ts_utils.append("host:dns_sent", {ifid = ifstats.id, host = hostname,
queries_packets = host["dns"]["sent"]["num_queries"],
replies_ok_packets = host["dns"]["sent"]["num_replies_ok"],
replies_error_packets =host["dns"]["sent"]["num_replies_error"]},
when, verbose)

--Number of dns packets rcvd
-- Number of dns packets rcvd
ts_utils.append("host:dns_rcvd", {ifid = ifstats.id, host = hostname,
queries_packets = host["dns"]["rcvd"]["num_queries"],
replies_ok_packets = host["dns"]["rcvd"]["num_replies_ok"],
replies_error_packets = host["dns"]["rcvd"]["num_replies_error"]},
when, verbose)


-- Number of udp packets
ts_utils.append("host:udp_pkts", {ifid = ifstats.id, host = hostname,
packets_sent = host["udp.packets.sent"],
packets_rcvd = host["udp.packets.rcvd"]},
when, verbose)

-- Total number of alerts
ts_utils.append("host:total_alerts", {ifid = ifstats.id, host = hostname,
alerts = host["total_alerts"]},
Expand Down

0 comments on commit f002b94

Please sign in to comment.