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

Proper logging level extraction from exporters log messages

Details

    • Improvement
    • Status: Open
    • Low
    • Resolution: Unresolved
    • None
    • None
    • PMM Agent

    Description

      User story:

      Currently for extracting log level from log message we are searching for the firs entrance of `level=` pattern with regexp. Which should work in most cases, however this approach can't properly handle this:

      ts=2022-06-14T21:50:00.817Z caller=node_exporter.go:184  msg="naming collision level=error " level=info 

      Instead of `info` our implementation will extract `error` level. We should investigate how proper logs parsing will affect CPU usage and if it's acceptable switch to it.

      Here is some libraries for logfmt format parcing:
      https://github.com/go-logfmt/logfmt
      https://github.com/kr/logfmt

      UI/UX:

       

      Acceptance criteria:

       

      Out of scope:

       

      Suggested implementation:

       

      How to test:

       

      Details:

      https://github.com/percona/pmm/pull/936

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              artem.gavrilov Artem Gavrilov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Smart Checklist