Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
myrrc committed Nov 15, 2024
1 parent 19f7d40 commit 7d72750
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions compute/etc/neon_collector.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import 'sql_exporter/compute_backpressure_throttling_seconds.libsonnet',
import 'sql_exporter/compute_current_lsn.libsonnet',
import 'sql_exporter/compute_logical_snapshot_files.libsonnet',
import 'sql_exporter/compute_max_connections.libsonnet',
import 'sql_exporter/compute_receive_lsn.libsonnet',
import 'sql_exporter/compute_subscriptions_count.libsonnet',
import 'sql_exporter/connection_counts.libsonnet',
Expand Down
10 changes: 10 additions & 0 deletions compute/etc/sql_exporter/compute_max_connections.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
metric_name: 'compute_max_connections',
type: 'gauge',
help: 'Max connections allowed for Postgres',
key_labels: null,
values: [
'max_connections',
],
query: importstr 'sql_exporter/compute_max_connections.sql',
}
1 change: 1 addition & 0 deletions compute/etc/sql_exporter/compute_max_connections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT setting AS max_connections FROM pg_catalog.pg_settings WHERE name='max_connections';

0 comments on commit 7d72750

Please sign in to comment.