Details
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):
- In https://jira.percona.com/browse/PMM-9840 added --log-level to exporters
- In https://jira.percona.com/browse/PMM-5668 added --log-level to pmm-agent
- 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):
- Now all messages from exporter logged in pmm-agent with log-level=INFO
- 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_exporterWhat is the problem to take level=error from the message and use proper logger for that l.Error(...) ?