| 7 Dec 2024 |
hexa | now I wish there was webinterface to browse the state of loki | 22:52:13 |
hexa | not the user facing stuff like grafana, more like what prometheus has | 22:52:22 |
hexa | can't say it is alerting based on that expression | 22:56:05 |
hexa | [93980] WARNING: database "template1" has a collation version mismatch
[93980] DETAIL: The database was created using collation version 2.39, but the operating system provides version 2.40.
[93980] HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
| 23:00:16 |
hexa | rulerConfig = {
groups = [ {
name = "postgresql";
rules = [ {
alert = "PostgresqlCollationMismatch";
expr = ''
{unit="postgresql.service"}
|~ 'WARNING: database "[^"]+" has a collation version mismatch'
| regexp 'database "(?<database>[^"]+)"'
'';
labels.severity = "warning";
annotations.summary = "PostgreSQL database {{ $labels.database }} on {{ $labels.machine }}i reports database collation mismatch";
} ];
} ];
};
| 23:01:48 |
hexa | * rulerConfig = {
groups = [ {
name = "postgresql";
rules = [ {
alert = "PostgresqlCollationMismatch";
expr = ''
{unit="postgresql.service"}
|~ 'WARNING: database "[^"]+" has a collation version mismatch'
| regexp 'database "(?<database>[^"]+)"'
'';
labels.severity = "warning";
annotations.summary = "PostgreSQL database {{ $labels.database }} on {{ $labels.machine }}i reports database collation mismatch";
} ];
} ];
};
| 23:01:52 |
hexa | so for one it doesn't like single quotes 😄 | 23:03:24 |
hexa | and doesn't complain about it | 23:03:28 |
hexa | * rulerConfig = {
groups = [ {
name = "postgresql";
rules = [ {
alert = "PostgresqlCollationMismatch";
expr = ''
{unit="postgresql.service"}
|~ "WARNING: database \"[^\"]+\" has a collation version mismatch"
| regexp "database \"(?<database>[^\"]+)\""
'';
labels.severity = "warning";
annotations.summary = "PostgreSQL database {{ $labels.database }} on {{ $labels.machine }}i reports database collation mismatch";
} ];
} ];
};
| 23:04:17 |