12 lines
454 B
JavaScript
12 lines
454 B
JavaScript
const mongoose = require('mongoose');
|
|
mongoose.connect('mongodb://backone_inspect:backone_inspect@mongodb.prod.proit.id:27017/backone_inspect_0')
|
|
.then(async (m) => {
|
|
const result = await m.connection.db.collection('flows').aggregate([
|
|
{ $match: { agent_uuid: '2F-TF-1D-GK' } },
|
|
{ $group: { _id: '$dst_ip' } },
|
|
{ $limit: 10 }
|
|
]).toArray();
|
|
console.log('Flows dst_ips for 2F-TF-1D-GK:', result);
|
|
process.exit(0);
|
|
});
|