Skip to content

Instantly share code, notes, and snippets.

@eRadical
Forked from sts/clustercheck.socket
Created September 12, 2017 09:44
Show Gist options
  • Save eRadical/8e3a6ddcdbbf9d21fa96caed28673d3e to your computer and use it in GitHub Desktop.
Save eRadical/8e3a6ddcdbbf9d21fa96caed28673d3e to your computer and use it in GitHub Desktop.

Revisions

  1. @sts sts created this gist Nov 30, 2015.
    11 changes: 11 additions & 0 deletions clustercheck.socket
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # /etc/systemd/system/clustercheck.socket

    [Unit]
    Description=MySQL Clustercheck Socket

    [Socket]
    ListenStream=9200
    Accept=true

    [Install]
    WantedBy=sockets.target
    10 changes: 10 additions & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # /etc/systemd/system/[email protected]

    [Unit]
    Description=MySQL Clustercheck
    After=network.target

    [Service]
    User=nobody
    ExecStart=-/usr/bin/clustercheck clustercheck AoWdTTItrUqNo9aNY
    StandardInput=socket
    6 changes: 6 additions & 0 deletions mysql_clustercheck.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # /etc/rsyslog.d/mysql_clustercheck.conf
    #
    # systemd log fixup - No, we don't want to log mysql clustercheck systemd
    # messages everytime haproxy connects (every 500ms per LB in our case)
    if $programname == 'systemd' and $msg contains 'Starting MySQL Clustercheck' then stop
    if $programname == 'systemd' and $msg contains 'Started MySQL Clustercheck' then stop
    11 changes: 11 additions & 0 deletions systemd_MySQL_Clustercheck.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ## Systemd Clustercheck
    Clustercheck is a script to make a proxy (ie. haproxy) capable of monitoring Percona XtraDB Cluster nodes properly.
    This is a config to run clustercheck/mysqlchk from systemd instead of xinetd.

    ## INSTALL
    ```
    cp clustercheck.socket /etc/systemd/system
    cp [email protected] /etc/systemd/system
    systemctl enable clustercheck.socket
    systemctl start clustercheck.socket
    ```