diff --git a/compute/etc/neon_collector.jsonnet b/compute/etc/neon_collector.jsonnet index e73fb132ee..c6fa645b41 100644 --- a/compute/etc/neon_collector.jsonnet +++ b/compute/etc/neon_collector.jsonnet @@ -3,7 +3,7 @@ metrics: [ import 'sql_exporter/checkpoints_req.libsonnet', import 'sql_exporter/checkpoints_timed.libsonnet', - import 'sql_exporter/compute_backpressure_throttling_ms.libsonnet', + 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_receive_lsn.libsonnet', diff --git a/compute/etc/sql_exporter/compute_backpressure_throttling_ms.sql b/compute/etc/sql_exporter/compute_backpressure_throttling_ms.sql deleted file mode 100644 index 1fa62d38a4..0000000000 --- a/compute/etc/sql_exporter/compute_backpressure_throttling_ms.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT neon.backpressure_throttling_time() AS throttled; diff --git a/compute/etc/sql_exporter/compute_backpressure_throttling_ms.libsonnet b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.libsonnet similarity index 71% rename from compute/etc/sql_exporter/compute_backpressure_throttling_ms.libsonnet rename to compute/etc/sql_exporter/compute_backpressure_throttling_seconds.libsonnet index b25bb73d0f..02c803cfa6 100644 --- a/compute/etc/sql_exporter/compute_backpressure_throttling_ms.libsonnet +++ b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.libsonnet @@ -1,10 +1,10 @@ { - metric_name: 'compute_backpressure_throttling_ms', + metric_name: 'compute_backpressure_throttling_seconds', type: 'gauge', help: 'Time compute has spent throttled', key_labels: null, values: [ 'throttled', ], - query: importstr 'sql_exporter/compute_backpressure_throttling_ms.sql', + query: importstr 'sql_exporter/compute_backpressure_throttling_seconds.sql', } diff --git a/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql new file mode 100644 index 0000000000..459c586d18 --- /dev/null +++ b/compute/etc/sql_exporter/compute_backpressure_throttling_seconds.sql @@ -0,0 +1 @@ +SELECT neon.backpressure_throttling_time()::float8 / 1000 AS throttled;