Loki logs¶
The following table lists all the charms used as part of Charmed HPC that expose logs to Loki, and the corresponding query to see the exported logs in the Grafana UI. Follow the Visualize log data tutorial from the Grafana documentation for instructions on where and how to query for Loki logs.
charm |
query |
---|---|
slurmctld |
|
mysql |
|
postgresql-k8s |
|
glauth-k8s |
|
Ignoring log files¶
By default, every instance of the grafana-agent
charm will log all the files in the var/log
directory.
This is sometimes not ideal, since it increases the amount of logs stored by Loki which are unrelated
to the running application. A solution for this is to set the path_exclude
configuration for
grafana-agent
, which will allow it to ignore such log files:
juju config grafana-agent path_exclude="/var/log/{unattended-upgrades,apt,}/*.log"