Logging and monitoring
Learn how to use built-in monitoring and logging for on-prem PerfectScale installation
PerfectScale provides built-in monitoring and logging capabilities for your on-premises installation.
To collect key system metrics and enable effective monitoring, the installation includes Prometheus, Grafana, and necessary exporters. For logging, Loki works alongside Promtail agents to efficiently collect and manage log data.
Remote logging and the ability to write to PerfectScale's centralized Prometheus and Loki instances remotely are enabled by default; however, this feature is optional. Port forwarding provides access to Prometheus and Grafana for viewing logs and metrics.
How to access the logs
Access Grafana via port forwarding
kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
Navigate to http://127.0.0.1:8888 in your browser.
Go to Explore, select Loki in Outline, and filter the logs by labels.

Loki logs collection and debugging
Use the following instructions to collect logs from Loki and send them to PerfectScale for debugging.
Access Grafana via port forwarding
kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
Navigate to http://127.0.0.1:8888 in your browser.
Go to Explore, select Loki in Outline.
Set the Line Limit to 5000 (1), switch to the Code mode(2), and execute the following query (3):
{namespace="ks-test", pod!~"logging-.*|monitoring-.*|keda-.*|psc-telemetry-.*|python-script-runner-.*|chi-.*|clickhouse-operator-.*|clickhouse-keeper-.*|postgres-postgresql-.*|rabbitmq-.*"} != `Trace` or `Debug` or `No messages left` or `Sleeping`

Click Download => CSV.
Sent the file to PerfectScale.
How to access the dashboards
Access Grafana via port forwarding
kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
Navigate to http://127.0.0.1:8888 in your browser.
Navigate to Home and select Dashboards.
Import a new dashboard, or select the existing one.

Last updated
Was this helpful?