Skip to content

Add promises to check the apachedex and mariadb slow query pt-digest result

Hardik Juneja requested to merge hjuneja/slapos:master into master

Note: This patch requires newest version of Slapos Toolbox

Revisiting the discussion here: https://lab.nexedi.com/nexedi/slapos/merge_requests/170#note_36946

I am not including the schema in this pull request as it needs some discussion, but to test and to give you an idea here is a quick sketch of the schema

  "monitor": {
    "description": "Monitor related parameters",
    "properties": {
        "apachedex-promise-threshold": {
          "title": "ApacheDex Promise Threshold",
          "description": "If the result in the apachedex report exeecds this value, the promise will fail.",
          "type": "integer",
          "default": "80"
        },
        "apachedex-configuration": {
          "description": "Configuration for apachedex",
          "type": "string",
          "default": "--erp5-base '/erp5(/|$|\?)' --skip-user-agent Zabbix  --error-detail --js-embed --quiet"
        },
       "max-slowqueries-threshold'": {
          "description": "If the maximum number of slow queries exeed this value, the promise will fail",
          "type": "string",
          "default": 1000
        },
       "slowest-query-threshold'": {
          "description": "If the slowest query in the mariadb slow query log  exeed this value, the promise will fail",
          "type": "string",
          "default": ""
        }
     }
   }

TODO: To discuss the slowquery thresholds

Merge request reports