Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-8566

Specify Custom Basic Auth password for Agents when adding Node

Details

    • Improvement
    • Status: Done
    • High
    • Resolution: Done
    • None
    • 2.29.0
    • None
    • None

    Description

      pmm-admin's config and register commands should be extended with a new flag to support a custom password for exporters' metrics auth:

      #pmm-admin register --agent-password=AGENT-PASSWORD
      #pmm-admin config --agent-password=AGENT-PASSWORD

      pmm-agent's setup command should be extended with a new optional flag --agent-password

       

      Testing

      Prerequisities:

      1. pmm-server is up and running

      2. local pmm-agent is registered and running (for cases C1 and C2)

       

      Check routines: 

      Verify exporter is up and running (user/password)

      1. navigate to localhost:<PORT>/metrics (find node exporter's <PORT> in logs while starting pmm-agent)

              browser should ask a user/password to access a page

              metrics page should open

      2. navigate to <PMM_ADDR>/graph/d/node-instance-summary/node-summary

      3. select your node from Node Name dropdown

              dashboard should display actual data for your local node_exporter

       

      Cases:

      C1. pmm-admin config

          1.1. run the command

      ./bin/pmm-admin config --agent-password=<PASSWORD>

              use --force flag to override existing node error if needed;

          1.2. verify new password is stored in pmm (i.e. in agents table)

          1.3. restart the agent

          1.4. [Verify exporter is up and running] (pmm/<PASSWORD>)

      C2. pmm-admin register

          2.1. run the command:

      ./bin/pmm-admin register --agent-password=<PASSWORD>

              use --force flag to override existing node error if needed;

          2.2. verify new password is stored in pmm (i.e. in agents table)

          2.3. restart the agent

          2.4. [Verify exporter is up and running] (pmm/<PASSWORD>)

      C3. pmm-agent setup

          3.1. run the command: 

      pmm-agent setup --config-file=pmm-agent-dev.yaml --server-address=<PMM_ADDR>:<PORT> --agent-password=<PASSWORD>

              use --force flag to override existing node error if needed;

              use --paths-exporters_base flag to specify binaries location if needed;

              if TLS is disabled - authenticate via user/password:

              --server-insecure-tls --server-username=<PMM_USER> --server-password=<PMM_PASS>

          3.2. verify new password is stored in pmm (i.e. in agents table)

          3.3. start the agent

          3.4. [Verify exporter is up and running] (pmm/<PASSWORD>)

      -----------------------------------------------------------------------------------------------------------------------

      Original description: In PMM-7570, the node exporter is not receiving the custom password, it still uses agent ID.

      Attachments

        Activity

          People

            taras.shcherban Taras Shcherban
            carlos.salguero Carlos Salguero
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist