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

  1. Access Grafana via port forwarding

kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
  1. Navigate to http://127.0.0.1:8888 in your browser.

  2. Go to Explore, select Loki in Outline, and filter the logs by labels.

How to access logs

Loki logs collection and debugging

Use the following instructions to collect logs from Loki and send them to PerfectScale for debugging.

  1. Access Grafana via port forwarding

kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
  1. Navigate to http://127.0.0.1:8888 in your browser.

  2. Go to Explore, select Loki in Outline.

  3. Set the Line Limit to 5000 (1), switch to the Code mode(2), and execute the following query (3):

Change the namespace to your namespace.

{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`
Logs collection
  1. Click Download => CSV.

  2. Sent the file to PerfectScale.

How to access the dashboards

  1. Access Grafana via port forwarding

kubectl port-forward svc/monitoring-grafana 8888:80 -n ks-test
  1. Navigate to http://127.0.0.1:8888 in your browser.

  2. Navigate to Home and select Dashboards.

  3. Import a new dashboard, or select the existing one.

Dashboards

Last updated

Was this helpful?