{
  "checks": [
    {
      "name": "Apache workers busy",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "4e4173e1-5904-5c15-8d2f-34ca7ad3c9d1",
        "value_unit": "workers",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 0,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "4e4173e1-5904-5c15-8d2f-34ca7ad3c9d1",
        "value_unit": "workers",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 80,
      "threshold_warn": 50,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "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": "HTTP Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 80
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 80
      },
      "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": "Apache idle workers",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "25b2acd0-70a2-5fa6-b05b-941d6620ce3f",
        "value_unit": "workers",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 1,
      "value_type": "info",
      "description": "",
      "check_config": {
        "script_id": "25b2acd0-70a2-5fa6-b05b-941d6620ce3f",
        "value_unit": "workers",
        "extract_value": "^(\\d+)"
      },
      "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": "HTTPS Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 443
      },
      "sort_order": 2,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 443
      },
      "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": "Apache requests/sec",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "72c67bca-2a05-5fb0-9d2c-36b37cb65496",
        "value_unit": "req/s",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 2,
      "value_type": "info",
      "description": "",
      "check_config": {
        "script_id": "72c67bca-2a05-5fb0-9d2c-36b37cb65496",
        "value_unit": "req/s",
        "extract_value": "^(\\d+)"
      },
      "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": "Apache 5xx errors (last 5min)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "0874e1f9-6f6c-5870-8b81-8cd2d4c84b45",
        "value_unit": "errors",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "0874e1f9-6f6c-5870-8b81-8cd2d4c84b45",
        "value_unit": "errors",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 50,
      "threshold_warn": 10,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "HTTP Check",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "http",
      "parameters": {
        "url": "http://{host}"
      },
      "sort_order": 3,
      "value_type": "duration",
      "description": "",
      "check_config": {
        "url": "http://{host}"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 10000,
      "threshold_warn": 3000,
      "interval_seconds": 60,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Apache Service",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "0a03e3b3-8898-5da2-a03f-c12a23c6870d",
        "match_regex": "^active$"
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "0a03e3b3-8898-5da2-a03f-c12a23c6870d",
        "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": "Apache service running",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "e8f73561-1205-50dd-b89e-c3fba9158316",
        "value_unit": "up",
        "match_regex": "^0$",
        "extract_value": "^(\\d+)",
        "fail_if_match": true
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "e8f73561-1205-50dd-b89e-c3fba9158316",
        "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": "Apache Web Server",
    "tags": [
      "apache",
      "web",
      "linux",
      "ssh"
    ],
    "vendor": "generic",
    "category": "server",
    "os_family": "linux",
    "description": "Linux + Apache: Ports, HTTP Check, Service.",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": false,
    "requires_snmp": true,
    "description_md": "Linux + Apache: Ports, HTTP Check, Service.",
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "Apache workers busy",
      "script_id": "4e4173e1-5904-5c15-8d2f-34ca7ad3c9d1",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "apache2ctl status 2>/dev/null | awk '/requests currently being processed/{print $1; exit}' || curl -sf http://localhost/server-status?auto 2>/dev/null | awk -F: '/^BusyWorkers/{print $2+0; exit}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Apache idle workers",
      "script_id": "25b2acd0-70a2-5fa6-b05b-941d6620ce3f",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -sf http://localhost/server-status?auto 2>/dev/null | awk -F: '/^IdleWorkers/{print $2+0; exit}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Apache requests/sec",
      "script_id": "72c67bca-2a05-5fb0-9d2c-36b37cb65496",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -sf http://localhost/server-status?auto 2>/dev/null | awk -F: '/^ReqPerSec/{print int($2); exit}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Apache 5xx errors (last 5min)",
      "script_id": "0874e1f9-6f6c-5870-8b81-8cd2d4c84b45",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "journalctl -u apache2 --since '5min ago' 2>/dev/null | grep -cE 'HTTP/.*\\\" 5[0-9]{2}' || tail -2000 /var/log/apache2/access.log 2>/dev/null | awk -v t=\\\"$(date -d '5min ago' '+%d/%b/%Y:%H:%M')\\\" '$4 >= \\\"[\\\"t && $9 ~ /^5/{c++} END{print c+0}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Apache Service",
      "script_id": "0a03e3b3-8898-5da2-a03f-c12a23c6870d",
      "is_builtin": true,
      "description": "Auto-registered from builtin profile-check 'Apache Service'.",
      "interpreter": "bash",
      "script_body": "systemctl is-active apache2 || systemctl is-active httpd",
      "expected_output": "nagios"
    },
    {
      "name": "Apache service running",
      "script_id": "e8f73561-1205-50dd-b89e-c3fba9158316",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "systemctl is-active apache2 2>/dev/null | grep -c '^active$' || echo 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}