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

pmm-agent log-level match exporters output

Details

    • Improvement
    • Status: Done
    • Medium
    • Resolution: Done
    • None
    • 2.30.0
    • PMM Agent
    • None
    • 1
    • Yes
    • Yes
    • No
    • [obsolete] Implex

    Description

      User story:
      As a PMM user, i want to apply pmm-agent --log-level to exporters output
      So each message from exporter with log-level=WARN will logged in pmm-agent with same log-level=WARN

      UI/UX:
      > pmm-agent --log-level=WARN

      Out of scope (explain):

      1. In https://jira.percona.com/browse/PMM-9840 added --log-level to exporters
      2. In https://jira.percona.com/browse/PMM-5668 added --log-level to pmm-agent
      3. In https://jira.percona.com/browse/PMM-7326 added --log-level to pmm-admin to configure exporters --log-level like
        > pmm-admin add mysql --log-level=info

      Out of scope (now):

      1. Now all messages from exporter logged in pmm-agent with log-level=INFO
      2. When pmm-agent --log-level=WARN then exporter output gone

      Original report from artem.gavrilov after DEMO:

      Regarding logs, in your example log was like this:

      INFO[2022-05-31T17:23:37.620+03:00] time="2022-05-31T17:23:37+03:00" level=error msg="cannot scrape status with a chosen query \"SHOW SLAVE STATUS\": Error 1227: Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation" source="slave_status.go:104"  agentID=/agent_id/6d89c104-ff8e-4af8-ac11-e5c948b831a4 component=agent-process type=mysqld_exporter
      

      What is the problem to take level=error from the message and use proper logger for that l.Error(...) ?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yaroslav.podorvanov Yaroslav Podorvanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days
                  3d

                  Smart Checklist