mirror of
https://github.com/Akkadius/glass-isc-dhcp.git
synced 2025-07-27 23:54:32 +02:00
Add OUI Vendor to excessive requests data
This commit is contained in:
parent
bad5989601
commit
f9dec38ad9
@ -7,7 +7,7 @@ router.get('/', function(req, res, next) {
|
||||
var stat_data = dhcp_requests;
|
||||
|
||||
for (var key in stat_data) {
|
||||
if(stat_data[key].request_count <= 100)
|
||||
if(stat_data[key].request_count <= 10)
|
||||
delete stat_data[key];
|
||||
}
|
||||
|
||||
|
9
app.js
9
app.js
@ -317,6 +317,15 @@ tail_dhcp_log.on("line", function(data) {
|
||||
if (typeof dhcp_requests[request_from].request_count === "undefined")
|
||||
dhcp_requests[request_from].request_count = 0;
|
||||
|
||||
if (typeof request_from !== "undefined") {
|
||||
if (request_from.length == 17 && /:/.test(request_from)) {
|
||||
var mac_oui = request_from.split(":").join("").toUpperCase().slice(0, 6);
|
||||
|
||||
if (typeof dhcp_requests[request_from].request_vendor === "undefined")
|
||||
dhcp_requests[request_from].request_vendor = oui_data[mac_oui];
|
||||
}
|
||||
}
|
||||
|
||||
dhcp_requests[request_from].request_count++;
|
||||
}
|
||||
});
|
||||
|
@ -22,14 +22,15 @@
|
||||
|
||||
<div class="card hide_me">
|
||||
<div class="header">
|
||||
<h2>Excessive DHCP Requests</h2>
|
||||
<h2>Excessive DHCP Requests (10 Minute Interval)</h2>
|
||||
</div>
|
||||
<div class="body">
|
||||
<small>Usually indicative of a physical error on the network with one-way communication</small>
|
||||
<small>Usually indicative of a physical error on the network with one-way communication</small><br><br>
|
||||
<table id="excessive_requests" class="table table-bordered table-striped table-hover js-basic-example dataTable dashboard-task-infos">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>MAC</th>
|
||||
<th>Vendor</th>
|
||||
<th>Requesting IP</th>
|
||||
<th>Request Via</th>
|
||||
<th>Count</th>
|
||||
@ -137,6 +138,7 @@
|
||||
$.each(data, function(k, v) {
|
||||
$('#excessive_requests > tbody:last-child').append('<tr>' +
|
||||
'<td>' + k + '</td>' +
|
||||
'<td>' + data[k].request_vendor + '</td>' +
|
||||
'<td>' + data[k].request_for + '</td>' +
|
||||
'<td>' + data[k].request_via + '</td>' +
|
||||
'<td>' + data[k].request_count.toLocaleString('en') + '</td>' +
|
||||
@ -150,7 +152,7 @@
|
||||
responsive: true,
|
||||
"pageLength": 20,
|
||||
"aaSorting": [],
|
||||
"order": [[ 3, "desc" ]]
|
||||
"order": [[ 4, "desc" ]]
|
||||
});
|
||||
|
||||
// $('table').fadeIn(100);
|
||||
|
0
public/templates/email_template.html
Normal file
0
public/templates/email_template.html
Normal file
Loading…
x
Reference in New Issue
Block a user