Skip to content
logo
Percona ProxySQL Admin tool
Percona Scheduler Admin configuration
Initializing search
    percona/proxysql-admin-tool-doc
    percona/proxysql-admin-tool-doc
    • Home
      • Use ProxySQL 1.x.x with ProxySQL Admin
      • Install ProxySQL 1.x.x
      • Install ProxySQL 1.X from a binary tarball
      • Configure ProxySQL 1.x.x
      • Download locations for ProxySQL 2.x.x and ProxySQL admin utilities
      • Install ProxySQL 2.x.x and the admin utilities
      • Install ProxySQL 2.x.x binary tarball
      • Build the Percona Scheduler admin tool
      • Start and stop ProxySQL
      • Upgrade ProxySQL
      • Uninstall ProxySQL 2.x.x
      • ProxySQL Admin tool changes
      • ProxySQL 2.x and proxysql-admin utility
      • The proxysql-admin functions
      • ProxySQL 2.x.x and Percona Scheduler Admin tool
      • Percona Scheduler Admin configuration
        • Example of a configuration file
      • Percona Scheduler Admin statements
      • Percona Scheduler Admin options
      • Known issues in Percona Scheduler Admin
      • Release notes index
      • ProxySQL 2.4.7 and ProxySQL admin tools (2023-02-14)
      • ProxySQL 2.4.4-1.2 and ProxySQL admin tools (2022-11-08)
      • ProxySQL 2.4.4 and ProxySQL admin tools (2022-10-04)
      • ProxySQL 2.4.3 and ProxySQL admin tools (2022-08-31)
      • ProxySQL 2.4.2 and proxysql admin tools (2022-08-10)
      • ProxySQL 2.3.2-1.2, proxysql-admin, and percona-scheduler-admin (2022-06-15)
      • ProxySQL 2.3.2 and proxysql-admin (2021-11-03)
      • ProxySQL 2.2.0 and proxysql-admin (2021-08-10)
      • ProxySQL 2.1.1 and proxysql-admin (2021-07-09)
      • ProxySQL 2.0.18 and proxysql-admin (2021-04-19)
      • ProxySQL 2.0.17 and proxysql-admin (2021-04-06)
      • ProxySQL 2.0.15 and proxysql-admin (2020-11-17)
      • ProxySQL 2.0.14 and proxysql-admin (2020-09-24)
      • ProxySQL 2.0.13 and proxysql-admin (2020-08-05)
      • ProxySQL 2.0.12 and proxysql-admin (2020-06-11)
      • ProxySQL 2.0.7 and proxysql-admin (2019-10-23)
      • ProxySQL 2.0.6 and proxysql-admin (2019-08-21)
      • ProxySQL 2.0.5 and proxysql-admin (2019-11-23)
      • ProxySQL 2.0.4 and proxysql-admin (2019-05-28)
      • ProxySQL 2.0.3 and proxysql-admin (2019-05-07)
      • ProxySQL 1.4.16 and proxysql-admin (2020-02-11)
      • ProxySQL 1.4.12 and proxysql-admin (2018-11-13)
      • ProxySQL 1.4.8 and proxysql-admin (2018-05-22)
      • ProxySQL 1.4.7 and proxysql-admin (2018-04-16)
      • ProxySQL 1.4.6 and proxysql-admin (2018-03-12)
      • ProxySQL 1.4.5 and proxysql-admin (2018-02-15)
      • ProxySQL 1.4.4 and proxysql-admin (2018-01-18)
    • Example of a configuration file

    Percona Scheduler Admin configuration¶

    ProxySQL with the percona-scheduler-admin stores the parameters in a configuration file that uses the toml format. This file defines the server credentials and other settings.

    Use the --config-file option to run the percona-scheduler-admin script.

    Warning

    We do not recommend storing the scheduler configuration file in the Home directory.

    Example of a configuration file¶

    A configuration file is used to control the Percona Scheduler Admin operations. The file can be changed as needed. The administrator controls what protected resources the tool can access.

    # For the detailed manual, see
    # https://github.com/percona/pxc_scheduler_handler#how-to-configure-pxc-scheduler-handler
    
    
    [pxccluster]
    activeFailover = 1
    failBack = false
    checkTimeOut = 2000
    pingTimeout = 1000
    mainSegment = 0
    sslClient = "client-cert.pem"
    sslKey = "client-key.pem"
    sslCa = "ca.pem"
    sslCertificatePath = "/path/to/ssl_cert"
    hgW = 100
    hgR = 101
    configHgRange =8000
    maintenanceHgRange =9000
    
    # --------------------------------
    # Set to true if there is a single writer node.  If this is set,
    # then maxNumWriters is assumed to be 1.
    #
    # Allowable values: true,false
    # Default: false
    #
    singlePrimary = true
    
    # --------------------------------
    # Set to the number of writer nodes desired.
    #
    # The value of this is assumed to be 1 if singlePrimary is true.
    #
    # If this is set to a value from 1 to 100, then the query rules
    # are setup for a distinct writer hostgroup (writes are sent to the
    # writer hostgroup and read are sent to the reader hostgroup).
    #
    # If this is set to a value > 100, then all queries (writes and reads)
    # are sent to the writer hostgroup.  This is assumed to be a
    # load-balancing scenario, where all nodes are equivalent and accept
    # both reads and writes.
    #
    # Default: (none)
    #
    maxNumWriters = 1
    writerIsAlsoReader = 1
    retryUp = 0
    retryDown = 2
    clusterId = 10
    
    # Controls the primary settings during failover.
    # More details at https://github.com/percona/pxc_scheduler_handler#persist-primary-values
    #
    # Allowed values:
    #
    #       0 Disable
    #       1 Persist only write settings
    #       2 Persist both read and write settings
    persistPrimarySettings=0
    
    
    
    # == proxysql ===================================================
    # The proxysql section is for ProxySQL-specific information.
    #
    # These settings will be read and used whenever the scheduler is run.
    #
    [proxysql]
    port = 6032
    host = "127.0.0.1"
    user = "<valid user to connect from real ip as for proxysql_server table>"
    password = "<password>"
    clustered = false
    lockfilepath ="/var/run/pxc_scheduler_handler"
    respectManualOfflineSoft=false
    pingTimeout = 1000
    
    
    
    #== global ======================================================
    # The global section are for variables that are not ProxySQL or
    # cluster specific.
    #
    # These settings will be read and used whenever the scheduler is run.
    #
    [global]
    debug = true
    
    # stdout: output is redirected to proxysql logs
    # file: output is written to the file pointed by logFile. When setting 
    to ``file`, ensure that the user `proxysql:proxysql` has the 
    appropriate permissions to write to this location.
    logTarget = "stdout" #stdout | file
    
    # Defines the log level to be used.
    # Allowed options are [error,warning,info,debug]
    logLevel = "info"
    logFile = "/var/log/pxc_scheduler_handler/pscheduler.log"
    
    # Should be set to false if we are pxc_scheduler_handler through percona-scheduler-admin.
    daemonize = false
    daemonInterval = 2000
    
    # boolean variable which enables reporting of statistics.
    performance = true
    
    # Not used currently
    OS = "na"
    
    # Time in seconds after which the file lock is considered expired [local instance lock]
    lockFileTimeout = 60 #seconds
    
    # Time in seconds after which the cluster lock is considered expired
    lockClusterTimeout = 600 #seconds
    
    
    
    #== setup =======================================================
    # These variables are used only upon Setup
    # Changing these variables after setup will not affect operation
    #
    [setup]
    
    # --------------------------------
    # The clusterAppUser is the ProxySQL user account that should be
    # used by clients to access the cluster.
    #
    # Uncomment the following options (clusterAppUser and clusterAppUserPassword)
    # to enable the setting of the clusterAppUser for this cluster.
    #
    #clusterAppUser="proxysql_user"
    #clusterAppUserPassword="passw0rd"
    
    # --------------------------------
    # The monitorUser is used by ProxySQL to access the servers and
    # check the connections.
    #
    monitorUser="monitor"
    monitorUserPassword="monitor"
    
    # --------------------------------
    # The clusterXXX information is used to setup the cluster for
    # use by ProxySQL.
    #
    clusterHost="<IP_ADDRESS>"
    clusterPort=3306
    clusterUser="admin"
    clusterUserPassword="admin"
    
    # --------------------------------
    # ProxySQL will use SSL to connect to the backend servers
    #
    useSSL=0
    
    # --------------------------------
    # Max number of connections from ProxySQL to the backend servers.
    #
    maxConnections=1000
    
    
    # --------------------------------
    # Defines how frequently (in milliseconds) the scheduler must be run
    #
    nodeCheckInterval=2000
    

    Contact us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: 2023-02-14
    Back to top
    Percona LLC and/or its affiliates, © 2023
    Made with Material for MkDocs

    Cookie consent

    We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.