Uploaded image for project: 'Couchbase Monitoring and Observability Stack'
  1. Couchbase Monitoring and Observability Stack
  2. CMOS-296

Override gomemcached logger to log to Zap

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • 0.3
    • None
    • cluster-monitor
    • None

    Description

      gomemcached logs look like this:

      2022-02-02T09:59:45.350+00:00 [INFO] Using plain authentication for user <ud>Administrator</ud> 
      2022-02-02T09:59:45.513+00:00 [INFO] Using plain authentication for user <ud>Administrator</ud> 
      2022-02-02T09:59:45.556+00:00 [INFO] Using plain authentication for user <ud>Administrator</ud> 
      

      As opposed to our logs, which look like

      2022-02-02T09:59:45.557Z WARN (Check Runner) Error running checker {"checker": "bucketMemcachedStatsCheckers", "cluster": "231b609b71c38e0819f6d51386fab218", "error": "could not parse FragmentationBytes: strconv.Atoi: parsing \"\": invalid syntax"}
      2022-02-02T09:59:45.557Z DEBUG (Check Runner) Running checker {"checker": "freeMem", "cluster": "231b609b71c38e0819f6d51386fab218"}
      2022-02-02T09:59:45.557Z DEBUG (Check Runner) Checker run complete. {"elapsed": 0.477553229}

      This means that anyone wanting to parse them will need to deal with both formats.

      We should look into piping gomemcached's logger into Zap (like we did for tools-common/log in CMOS-185) so that all our logging is consistent. This should also ensure that gomemcached uses the same log level as the rest of cbmultimanager is configured to use.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            marks.polakovs Marks Polakovs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty