{
  "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": "HTTPS WebUI",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 8443
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 8443
      },
      "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": "Controller HTTPS",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 8443
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 8443
      },
      "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": "Controller HTTP-Inform",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 8080
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 8080
      },
      "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": "Controller Inform",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 8080
      },
      "sort_order": 2,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 8080
      },
      "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": "Inform Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 8080
      },
      "sort_order": 2,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 8080
      },
      "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": "SSL Certificate",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssl_certificate",
      "parameters": {
        "port": 443
      },
      "sort_order": 3,
      "value_type": "duration",
      "description": "",
      "check_config": {
        "port": 443
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 7,
      "threshold_warn": 30,
      "interval_seconds": 3600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "HTTP Check",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "http",
      "parameters": {
        "url": "https://{host}:8443"
      },
      "sort_order": 3,
      "value_type": "duration",
      "description": "",
      "check_config": {
        "url": "https://{host}:8443"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 15000,
      "threshold_warn": 5000,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Devices offline (sites total)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "afca4812-c6c2-5a1b-93b3-4076c41dd726",
        "value_unit": "devices",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "afca4812-c6c2-5a1b-93b3-4076c41dd726",
        "value_unit": "devices",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 1,
      "threshold_warn": 1,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Active client count",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "bfd2219a-e2fe-5418-b87e-ba14692c6272",
        "value_unit": "clients",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 5,
      "value_type": "info",
      "description": "",
      "check_config": {
        "script_id": "bfd2219a-e2fe-5418-b87e-ba14692c6272",
        "value_unit": "clients",
        "extract_value": "^(\\d+)"
      },
      "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": "UniFi — System-Uptime",
      "auto_add": false,
      "check_mode": "passive",
      "check_type": "snmp",
      "parameters": {
        "oid": "1.3.6.1.2.1.1.3.0",
        "unit": "ticks"
      },
      "sort_order": 1000,
      "value_type": "gauge",
      "description": "sysUpTimeInstance (1.3.6.1.2.1.1.3.0). Standard-MIB, funktioniert auf allen UniFi-Geräten. Wert in Hundredstel-Sekunden — der Collector formatiert das passend (siehe unit=ticks Logik in check_snmp.go).\n",
      "check_config": {
        "oid": "1.3.6.1.2.1.1.3.0",
        "unit": "ticks"
      },
      "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": "UniFi-Switch — Anzahl Interfaces",
      "auto_add": false,
      "check_mode": "passive",
      "check_type": "snmp",
      "parameters": {
        "oid": "1.3.6.1.2.1.2.1.0",
        "unit": ""
      },
      "sort_order": 1001,
      "value_type": "gauge",
      "description": "ifNumber — Anzahl SNMP-bekannter Interfaces (Sanity-Check).",
      "check_config": {
        "oid": "1.3.6.1.2.1.2.1.0",
        "unit": ""
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 3600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    }
  ],
  "profile": {
    "icon": "server",
    "name": "UniFi Network Controller",
    "tags": [
      "ubiquiti",
      "unifi",
      "controller",
      "wlan"
    ],
    "vendor": "ubiquiti",
    "category": "server",
    "os_family": null,
    "description": "UniFi Network Application / Controller: WebUI, API, Service Status.",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": false,
    "requires_snmp": true,
    "description_md": "UniFi Network Application / Controller: WebUI, API, Service Status.",
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "Devices offline (sites total)",
      "script_id": "afca4812-c6c2-5a1b-93b3-4076c41dd726",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -ks -u \\\"$SSH_USER:$SSH_PASS\\\" https://localhost:8443/api/s/default/stat/device | python3 -c 'import sys,json; d=json.load(sys.stdin); print(sum(1 for x in d[\\\"data\\\"] if x.get(\\\"state\\\")!=1))' 2>/dev/null || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Active client count",
      "script_id": "bfd2219a-e2fe-5418-b87e-ba14692c6272",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -ks -u \\\"$SSH_USER:$SSH_PASS\\\" https://localhost:8443/api/s/default/stat/sta | python3 -c 'import sys,json; print(len(json.load(sys.stdin)[\\\"data\\\"]))' 2>/dev/null || echo 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}