Univention Bugzilla – Bug 55086
%instance% not replaced in config files after fresh install
Last modified: 2022-08-11 15:37:26 CEST
Primary Server: 5.0-2 errata382 Replica Directory Node with Dashboard installed: 5.0-2 errata382 Dashboard Database: 2.35.0-4 installed After a fresh install of the dashboard, the database app does not start, reporting several errors loading rules. For example: level=error component="rule manager" msg="loading groups failed" err="/etc/prometheus/alert_UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING.yml: 8:11: group \"UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING\", rule 1, \"UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING\": could not parse expression: 1:45: parse error: unexpected character inside braces: '%'" This is caused by the fact that the variable %instance% from the definition (or any other variable for that matter) has not been replaced in the config files. Example, causing error: groups: - name: UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING rules: - alert: UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING annotations: description: metrics regarding slapd mdb database size are missing title: check if metrics regarding slapd mdb database size are missing expr: absent(univention_slapd_mdb_size_used_ratio{%instance%}) == 1 or absent(univention_slapd_translog_mdb_size_used_ratio{%instance%}) == 1 for: 1m labels: severity: critical Workaround: manually adding a key / value pair to the alert definition on the primary server triggers a rewrite of the config file and the variables including %instance% are filled in. Result: groups: - name: UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING rules: - alert: UNIVENTION_SLAPD_MDB_MAXSIZE_METRIC_MISSING annotations: description: metrics regarding slapd mdb database size are missing title: check if metrics regarding slapd mdb database size are missing expr: absent(univention_slapd_mdb_size_used_ratio{instance=~"(SERVER_NAMES_CORRECTLY_INSERTED_HERE)"}) == 1 or absent(univention_slapd_translog_mdb_size_used_ratio{instance=~"(SERVER_NAMES_CORRECTLY_INSERTED_HERE)"}) == 1 for: 1m labels: severity: critical
Does it get fixed after executing: univention-directory-listener-ctrl resync monitoring-client
that solved the problem, thank you