{
  "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 Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 443
      },
      "sort_order": 1,
      "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": "Protect HTTPS",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 7443
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 7443
      },
      "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",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 7080
      },
      "sort_order": 2,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 7080
      },
      "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": "UniFi Protect",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 7443
      },
      "sort_order": 2,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 7443
      },
      "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": "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": "Cameras offline",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "ec7d197b-90fd-5e9c-ab2e-960278135bcd",
        "value_unit": "cameras",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "ec7d197b-90fd-5e9c-ab2e-960278135bcd",
        "value_unit": "cameras",
        "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": "Storage usage (%)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "4be07279-4d39-508c-8abd-db9be09751d0",
        "value_unit": "%",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 4,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "4be07279-4d39-508c-8abd-db9be09751d0",
        "value_unit": "%",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 95,
      "threshold_warn": 85,
      "interval_seconds": 300,
      "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": "video",
    "name": "Ubiquiti UniFi Protect",
    "tags": [],
    "vendor": "ubiquiti",
    "category": "vm_host",
    "os_family": null,
    "description": "",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": false,
    "requires_snmp": true,
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "Cameras offline",
      "script_id": "ec7d197b-90fd-5e9c-ab2e-960278135bcd",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -ks -u \\\"$SSH_USER:$SSH_PASS\\\" https://localhost:7443/api/cameras 2>/dev/null | python3 -c 'import sys,json; d=json.load(sys.stdin); print(sum(1 for x in d if x.get(\\\"state\\\")!=\\\"CONNECTED\\\"))' 2>/dev/null || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Storage usage (%)",
      "script_id": "4be07279-4d39-508c-8abd-db9be09751d0",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "curl -ks -u \\\"$SSH_USER:$SSH_PASS\\\" https://localhost:7443/api/nvr 2>/dev/null | python3 -c 'import sys,json; d=json.load(sys.stdin); s=d.get(\\\"storageInfo\\\",{}); used=s.get(\\\"totalSize\\\",1)-s.get(\\\"availableCapacity\\\",0); print(int(used/s.get(\\\"totalSize\\\",1)*100))' 2>/dev/null || echo 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}