Skip to content

Commit 724ec12

Browse files
committed
Filter monitoring targets by is_enabled flag instead of hardcoded name
1 parent 65e212b commit 724ec12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cli/bin/postgres-ai.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ targets
503503
return;
504504
}
505505

506-
// Filter out demo placeholder
507-
const filtered = instances.filter((inst) => inst.name && inst.name !== "target-database");
506+
// Filter out disabled instances (e.g., demo placeholders)
507+
const filtered = instances.filter((inst) => inst.name && inst.is_enabled !== false);
508508

509509
if (filtered.length === 0) {
510510
console.log("No monitoring targets configured");

instances.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
conn_str: postgresql://monitor:monitor_pass@target-db:5432/target_database
33
preset_metrics: full
44
custom_metrics:
5-
is_enabled: true
5+
is_enabled: false
66
group: default
77
custom_tags:
88
env: demo

0 commit comments

Comments
 (0)