Seitenhierarchie
Zum Ende der Metadaten springen
Zum Anfang der Metadaten


1. Hole eine Servicetemplategruppe per ID

URL: https://123.123.123.123/servicetemplategroups/$ID.json

Methode: GET

Antwort: JSON


Antwort auf erfolgreiche API Abfrage
{
    "servicetemplategroup": {
        "Servicetemplategroup": {
            "id": "1",
            "uuid": "174d4dd8-7d09-450e-b368-90a0ff4e0a75",
            "container_id": "2",
            "description": "default servicetemplate group",
            "created": "2015-09-04 14:24:18",
            "modified": "2015-09-04 14:24:18"
        },
        "Container": {
            "id": "2",
            "containertype_id": "9",
            "name": "default",
            "parent_id": "1",
            "lft": "2",
            "rght": "3"
        },
        "Servicetemplate": [
            {
                "id": "3",
                "uuid": "cd5f7e0a-3682-4734-806d-455f1b296888",
                "name": "CHECK_BY_SSH",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Execute a command on a remote host",
                "command_id": "23",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "900",
                "retry_interval": "300",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:47:34",
                "modified": "2015-01-15 23:47:34",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "1",
                    "servicetemplate_id": "3",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "4",
                "uuid": "eec01955-9aee-4763-b205-f3021480eee5",
                "name": "CHECK_DHCP",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "0",
                "description": "Check if DHCP server returns the right IP address",
                "command_id": "5",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "0",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:49:21",
                "modified": "2015-01-15 23:49:21",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "2",
                    "servicetemplate_id": "4",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "5",
                "uuid": "632cbb02-4046-4406-8bcc-4cfe0befbc0c",
                "name": "CHECK_FTP",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Test a FTP connection for given host",
                "command_id": "6",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:50:41",
                "modified": "2015-01-15 23:50:41",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "3",
                    "servicetemplate_id": "5",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "6",
                "uuid": "b987e6c0-135d-4034-987a-18c65b111fae",
                "name": "CHECK_HTTP",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "0",
                "description": "Send request to an HTTP server",
                "command_id": "7",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "0",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:51:53",
                "modified": "2015-01-15 23:51:53",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "4",
                    "servicetemplate_id": "6",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "7",
                "uuid": "b12e5fcd-eccc-43f9-8c84-921329e56c92",
                "name": "CHECK_HTTPS",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Send request to an HTTPS server",
                "command_id": "7",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:52:49",
                "modified": "2015-01-15 23:52:49",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "5",
                    "servicetemplate_id": "7",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "8",
                "uuid": "354c1e0e-bd09-48e0-bbbe-eb98a4059454",
                "name": "CHECK_LOCAL_DISK",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Checks a local disk of the openITCOCKPIT Server",
                "command_id": "17",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "1800",
                "retry_interval": "300",
                "max_check_attempts": "2",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:55:07",
                "modified": "2015-01-15 23:55:07",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "6",
                    "servicetemplate_id": "8",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "9",
                "uuid": "c673cc09-c46a-4916-8e42-85cb0e68f1e6",
                "name": "CHECK_LOCAL_LOAD",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Checks the CPU load of the openITCOCKPIT Server",
                "command_id": "19",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:56:25",
                "modified": "2015-01-15 23:56:25",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "7",
                    "servicetemplate_id": "9",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "10",
                "uuid": "90aefb61-c818-4bd6-818c-c9e6174b3e13",
                "name": "CHECK_LOCAL_MAILQ",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Checks the mailq of the openITCOCKPIT Server",
                "command_id": "20",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "900",
                "retry_interval": "300",
                "max_check_attempts": "2",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-15 23:57:39",
                "modified": "2015-01-15 23:57:39",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "8",
                    "servicetemplate_id": "10",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "11",
                "uuid": "91bc9075-64b2-4054-a39d-c2981cd6bd01",
                "name": "CHECK_LOCAL_PROC",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Check if a process is running on openITCOCKPIT server",
                "command_id": "21",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "120",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-16 00:01:26",
                "modified": "2015-01-16 00:01:26",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "9",
                    "servicetemplate_id": "11",
                    "servicetemplategroup_id": "1"
                }
            },
            {
                "id": "12",
                "uuid": "b7e5c7a7-ed33-465f-ab8e-45059cb679fe",
                "name": "CHECK_LOCAL_PROCS_TOTAL",
                "container_id": "1",
                "servicetemplatetype_id": "1",
                "check_period_id": "1",
                "notify_period_id": "1",
                "description": "Checks how many processes are running on openITCOCKPIT Server",
                "command_id": "22",
                "check_command_args": "",
                "checkcommand_info": "",
                "eventhandler_command_id": "0",
                "timeperiod_id": "0",
                "check_interval": "300",
                "retry_interval": "90",
                "max_check_attempts": "3",
                "first_notification_delay": "0",
                "notification_interval": "7200",
                "notify_on_warning": "0",
                "notify_on_unknown": "0",
                "notify_on_critical": "1",
                "notify_on_recovery": true,
                "notify_on_flapping": "0",
                "notify_on_downtime": "0",
                "flap_detection_enabled": "0",
                "flap_detection_on_ok": "0",
                "flap_detection_on_warning": "0",
                "flap_detection_on_unknown": "0",
                "flap_detection_on_critical": false,
                "low_flap_threshold": "0",
                "high_flap_threshold": "0",
                "process_performance_data": "1",
                "freshness_checks_enabled": "0",
                "freshness_threshold": null,
                "passive_checks_enabled": "0",
                "event_handler_enabled": "0",
                "active_checks_enabled": "1",
                "retain_status_information": "0",
                "retain_nonstatus_information": "0",
                "notifications_enabled": "0",
                "notes": "",
                "priority": "1",
                "tags": "",
                "service_url": null,
                "is_volatile": false,
                "check_freshness": false,
                "created": "2015-01-16 00:03:20",
                "modified": "2015-01-16 00:03:20",
                "ServicetemplatesToServicetemplategroup": {
                    "id": "10",
                    "servicetemplate_id": "12",
                    "servicetemplategroup_id": "1"
                }
            }
        ]
    }
}


2. Hole alle existierenden Servicetemplategruppen

URL: https://123.123.123.123/servicetemplategroups.json

Methode: GET

Antwort: JSON


Antwort auf erfolgreiche API Abfrage
{
    "all_servicetemplategroups": [
        {
            "Servicetemplategroup": {
                "id": "1",
                "uuid": "174d4dd8-7d09-450e-b368-90a0ff4e0a75",
                "container_id": "2",
                "description": "default servicetemplate group",
                "created": "2015-09-04 14:24:18",
                "modified": "2015-09-04 14:24:18"
            },
            "Container": {
                "id": "2",
                "containertype_id": "9",
                "name": "default",
                "parent_id": "1",
                "lft": "2",
                "rght": "3"
            }
        }
    ]
}
  • Keine Stichwörter