Files
Deep-Package-Inspection/backend/check_registry_sites.js
T

8 lines
377 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 agents = await m.connection.db.collection('agent_registry').find({}, {projection:{uuid:1, site_uuid:1, _id:0}}).toArray();
console.log('Agents in registry:', agents);
process.exit(0);
});