Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5196

/maxscale/logs/data may return no data if maxlog=0 and syslog=1

    XMLWordPrintable

Details

    • MXS-SPRINT-215, MXS-SPRINT-216

    Description

      Here's an example with an installation of MaxScale 21.06.16 on Rocky Linux 8.

      [vagrant@maxscale testing]$ sudo systemctl restart maxscale
      [vagrant@maxscale testing]$ curl -u admin:mariadb localhost:8989/maxscale/logs/data?page%5Bsize%5D=3
      {
          "data": {
              "attributes": {
                  "log": [],
                  "log_source": "syslog"
              },
              "id": "log_data",
              "type": "log_data"
          },
          "links": {
              "last": "http://localhost:8989/maxscale/logs/data/?page%5Bsize%5D=3",
              "self": "http://localhost:8989/maxscale/logs/data/"
          }
      }
      [vagrant@maxscale testing]$sudo usermod -a -G systemd-journal maxscale
      [vagrant@maxscale testing]$ sudo systemctl restart maxscale
      [vagrant@maxscale testing]$ curl -u admin:mariadb localhost:8989/maxscale/logs/data?page%5Bsize%5D=3
      {
          "data": {
              "attributes": {
                  "log": [
                      {
                          "id": "s=ea14a6c6ee314a08a3f0567c2fd5a3b3;i=13d4;b=ae314888f6494d0ba6fed4939caef92a;m=18f3b84729;t=61f2efde86f4e;x=ad0c44490eeb3d93",
                          "message": "Listening for connections at [::]:4006",
                          "object": "RW-Split-Listener",
                          "priority": "notice",
                          "timestamp": "2024-08-08 20:02:29"
                      },
                      {
                          "id": "s=ea14a6c6ee314a08a3f0567c2fd5a3b3;i=13d5;b=ae314888f6494d0ba6fed4939caef92a;m=18f3b84764;t=61f2efde86f88;x=f3af4d1ae0ead119",
                          "message": "Service 'RW-Split-Router' started (1/1)",
                          "priority": "notice",
                          "timestamp": "2024-08-08 20:02:29"
                      },
                      {
                          "id": "s=ea14a6c6ee314a08a3f0567c2fd5a3b3;i=13d8;b=ae314888f6494d0ba6fed4939caef92a;m=18f3c71964;t=61f2efdf74188;x=c865e9424c1a8ea4",
                          "message": "Read 11 user@host entries from 'server1' for service 'RW-Split-Router'.",
                          "priority": "notice",
                          "timestamp": "2024-08-08 20:02:30"
                      }
                  ],
                  "log_source": "syslog"
              },
              "id": "log_data",
              "type": "log_data"
          },
          "links": {
              "last": "http://localhost:8989/maxscale/logs/data/?page%5Bsize%5D=3",
              "prev": "http://localhost:8989/maxscale/logs/data/?page%5Bcursor%5D=s=ea14a6c6ee314a08a3f0567c2fd5a3b3;i=13d3;b=ae314888f6494d0ba6fed4939caef92a;m=18f3b845b1;t=61f2efde86dd6;x=84e10365ddccb013&page%5Bsize%5D=3",
              "self": "http://localhost:8989/maxscale/logs/data/?page%5Bcursor%5D=s=ea14a6c6ee314a08a3f0567c2fd5a3b3;i=13d8;b=ae314888f6494d0ba6fed4939caef92a;m=18f3c71964;t=61f2efdf74188;x=c865e9424c1a8ea4&page%5Bsize%5D=3"
          }
      }
      

      The reason why this happens is that only users who are a part of the systemd-journal group can access the system journal.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              markus makela markus makela
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.