{
  "checks": [
    {
      "name": "Hyper-V VMMS",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_service",
      "parameters": {
        "service": "vmms"
      },
      "sort_order": 0,
      "value_type": "status",
      "description": "",
      "check_config": {
        "service": "vmms"
      },
      "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": "Hyper-V Compute",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_service",
      "parameters": {
        "service": "vmcompute"
      },
      "sort_order": 1,
      "value_type": "status",
      "description": "",
      "check_config": {
        "service": "vmcompute"
      },
      "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": "VM Status",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_script",
      "parameters": {
        "script_id": "714b2273-faaa-5f99-865d-a73173662016"
      },
      "sort_order": 2,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "714b2273-faaa-5f99-865d-a73173662016"
      },
      "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": "VM Replication",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_script",
      "parameters": {
        "script_id": "f0f0d2f8-a39f-5f60-b3e7-cdc4d80bf78c"
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "f0f0d2f8-a39f-5f60-b3e7-cdc4d80bf78c"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Overview",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_overview",
      "parameters": {},
      "sort_order": 5,
      "value_type": "info",
      "description": "Live-Telemetrie (CPU, RAM, Disks, Netzwerk, Top-Prozesse, Eventlog, Benutzer) für das Command Center Dashboard.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 30,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Netzwerk-Status",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_network_state",
      "parameters": {},
      "sort_order": 6,
      "value_type": "info",
      "description": "Interfaces, Listener, Verbindungen, Routing.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Sicherheit",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_security",
      "parameters": {},
      "sort_order": 7,
      "value_type": "info",
      "description": "Defender, Firewall, TPM, BitLocker, offene Ports, Zertifikate.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 3600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Lebenszyklus",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_lifecycle",
      "parameters": {},
      "sort_order": 8,
      "value_type": "info",
      "description": "Aktivierung, Domain, Update-Historie, BSODs, Backup.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 43200,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Inventar",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_inventory",
      "parameters": {},
      "sort_order": 9,
      "value_type": "info",
      "description": "Installierte Programme, geplante Tasks, Autostart, Dienste.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 21600,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Agent Hardware",
      "auto_add": true,
      "check_mode": "agent",
      "check_type": "agent_hardware",
      "parameters": {},
      "sort_order": 10,
      "value_type": "info",
      "description": "CPU, Speicher, Mainboard, BIOS, Disks, GPUs, Akku.",
      "check_config": {},
      "is_telemetry": true,
      "interpretation": null,
      "threshold_crit": null,
      "threshold_warn": null,
      "interval_seconds": 86400,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    }
  ],
  "profile": {
    "icon": "server",
    "name": "Windows - Hyper-V Host",
    "tags": [
      "windows",
      "agent",
      "hyperv",
      "virtualization"
    ],
    "vendor": "microsoft",
    "category": "server",
    "os_family": "windows",
    "description": "Hyper-V Host: VM-Status, Replication Health.",
    "ip_required": false,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": true,
    "requires_snmp": false,
    "description_md": "Hyper-V Host: VM-Status, Replication Health.",
    "requires_agent": true,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": false
  },
  "scripts": [
    {
      "name": "Hyper-V VM Status",
      "script_id": "714b2273-faaa-5f99-865d-a73173662016",
      "is_builtin": true,
      "description": "Checks Hyper-V virtual machine running state",
      "interpreter": "powershell",
      "script_body": "$vms = Get-VM -EA SilentlyContinue\nif (-not $vms) { Write-Output \"UNKNOWN - Cannot query Hyper-V VMs\"; exit 3 }\n$off = @($vms | Where-Object { $_.State -ne 'Running' -and $_.AutomaticStartAction -ne 'Nothing' })\n$total = @($vms).Count\n$running = @($vms | Where-Object { $_.State -eq 'Running' }).Count\nif ($off.Count -gt 0) {\n    $names = ($off | ForEach-Object { $_.Name }) -join ', '\n    Write-Output \"CRITICAL - $($off.Count) VMs not running: $names | running=$running total=$total stopped=$($off.Count)\"\n    exit 2\n}\nWrite-Output \"OK - All $running/$total VMs running | running=$running total=$total stopped=0\"; exit 0",
      "expected_output": "nagios"
    },
    {
      "name": "Hyper-V Replication",
      "script_id": "f0f0d2f8-a39f-5f60-b3e7-cdc4d80bf78c",
      "is_builtin": true,
      "description": "Checks Hyper-V VM replication health",
      "interpreter": "powershell",
      "script_body": "$vms = Get-VMReplication -EA SilentlyContinue\nif (-not $vms) { Write-Output \"OK - No Hyper-V replication configured | total=0\"; exit 0 }\n$critical = @($vms | Where-Object { $_.ReplicationHealth -eq 'Critical' })\n$warning = @($vms | Where-Object { $_.ReplicationHealth -eq 'Warning' })\nif ($critical.Count -gt 0) {\n    Write-Output \"CRITICAL - $($critical.Count) VMs with critical replication | critical=$($critical.Count) warning=$($warning.Count) total=$(@($vms).Count)\"\n    exit 2\n}\nif ($warning.Count -gt 0) {\n    Write-Output \"WARNING - $($warning.Count) VMs with replication warnings | critical=0 warning=$($warning.Count) total=$(@($vms).Count)\"\n    exit 1\n}\nWrite-Output \"OK - All $(@($vms).Count) VM replications healthy | critical=0 warning=0 total=$(@($vms).Count)\"; exit 0",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}