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

Special arguments are not passed to MaxScale's monitor script

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.3.15, 2.4.4
    • N/A
    • Monitor
    • None

    Description

      MaxScale allows users to set a script parameter for all monitors. When this parameter is set, MaxScale will execute the specified script whenever the cluster changes in some way. MaxScale is supposed to pass special arguments to the script, and these special arguments are supposed to contain information about the cluster change.

      https://mariadb.com/kb/en/mariadb-maxscale-24-common-monitor-parameters/#script

      Unfortunately, MaxScale does not currently pass the special arguments to the script at all.

      To test this, we can create a very simple script:

      $ cat /tmp/test.sh
      #!/usr/bin/env bash
       
      echo "Script arguments: $@"
      

      And then we can configure MaxScale to use the script:

      [Galera-Monitor]
      type=monitor
      module=galeramon
      servers=C1N1,
              C1N2,
              C1N3
      user=maxscale
      password=password
      monitor_interval=10000
      script=/tmp/test.sh
      

      When the cluster changes, MaxScale does execute the script, but we can see that no arguments are passed to it:

      2019-12-09 17:07:35   notice : Server changed state: C1N3[172.30.0.126:3306]: master_down. [Master, Synced, Running] -> [Down]
      2019-12-09 17:07:35   info   : Executing command '/tmp/test.sh' in process 2179
      2019-12-09 17:07:35   notice : /tmp/test.sh: Script arguments:
      2019-12-09 17:07:35   notice : Executed monitor script '/tmp/test.sh' on event 'master_down'
      2019-12-09 17:07:35   notice : Master switch detected: lost a master and gained a new one
      

      Attachments

        Issue Links

          Activity

            People

              johan.wikman Johan Wikman
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.