v1.1: Add CIDR subnet filtering and Agent filter in Devices page

This commit is contained in:
ypratama committed 2026-08-27 12:02:01 +07:00
commit 966058e2fe
422 files changed
+54656

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
const mongoose = require('mongoose');
mongoose.connect('mongodb://backone_inspect:backone_inspect@mongodb.prod.proit.id:27017/backone_inspect_0').then(async () => {
const db = mongoose.connection.db;
const flows = await db.collection('flows').aggregate([
{ $group: { _id: '$agent_uuid', src_ips: { $addToSet: '$src_ip' } } }
]).toArray();
flows.forEach(f => {
console.log('Agent:', f._id, 'IPs:', f.src_ips.slice(0, 10).join(', '));
});
mongoose.disconnect();
});