diff --git a/doc/API/centreon-api-v2.html b/doc/API/centreon-api-v2.html index a9847080aa6..4c48240f9fc 100644 --- a/doc/API/centreon-api-v2.html +++ b/doc/API/centreon-api-v2.html @@ -376,7 +376,7 @@
OK
Forbidden
Internal Server Error
-{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "is_localhost": true,
- "is_default": true,
- "ssh_port": 22,
- "last_restart": "2020-02-25T12:20:19Z",
- "engine_start_command": "service centengine start",
- "engine_stop_command": "service centengine stop",
- "engine_restart_command": "service centengine restart",
- "engine_reload_command": "service centengine reload",
- "nagios_bin": "/usr/sbin/centengine",
- "nagiostats_bin": "/usr/sbin/centenginestats",
- "broker_reload_command": "service cbd reload",
- "centreonbroker_cfg_path": "/etc/centreon-broker",
- "centreonbroker_module_path": "/usr/share/centreon/lib/centreon-broker",
- "centreonbroker_logs_path": null,
- "centreonconnector_path": "/usr/lib64/centreon-connector",
- "init_script_centreontrapd": "centreontrapd",
- "snmp_trapd_path_conf": "/etc/snmp/centreon_traps/",
- "remote_id": null,
- "remote_server_centcore_ssh_proxy": true,
- "is_updated": true,
- "is_activate": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "is_localhost": true,
- "is_default": true,
- "ssh_port": 22,
- "last_restart": "2020-02-28T09:16:16Z",
- "engine_start_command": "service centengine start",
- "engine_stop_command": "service centengine stop",
- "engine_restart_command": "service centengine restart",
- "engine_reload_command": "service centengine reload",
- "nagios_bin": "/usr/sbin/centengine",
- "nagiostats_bin": "/usr/sbin/centenginestats",
- "broker_reload_command": "service cbd reload",
- "centreonbroker_cfg_path": "/etc/centreon-broker",
- "centreonbroker_module_path": "/usr/share/centreon/lib/centreon-broker",
- "centreonbroker_logs_path": null,
- "centreonconnector_path": "/usr/lib64/centreon-connector",
- "init_script_centreontrapd": "centreontrapd",
- "snmp_trapd_path_conf": "/etc/snmp/centreon_traps/",
- "remote_id": null,
- "remote_server_centcore_ssh_proxy": true,
- "is_updated": true,
- "is_activate": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
OK
Forbidden
Internal Server Error
-{- "result": [
- {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2020-02-25T12:20:19Z",
- "last_hard_state_change": "2020-02-25T12:20:19Z",
- "last_state_change": "2020-02-25T12:20:19Z",
- "last_time_down": "2020-02-25T12:20:19Z",
- "last_time_unreachable": "2020-02-25T12:20:19Z",
- "last_time_up": "2020-02-25T12:20:19Z",
- "last_update": "2020-02-25T12:20:19Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2020-02-28T09:16:16Z",
- "last_hard_state_change": "2020-02-28T09:16:16Z",
- "last_state_change": "2020-02-28T09:16:16Z",
- "last_time_down": "2020-02-28T09:16:16Z",
- "last_time_unreachable": "2020-02-28T09:16:16Z",
- "last_time_up": "2020-02-28T09:16:16Z",
- "last_update": "2020-02-28T09:16:16Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return a single host with full details and some details about its services.
host_id required | integer <int64> Example: 12 ID of the host |
OK
Forbidden
Not Found
Internal Server Error
-{- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2020-02-25T12:20:19Z",
- "last_hard_state_change": "2020-02-25T12:20:19Z",
- "last_state_change": "2020-02-25T12:20:19Z",
- "last_time_down": "2020-02-25T12:20:19Z",
- "last_time_unreachable": "2020-02-25T12:20:19Z",
- "last_time_up": "2020-02-25T12:20:19Z",
- "last_update": "2020-02-25T12:20:19Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10,
- "active_checks": true,
- "check_command": "base_host_alive",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "last_hard_state": "2020-02-25T12:20:19Z",
- "last_notification": "2020-02-25T12:20:19Z",
- "latency": 0.005,
- "next_check": "2020-02-25T12:20:19Z",
- "next_host_notification": 0,
- "notification_interval": 30,
- "notification_number": 3,
- "notify": true,
- "notify_on_down": true,
- "notify_on_downtime": false,
- "notify_on_flapping": false,
- "notify_on_recovery": true,
- "notify_on_unreachable": false
}
{- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2020-02-28T09:16:16Z",
- "last_hard_state_change": "2020-02-28T09:16:16Z",
- "last_state_change": "2020-02-28T09:16:16Z",
- "last_time_down": "2020-02-28T09:16:16Z",
- "last_time_unreachable": "2020-02-28T09:16:16Z",
- "last_time_up": "2020-02-28T09:16:16Z",
- "last_update": "2020-02-28T09:16:16Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10,
- "active_checks": true,
- "check_command": "base_host_alive",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "last_hard_state": "2020-02-28T09:16:16Z",
- "last_notification": "2020-02-28T09:16:16Z",
- "latency": 0.005,
- "next_check": "2020-02-28T09:16:16Z",
- "next_host_notification": 0,
- "notification_interval": 30,
- "notification_number": 3,
- "notify": true,
- "notify_on_down": true,
- "notify_on_downtime": false,
- "notify_on_flapping": false,
- "notify_on_recovery": true,
- "notify_on_unreachable": false
}
OK
Forbidden
Internal Server Error
-{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-25T12:20:19Z",
- "last_state_change": "2020-02-25T12:20:19Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "hosts": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-28T09:16:16Z",
- "last_state_change": "2020-02-28T09:16:16Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "hosts": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-25T12:20:19Z",
- "last_state_change": "2020-02-25T12:20:19Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-28T09:16:16Z",
- "last_state_change": "2020-02-28T09:16:16Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return a single service with full details.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
OK
Forbidden
Not Found
Internal Server Error
-{- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-25T12:20:19Z",
- "last_state_change": "2020-02-25T12:20:19Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "check_command": "base_centreon_ping",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
- "execution_time": 0.179335,
- "is_acknowledged": false,
- "is_active_check": true,
- "is_checked": true,
- "last_hard_state_change": "2020-02-25T12:20:19Z",
- "last_notification": "2020-02-25T12:20:19Z",
- "last_time_critical": "2020-02-25T12:20:19Z",
- "last_time_ok": "2020-02-25T12:20:19Z",
- "last_time_unknown": "2020-02-25T12:20:19Z",
- "last_time_warning": "2020-02-25T12:20:19Z",
- "last_update": "2020-02-25T12:20:19Z",
- "latency": 0.031,
- "next_check": "2020-02-25T12:20:19Z",
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "scheduled_downtime_depth": 0
}
{- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2020-02-28T09:16:16Z",
- "last_state_change": "2020-02-28T09:16:16Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "check_command": "base_centreon_ping",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
- "execution_time": 0.179335,
- "is_acknowledged": false,
- "is_active_check": true,
- "is_checked": true,
- "last_hard_state_change": "2020-02-28T09:16:16Z",
- "last_notification": "2020-02-28T09:16:16Z",
- "last_time_critical": "2020-02-28T09:16:16Z",
- "last_time_ok": "2020-02-28T09:16:16Z",
- "last_time_unknown": "2020-02-28T09:16:16Z",
- "last_time_warning": "2020-02-28T09:16:16Z",
- "last_update": "2020-02-28T09:16:16Z",
- "latency": 0.031,
- "next_check": "2020-02-28T09:16:16Z",
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "scheduled_downtime_depth": 0
}
List all the host groups in real-time monitoring by host id
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties @@ -521,27 +521,27 @@ |
OK
Forbidden
Internal Server Error
-{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "comment": "Acknowledged by admin",
- "deletion_time": "2020-02-25T12:20:19Z",
- "entry_time": "2020-02-25T12:20:19Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "comment": "Acknowledged by admin",
- "deletion_time": "2020-02-28T09:16:16Z",
- "entry_time": "2020-02-28T09:16:16Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Display one acknowledgement.
acknowledgement_id required | integer <int64> Example: 227 ID of the acknowledgement |
OK
Forbidden
Not Found
Internal Server Error
-{- "id": 34,
- "author_id": 3,
- "comment": "Acknowledged by admin",
- "deletion_time": "2020-02-25T12:20:19Z",
- "entry_time": "2020-02-25T12:20:19Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
OK
Forbidden
Internal Server Error
-{- "result": [
- {
- "type": "service",
- "id": 12,
- "name": "Ping",
- "details_url": "/monitoring/host/12/service/12",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "parent": {
- "id": 12,
- "name": "Central",
- "details_url": "/monitoring/host/12",
- "icon": {
- "name": "linux",
- "url": "/media/linux.png"
}
}, - "status": {
- "code": 0,
- "name": "UP"
}, - "in_downtime": false,
- "acknowledged": false,
- "severity": {
- "id": 12,
- "name": "severity 1",
- "url": "/media/severity1.png"
}, - "impacted_resources_count": 4,
- "chart_url": "/monitoring/chart/host/1/service/2",
- "last_status_change": "2020-02-25T12:20:19Z",
- "tries": "3/3 (H)",
- "last_check": "2020-02-25T12:20:19Z",
- "information": "OK - Ping is ok"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "result": [
- {
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "name": "Ping",
- "details_url": "/monitoring/host/12/service/12",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "parent": {
- "id": 12,
- "name": "Central",
- "details_url": "/monitoring/host/12",
- "status": {
- "code": 0,
- "name": "UP"
}, - "icon": {
- "name": "linux",
- "url": "/img/media/topology/firewall.png"
}
}, - "status": {
- "code": 0,
- "name": "UP"
}, - "in_downtime": false,
- "downtime_endpoint": null,
- "acknowledged": false,
- "acknowledgement_endpoint": null,
- "severity": {
- "id": 12,
- "level": 1,
- "name": "severity 1",
- "url": "/img/media/severity1.png"
}, - "impacted_resources_count": 4,
- "chart_url": "/monitoring/chart/host/1/service/2",
- "duration": "2h 3m",
- "last_status_change": "2020-02-28T09:16:17Z",
- "tries": "3/3 (H)",
- "last_check": "2020-02-28T09:16:17Z",
- "information": "OK - Ping is ok"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Schedule immediate check on chosen host
host_id required | integer <int64> Example: 12 ID of the host |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
Command Sent
@@ -803,7 +803,7 @@Internal Server Error
{- "critical": [
- {
- "start": 1581987121,
- "end": 1581987181
}
], - "warning": [
- {
- "start": 1581987121,
- "end": 1581987181
}
], - "ok": [
- {
- "start": 1581987121,
- "end": 1581987181
}
], - "unknown": [
- {
- "start": 1581987121,
- "end": 1581987181
}
]
}