feat(monitoring,inspector,metrics): fix rollup/probe bugs, add net/disk/probe history, TLS expiry & Prometheus /metrics
This commit is contained in:
parent
ca67c85fbf
commit
dbf7144c5d
11 changed files with 954 additions and 174 deletions
|
|
@ -170,7 +170,7 @@ describe('OS Collectors, ServerInspector, Health Probes & MonitoringService', ()
|
|||
await cfg.init({ watch: false });
|
||||
const knownHosts = new KnownHostsService(db, audit);
|
||||
const sshPool = new SSHPool(cfg, vault, knownHosts);
|
||||
const probeRunner = new ProbeRunner(sshPool);
|
||||
const probeRunner = new ProbeRunner(sshPool, cfg);
|
||||
const inspector = new ServerInspector(sshPool, cfg);
|
||||
const monitoring = new MonitoringService(db, cfg, vault, sshPool, probeRunner);
|
||||
|
||||
|
|
@ -222,6 +222,15 @@ describe('OS Collectors, ServerInspector, Health Probes & MonitoringService', ()
|
|||
);
|
||||
|
||||
const serverCfg = cfg.getServer('linux-01')!;
|
||||
// Hub loopback HTTP probe is blocked by default Zero-Trust egress policy until explicitly allowlisted
|
||||
const hubProbe = serverCfg.probes.find((p) => p.id === 'hub-http')!;
|
||||
const deniedSample = await probeRunner.runProbe('linux-01', hubProbe);
|
||||
expect(deniedSample.ok).toBe(false);
|
||||
|
||||
const nextSettings = cfg.getSettings();
|
||||
nextSettings.security.egressAllowedCidrs = ['127.0.0.1/32'];
|
||||
cfg.saveConfigText('settings.json', JSON.stringify(nextSettings, null, 2));
|
||||
|
||||
for (const p of serverCfg.probes) {
|
||||
const sample = await probeRunner.runProbe('linux-01', p);
|
||||
expect(sample.ok).toBe(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue