Skip to content
logo
Percona Operator for PostgreSQL
Monitor with Percona Monitoring and Management (PMM)
Initializing search
    percona/k8spg-docs
    percona/k8spg-docs
    • Welcome
      • System Requirements
      • Design and architecture
      • Comparison with other solutions
      • Install on Minikube
      • Install on Google Kubernetes Engine (GKE)
      • Install with Helm
      • Generic Kubernetes installation
      • Install on OpenShift
      • Application and system users
      • Changing PostgreSQL Options
      • Anti-affinity and tolerations
      • Transport Encryption (TLS/SSL)
      • Telemetry
      • Backup and restore
      • Upgrade Percona Distribution for PostgreSQL and the Operator
      • Horizontal and vertical scaling
      • Monitor with Percona Monitoring and Management (PMM)
        • Installing the PMM Server
        • Installing the PMM Client
      • Restart or pause the cluster
      • Deploy a standby cluster for Disaster Recovery
      • Provide Percona Operator for PostgreSQL single-namespace and multi-namespace deployment
      • Use PostgreSQL tablespaces with Percona Operator for PostgreSQL
      • Custom Resource options
      • Operator installation options
      • Percona certified images
      • Frequently Asked Questions
      • Release notes index
      • Percona Operator for PostgreSQL 1.3.0 (2022-08-04)
      • Percona Operator for PostgreSQL 1.2.0 (2022-04-06)
      • Percona Operator for PostgreSQL 1.1.0 (2021-12-07)
      • Percona Operator for PostgreSQL 1.0.0 (2021-10-07)
      • Percona Operator for PostgreSQL 0.2.0 (2021-08-12)
      • Percona Operator for PostgreSQL 0.1.0 (2021-05-10)

    • Installing the PMM Server
    • Installing the PMM Client

    Monitoring¶

    Percona Monitoring and Management (PMM) provides an excellent solution to monitor Percona Distribution for PostgreSQL.

    Note

    Only PMM 2.x versions are supported by the Operator.

    PMM is a client/server application. PMM Client runs on each node with the database you wish to monitor: it collects needed metrics and sends gathered data to PMM Server. As a user, you connect to PMM Server to see database metrics on a number of dashboards.

    That’s why PMM Server and PMM Client need to be installed separately.

    Installing the PMM Server¶

    PMM Server runs as a Docker image, a virtual appliance, or on an AWS instance. Please refer to the official PMM documentation for the installation instructions.

    Installing the PMM Client¶

    The following steps are needed for the PMM client installation in your Kubernetes-based environment:

    1. The PMM client installation is initiated by updating the pmm section in the deploy/cr.yaml file.

      • set pmm.enabled=true
      • set the pmm.serverHost key to your PMM Server hostname,
      • check that the serverUser key contains your PMM Server user name (admin by default),
      • make sure the pmmserver key in the deploy/pmm-secret.yaml secrets file contains the password specified for the PMM Server during its installation.

      Apply changes with the kubectl apply -f deploy/pmm-secret.yaml command.

      Info

      You use deploy/pmm-secret.yaml file to create Secrets Object. The file contains all values for each key/value pair in a convenient plain text format. But the resulting Secrets contain passwords stored as base64-encoded strings. If you want to update password field, you’ll need to encode the value into base64 format. To do this, you can run echo -n "password" | base64 --wrap=0 (or just echo -n "password" | base64 in case of Apple macOS) in your local shell to get valid values. For example, setting the PMM Server user’s password to new_password in the cluster1-pmm-secret object can be done with the following command:

      $ kubectl patch secret/cluster1-pmm-secret -p '{"data":{"pmmserver": '$(echo -n new_password | base64 --wrap=0)'}}'
      
      $ kubectl patch secret/cluster1-pmm-secret -p '{"data":{"pmmserver": '$(echo -n new_password | base64)'}}'
      

      When done, apply the edited deploy/cr.yaml file:

      $ kubectl apply -f deploy/cr.yaml
      
    2. Check that corresponding Pods are not in a cycle of stopping and restarting. This cycle occurs if there are errors on the previous steps:

      $ kubectl get pods
      $ kubectl logs cluster1-7b7f7898d5-7f5pz -c pmm-client
      
    3. Now you can access PMM via https in a web browser, with the login/password authentication, and the browser is configured to show Percona Distribution for PostgreSQL metrics.

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: 2023-02-09
    Back to top
    Percona LLC and/or its affiliates, © 2009 - 2022
    Made with Material for MkDocs

    Cookie consent

    We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.