{
  "checks": [
    {
      "name": "Ping",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ping",
      "parameters": {},
      "sort_order": 0,
      "value_type": "duration",
      "description": "",
      "check_config": {},
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL connections",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "74cef1c9-26b3-5169-834b-d72fa909369c",
        "value_unit": "conns",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 0,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "74cef1c9-26b3-5169-834b-d72fa909369c",
        "value_unit": "conns",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 140,
      "threshold_warn": 80,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 3306
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 3306
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL slow queries (since startup)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "fceb20cc-b3ad-5eec-896c-06d9473d8f46",
        "value_unit": "queries",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 1,
      "value_type": "counter",
      "description": "",
      "check_config": {
        "script_id": "fceb20cc-b3ad-5eec-896c-06d9473d8f46",
        "value_unit": "queries",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "CPU",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_cpu",
      "parameters": {},
      "sort_order": 2,
      "value_type": "gauge",
      "description": "",
      "check_config": {},
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 95,
      "threshold_warn": 80,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL replication seconds behind",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "b712b9fc-b73a-5ebc-94a0-d72bfac9a105",
        "value_unit": "s",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 2,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "b712b9fc-b73a-5ebc-94a0-d72bfac9a105",
        "value_unit": "s",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 300,
      "threshold_warn": 30,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL replication errors",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "6511ff0b-1fb5-5854-aab7-0b005d58515f",
        "value_unit": "errors",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "6511ff0b-1fb5-5854-aab7-0b005d58515f",
        "value_unit": "errors",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 1,
      "threshold_warn": 1,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Memory",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_mem",
      "parameters": {},
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {},
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 95,
      "threshold_warn": 85,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Disk /var/lib/mysql",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_disk",
      "parameters": {
        "mount": "/var/lib/mysql"
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "mount": "/var/lib/mysql"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 90,
      "threshold_warn": 80,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL InnoDB buffer pool usage (%)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "0316fcc3-79a6-58c1-911e-f6cbd0fbfb27",
        "value_unit": "%",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "0316fcc3-79a6-58c1-911e-f6cbd0fbfb27",
        "value_unit": "%",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 99,
      "threshold_warn": 95,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL aborted connects (last 5min)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "1a4ae728-5d0b-56cd-a1a5-96bd78132144",
        "value_unit": "aborts",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 5,
      "value_type": "counter",
      "description": "",
      "check_config": {
        "script_id": "1a4ae728-5d0b-56cd-a1a5-96bd78132144",
        "value_unit": "aborts",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 100,
      "threshold_warn": 10,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL Service",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "764b0757-d9d5-5856-b017-9100caaf95a1",
        "match_regex": "^active$"
      },
      "sort_order": 5,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "764b0757-d9d5-5856-b017-9100caaf95a1",
        "match_regex": "^active$"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "MySQL service running",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "b8be3e5c-10dc-52c3-a1f6-a7fccbfa2559",
        "value_unit": "up",
        "match_regex": "^0$",
        "extract_value": "^(\\d+)",
        "fail_if_match": true
      },
      "sort_order": 6,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "b8be3e5c-10dc-52c3-a1f6-a7fccbfa2559",
        "value_unit": "up",
        "match_regex": "^0$",
        "extract_value": "^(\\d+)",
        "fail_if_match": true
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    }
  ],
  "profile": {
    "icon": "server",
    "name": "MySQL / MariaDB Database",
    "tags": [
      "mysql",
      "mariadb",
      "database",
      "ssh"
    ],
    "vendor": "generic",
    "category": "server",
    "os_family": "linux",
    "description": "MySQL/MariaDB Server: Port, Service, CPU, RAM, Disk.",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": false,
    "requires_snmp": true,
    "description_md": "MySQL/MariaDB Server: Port, Service, CPU, RAM, Disk.",
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "MySQL connections",
      "script_id": "74cef1c9-26b3-5169-834b-d72fa909369c",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe \\\"SHOW STATUS LIKE 'Threads_connected'\\\" 2>/dev/null | awk '{print $2}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL slow queries (since startup)",
      "script_id": "fceb20cc-b3ad-5eec-896c-06d9473d8f46",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe \\\"SHOW GLOBAL STATUS LIKE 'Slow_queries'\\\" 2>/dev/null | awk '{print $2}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL replication seconds behind",
      "script_id": "b712b9fc-b73a-5ebc-94a0-d72bfac9a105",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe 'SHOW SLAVE STATUS\\\\G' 2>/dev/null | awk -F: '/Seconds_Behind_Master/{print $2+0; exit}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL replication errors",
      "script_id": "6511ff0b-1fb5-5854-aab7-0b005d58515f",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe 'SHOW SLAVE STATUS\\\\G' 2>/dev/null | awk '/Last_(IO|SQL)_Errno/{if($2+0>0)c++} END{print c+0}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL InnoDB buffer pool usage (%)",
      "script_id": "0316fcc3-79a6-58c1-911e-f6cbd0fbfb27",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe \\\"SELECT ROUND((1-(SELECT VARIABLE_VALUE FROM information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_free')/(SELECT VARIABLE_VALUE FROM information_schema.GLOBAL_STATUS WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_total'))*100,1)\\\" 2>/dev/null || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL aborted connects (last 5min)",
      "script_id": "1a4ae728-5d0b-56cd-a1a5-96bd78132144",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "mysql -BNe \\\"SHOW GLOBAL STATUS LIKE 'Aborted_connects'\\\" 2>/dev/null | awk '{print $2}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL Service",
      "script_id": "764b0757-d9d5-5856-b017-9100caaf95a1",
      "is_builtin": true,
      "description": "Auto-registered from builtin profile-check 'MySQL Service'.",
      "interpreter": "bash",
      "script_body": "systemctl is-active mysql || systemctl is-active mariadb",
      "expected_output": "nagios"
    },
    {
      "name": "MySQL service running",
      "script_id": "b8be3e5c-10dc-52c3-a1f6-a7fccbfa2559",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "systemctl is-active mariadb mysql 2>/dev/null | grep -c '^active$' || echo 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}