Skip to content

Commit ae141f2

Browse files
committed
Update sql_exporter to 0.17.0
Also fix warning about metric being NULL: ``` level=WARN source=query.go:226 msg="Value column is NULL" logContext="collector=cratedb_cluster_last_user_activity_collector,query=cratedb_cluster_last_user_activity" column=cratedb_cluster_last_user_activity-collector ```
1 parent ac3ead7 commit ae141f2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Unreleased
77
* Add preStop hook to the CrateDB pods to ensure that the CrateDB process is
88
stopped gracefully.
99
* Change nginx ``proxy-body-size`` annotation value as it has stricter validations now
10+
* Bump ``sql_exporter`` to ``0.17.0`` and fix ``cluster_last_user_activity`` NULL warning.
1011

1112
2.43.1 (2025-01-08)
1213
-------------------

crate/operator/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class Config:
161161
PROMETHEUS_PORT: int = 8080
162162

163163
#: The sql_exporter image to use
164-
SQL_EXPORTER_IMAGE: str = "burningalchemist/sql_exporter:0.16.0"
164+
SQL_EXPORTER_IMAGE: str = "burningalchemist/sql_exporter:0.17.0"
165165

166166
#: Name of the secret containing credentials to access the source
167167
#: backup when restoring a snapshot.

crate/operator/data/cratedb_cluster_last_user_activity-collector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metrics:
66
- help: "Indicates when the last job occured on the cluster."
77
metric_name: cratedb_cluster_last_user_activity
88
query: |
9-
SELECT cast(extract(epoch from max(ended)) as integer) AS cratedb_cluster_last_user_activity
9+
SELECT COALESCE(cast(extract(epoch from max(ended)) as integer), 0) AS cratedb_cluster_last_user_activity
1010
FROM sys.jobs_log
1111
WHERE username NOT IN ('crate', 'system');
1212
type: gauge

0 commit comments

Comments
 (0)