{
  "checks": [
    {
      "name": "Asterisk peers offline (SIP/PJSIP)",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "3d5573e9-2926-5df8-a4d1-866fdef08be8",
        "value_unit": "peers",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 0,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "3d5573e9-2926-5df8-a4d1-866fdef08be8",
        "value_unit": "peers",
        "extract_value": "^(\\d+)"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 3,
      "threshold_warn": 1,
      "interval_seconds": 120,
      "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": "Asterisk Service",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "f0e14080-b8e6-53c9-9b59-bda11a7298c0",
        "match_regex": "^active$"
      },
      "sort_order": 1,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "f0e14080-b8e6-53c9-9b59-bda11a7298c0",
        "match_regex": "^active$"
      },
      "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": "Active call channels",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "b06e9599-af9e-5524-808f-ee3d1c6013ca",
        "value_unit": "calls",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 1,
      "value_type": "info",
      "description": "",
      "check_config": {
        "script_id": "b06e9599-af9e-5524-808f-ee3d1c6013ca",
        "value_unit": "calls",
        "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": "FreePBX Web",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "632c8d92-8635-52b0-870a-f80afed8ac22",
        "match_regex": "^active$"
      },
      "sort_order": 2,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "632c8d92-8635-52b0-870a-f80afed8ac22",
        "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": "SIP trunks down",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "387b21dd-714f-5013-ae56-64ce0ea90c00",
        "value_unit": "trunks",
        "extract_value": "^(\\d+)"
      },
      "sort_order": 2,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "387b21dd-714f-5013-ae56-64ce0ea90c00",
        "value_unit": "trunks",
        "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": "Asterisk service running",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "cf05a228-5636-50bb-8d2f-d6032afa3182",
        "value_unit": "up",
        "match_regex": "^0$",
        "extract_value": "^(\\d+)",
        "fail_if_match": true
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "cf05a228-5636-50bb-8d2f-d6032afa3182",
        "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
    },
    {
      "name": "MariaDB",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_script",
      "parameters": {
        "script_id": "ec73a737-2fcc-5c71-b1a9-3db084e2ff65",
        "match_regex": "^active$"
      },
      "sort_order": 3,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "script_id": "ec73a737-2fcc-5c71-b1a9-3db084e2ff65",
        "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": "HTTP WebUI",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 80
      },
      "sort_order": 4,
      "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": "SIP Port",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 5060
      },
      "sort_order": 5,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 5060
      },
      "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": "SIP TLS",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "port",
      "parameters": {
        "port": 5061
      },
      "sort_order": 6,
      "value_type": "status",
      "description": "",
      "check_config": {
        "port": 5061
      },
      "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": "CPU",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_cpu",
      "parameters": {},
      "sort_order": 7,
      "value_type": "gauge",
      "description": "",
      "check_config": {},
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 95,
      "threshold_warn": 80,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Memory",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_mem",
      "parameters": {},
      "sort_order": 8,
      "value_type": "gauge",
      "description": "",
      "check_config": {},
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 95,
      "threshold_warn": 85,
      "interval_seconds": 120,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    },
    {
      "name": "Disk /",
      "auto_add": true,
      "check_mode": "passive",
      "check_type": "ssh_disk",
      "parameters": {
        "mount": "/"
      },
      "sort_order": 9,
      "value_type": "gauge",
      "description": "",
      "check_config": {
        "mount": "/"
      },
      "is_telemetry": false,
      "interpretation": null,
      "threshold_crit": 90,
      "threshold_warn": 80,
      "interval_seconds": 300,
      "threshold_direction": "upper",
      "confirmation_attempts": 1,
      "confirmation_interval_seconds": 10
    }
  ],
  "profile": {
    "icon": "server",
    "name": "FreePBX / Asterisk",
    "tags": [
      "freepbx",
      "asterisk",
      "linux",
      "ssh",
      "pbx",
      "voip"
    ],
    "vendor": "freepbx",
    "category": "phone",
    "os_family": "linux",
    "description": "FreePBX/Asterisk PBX: SIP Trunks, Services, Disk, Ports.",
    "ip_required": true,
    "port_layout": null,
    "visual_type": null,
    "snmp_enabled": false,
    "agent_capable": false,
    "requires_snmp": false,
    "description_md": "FreePBX/Asterisk PBX: SIP Trunks, Services, Disk, Ports.",
    "requires_agent": false,
    "sysoid_patterns": null,
    "sysdescr_patterns": null,
    "requires_collector": true
  },
  "scripts": [
    {
      "name": "Asterisk peers offline (SIP/PJSIP)",
      "script_id": "3d5573e9-2926-5df8-a4d1-866fdef08be8",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "asterisk -rx 'pjsip show endpoints' 2>/dev/null | grep -cE 'Unavailable' || asterisk -rx 'sip show peers' 2>/dev/null | grep -c UNREACHABLE || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Asterisk Service",
      "script_id": "f0e14080-b8e6-53c9-9b59-bda11a7298c0",
      "is_builtin": true,
      "description": "Auto-registered from builtin profile-check 'Asterisk Service'.",
      "interpreter": "bash",
      "script_body": "systemctl is-active asterisk",
      "expected_output": "nagios"
    },
    {
      "name": "Active call channels",
      "script_id": "b06e9599-af9e-5524-808f-ee3d1c6013ca",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "asterisk -rx 'core show channels' 2>/dev/null | awk '/active channels/{print $1+0; exit}' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "FreePBX Web",
      "script_id": "632c8d92-8635-52b0-870a-f80afed8ac22",
      "is_builtin": true,
      "description": "Auto-registered from builtin profile-check 'FreePBX Web'.",
      "interpreter": "bash",
      "script_body": "systemctl is-active httpd || systemctl is-active apache2",
      "expected_output": "nagios"
    },
    {
      "name": "SIP trunks down",
      "script_id": "387b21dd-714f-5013-ae56-64ce0ea90c00",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "asterisk -rx 'pjsip show registrations' 2>/dev/null | grep -cE 'Rejected|Unauthorized|Stopped' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "Asterisk service running",
      "script_id": "cf05a228-5636-50bb-8d2f-d6032afa3182",
      "is_builtin": true,
      "description": "Auto-registered builtin SSH script.",
      "interpreter": "bash",
      "script_body": "systemctl is-active asterisk 2>/dev/null | grep -c '^active$' || echo 0",
      "expected_output": "nagios"
    },
    {
      "name": "MariaDB",
      "script_id": "ec73a737-2fcc-5c71-b1a9-3db084e2ff65",
      "is_builtin": true,
      "description": "Auto-registered from builtin profile-check 'MariaDB'.",
      "interpreter": "bash",
      "script_body": "systemctl is-active mariadb || systemctl is-active mysql",
      "expected_output": "nagios"
    }
  ],
  "schema_version": 1
}