{
  "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": "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": "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": "SMB Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 445
      },
      "sort_order": 3,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 445
      },
      "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": "SSH Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 22
      },
      "sort_order": 4,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 22
      },
      "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": "Array 1 Status",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.2.1",
        "unit": "enum"
      },
      "sort_order": 5,
      "value_type": "status",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.2.1",
        "unit": "enum"
      },
      "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": "Array 1 Capacity",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.3.1",
        "unit": "bytes"
      },
      "sort_order": 6,
      "value_type": "info",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.3.1",
        "unit": "bytes"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 86400,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Array 1 Used",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.4.1",
        "unit": "bytes"
      },
      "sort_order": 7,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.3.1.4.1",
        "unit": "bytes"
      },
      "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": "Disk 1 Status",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.2.1",
        "unit": "enum"
      },
      "sort_order": 7,
      "value_type": "status",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.2.1",
        "unit": "enum"
      },
      "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": "Disk 1 SMART",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.5.1",
        "unit": "enum"
      },
      "sort_order": 8,
      "value_type": "status",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.5.1",
        "unit": "enum"
      },
      "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": "SMART Disks failed (count)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "5e98d9f9-313a-5357-8435-faee30c8b319",
        "value_unit": "disks",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 8,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "5e98d9f9-313a-5357-8435-faee30c8b319",
        "value_unit": "disks",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 1,
      "threshold_warn": 1,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Disk temperature max (°C)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "1572efe5-6a07-56d5-ade9-f8622dcae6df",
        "value_unit": "°C",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 9,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "1572efe5-6a07-56d5-ade9-f8622dcae6df",
        "value_unit": "°C",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 55,
      "threshold_warn": 45,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Disk 1 Reallocated Sectors",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.6.1",
        "unit": "count"
      },
      "sort_order": 9,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.6.1",
        "unit": "count"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 10,
      "threshold_warn": 1,
      "interval_seconds": 3600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Disk 2 Status",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.2.2",
        "unit": "enum"
      },
      "sort_order": 10,
      "value_type": "status",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.2.2",
        "unit": "enum"
      },
      "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": "Disk power-on hours max (years)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "f66b2035-d095-5a20-997a-ba9d3a61f4ec",
        "value_unit": "years",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 10,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "f66b2035-d095-5a20-997a-ba9d3a61f4ec",
        "value_unit": "years",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 8,
      "threshold_warn": 5,
      "interval_seconds": 86400,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Volume usage max (%)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "42758c46-17dd-5965-a028-7308977cc784",
        "value_unit": "%",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 11,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "42758c46-17dd-5965-a028-7308977cc784",
        "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": "Disk 2 SMART",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.5.2",
        "unit": "enum"
      },
      "sort_order": 11,
      "value_type": "status",
      "description": "",
      "check_config": {
        "oid": "1.3.6.1.4.1.5227.27.1.2.1.5.2",
        "unit": "enum"
      },
      "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": "mdraid degraded arrays",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "61aaaecf-8896-56d1-af0e-300eee437507",
        "value_unit": "arrays",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 12,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "61aaaecf-8896-56d1-af0e-300eee437507",
        "value_unit": "arrays",
        "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": "SNMP Uptime",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "snmp_oid",
      "parameters": {
        "oid": "1.3.6.1.2.1.1.3.0",
        "unit": "ticks"
      },
      "sort_order": 13,
      "value_type": "duration",
      "description": "",
      "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
    }
  ],
  "profile": {
    "icon": "hard-drive",
    "name": "Buffalo TeraStation",
    "tags": [],
    "vendor": "buffalo",
    "category": "nas",
    "os_family": null,
    "description": "",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": true,
    "agent_capable": false,
    "requires_snmp": true,
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "NAS — SMART disks failed (count)",
      "script_id": "5e98d9f9-313a-5357-8435-faee30c8b319",
      "is_builtin": true,
      "description": "Loops over `smartctl --scan` on a Linux/BSD NAS and counts disks whose SMART health is not PASSED. Used as worst-of-all aggregate.",
      "interpreter": "bash",
      "script_body": "smartctl --scan 2>/dev/null | awk '/\\/dev\\//{print $1}' | head -32 | xargs -r -I{} sh -c 'smartctl -H {} 2>/dev/null | grep -q PASSED || echo F' | grep -c F | head -1",
      "expected_output": "nagios"
    },
    {
      "name": "NAS — Disk temperature max (°C)",
      "script_id": "1572efe5-6a07-56d5-ade9-f8622dcae6df",
      "is_builtin": true,
      "description": "Max temperature reading across all SMART-capable disks via smartctl -A.",
      "interpreter": "bash",
      "script_body": "for d in $(smartctl --scan 2>/dev/null | awk '/\\/dev\\//{print $1}' | head -32); do smartctl -A $d 2>/dev/null | awk '/Temperature_Celsius|Airflow_Temperature_Cel|Current_Drive_Temperature/{print $10+0; exit}'; done | sort -n | tail -1",
      "expected_output": "nagios"
    },
    {
      "name": "NAS — Disk power-on hours max (years)",
      "script_id": "f66b2035-d095-5a20-997a-ba9d3a61f4ec",
      "is_builtin": true,
      "description": "Lifetime indicator: max power-on hours / 8760 across all disks.",
      "interpreter": "bash",
      "script_body": "for d in $(smartctl --scan 2>/dev/null | awk '/\\/dev\\//{print $1}' | head -32); do smartctl -A $d 2>/dev/null | awk '/Power_On_Hours/{print int($10/8760); exit}'; done | sort -n | tail -1",
      "expected_output": "nagios"
    },
    {
      "name": "NAS — Volume usage max (%)",
      "script_id": "42758c46-17dd-5965-a028-7308977cc784",
      "is_builtin": true,
      "description": "Worst-of-all mountpoint usage from df.",
      "interpreter": "bash",
      "script_body": "df -P 2>/dev/null | awk '/^\\/dev/{gsub(/%/,\\\"\\\",$5); print $5+0}' | sort -n | tail -1",
      "expected_output": "nagios"
    },
    {
      "name": "NAS — mdraid degraded arrays",
      "script_id": "61aaaecf-8896-56d1-af0e-300eee437507",
      "is_builtin": true,
      "description": "Count of arrays in /proc/mdstat with at least one underscore in [UUU_] (missing disk).",
      "interpreter": "bash",
      "script_body": "grep -oE '\\[[U_]+\\]' /proc/mdstat 2>/dev/null | grep -c '_' || echo 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}