Observability setup in Charmed OpenFGA¶
The OpenFGA charmed operator provides integrations to the Canonical Observability Stack.
In this reference we will provide a technical description of the alert rules, and the dashboards the OpenFGA operator passes to the components of the COS. We will also showcase the Metrics we use to provide observability features.
Metrics¶
up¶
Description¶
When this counter equals one, that means the instance the metric was scraped from is available to the Prometheus deployment. If the counter equals zero, or the metric is not present, then the application is inaccessible to the Prometheus deployment.
Source¶
Prometheus
Usage¶
This metric signals whether a unit is unavailable. By specifying the label juju_unit this metric tells you whether the unit is available to the Prometheus component or not.
Example: up{juju_unit="openfga-k8s/0"}
Observed¶
Alert Rules: Rules in group OpenFGAUnavailable
Dashboard: OpenFGA Unit Availability
level¶
Description¶
All OpenFGA logs have a level, to indicate the seriousness of an event. OpenFGA logs (and json formatted logs in general) can be filtered by log levels.
Source¶
Loki
Usage¶
Use the LogQL’s abilities to enumerate log entries that match a regex template, and to parse json logs and populate fields such as level. Example: {juju_charm="openfga"} | json | level =~ "error"
Observed¶
Alert Rules: Rules in group OpenFGAHighSeverityLog
Dashboard Visualisation: OpenFGA High Severity Log Entries
Alerts¶
OpenFGAHighSeverityLog¶
Description¶
Alerts in this alert group are fired based on how many log entries with the log level of error, critical, or fatal have been created in the last five minutes.
Data¶
Loki
Dashboards¶
OpenFGA¶
Description¶
visualization for the number of log entries with levels error or above within 5 minutes spans.
visualization displaying the availability of OpenFGA units.
Associated¶
Alert rules in alert group OpenFGAHighSeverityLog.
Alert rules in alert group OpenFGAUnavailable.