Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6004

MySQL exporter reporting wrong values for cluster status (wsrep_cluster_status)

Details

    • 0
    • Yes
    • Yes
    • No

    Description

      MySQLd exporters instruments wsrep_cluster_status as:

      ...
       if bytes.Compare(data, []byte("Non-Primary")) == 0 || bytes.Compare(data, []byte("Disconnected")) == 0 {
      
        return 0, true
      
       }
      ...
      

      buy WSREP reports the state as non-Primary, not Non-Primary:

      static const char*  cluster_status_str[WSREP_VIEW_MAX] =
      
      {
      
          "Primary",
      
          "non-Primary",
      
          "Disconnected"
      
      };
      
      

      DoD:

      • Our version of mysqld_exporter fixed
      • Dashboard present correct information
      • PR for upstream created

      Out of scope:

      • waiting for fix this on the upstream side, just send PR for them
      • Update of PS documentation

       

      DOC:  Correct status (non_Primary) has to be shown in documentation too
      https://www.percona.com/doc/percona-xtradb-cluster/LATEST/wsrep-status-index.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iwo.panowicz Iwo Panowicz
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 7 hours, 15 minutes
                  7h 15m

                  Smart Checklist