There are two modes of authentication:
Entry point to retrieve an authentication token.
Authentication schema
object |
{- "security": {
- "credentials": {
- "login": "admin",
- "password": "centreon"
}
}
}
{- "contact": {
- "id": 3,
- "name": "Admin",
- "alias": "admin",
- "email": "admin@localhost",
- "is_admin": true
}, - "security": {
- "token": "9ed937d3911d212eae59300ac6977352"
}
}
{- "message": "Successful logout"
}
url required | string URL of the proxy |
port required | integer [ 0 .. 65535 ] Port of the proxy |
user required | string or null Login used to connect to proxy |
password required | string or null Password used to connect to proxy |
{- "url": "proxy.internal.company.org",
- "port": 3128,
- "user": "proxy-user",
- "password": "proxy-pass"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all monitoring servers configurations.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "is_localhost": true,
- "is_default": true,
- "ssh_port": 22,
- "gorgone_communication_type": 1,
- "gorgone_port": 5556,
- "last_restart": "2019-08-24T14:15:22Z",
- "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_use_as_proxy": true,
- "is_updated": true,
- "is_activate": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all the hosts in real-time monitoring.
The available parameters to search / sort_by are:
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "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": "2019-08-24T14:15:22Z",
- "last_hard_state_change": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "last_time_down": "2019-08-24T14:15:22Z",
- "last_time_unreachable": "2019-08-24T14:15:22Z",
- "last_time_up": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "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 |
{- "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": "2019-08-24T14:15:22Z",
- "last_hard_state_change": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "last_time_down": "2019-08-24T14:15:22Z",
- "last_time_unreachable": "2019-08-24T14:15:22Z",
- "last_time_up": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "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": "2019-08-24T14:15:22Z",
- "last_notification": "2019-08-24T14:15:22Z",
- "latency": 0.005,
- "next_check": "2019-08-24T14:15:22Z",
- "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,
- "flapping": false,
- "percent_state_change": 3.5,
- "downtimes": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "acknowledgement": {
- "host": {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
}
}
List all the services in real-time monitoring.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m",
- "hosts": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all services related to a host in real-time monitoring.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m"
}
], - "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 |
{- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m",
- "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": "2019-08-24T14:15:22Z",
- "last_notification": "2019-08-24T14:15:22Z",
- "last_time_critical": "2019-08-24T14:15:22Z",
- "last_time_ok": "2019-08-24T14:15:22Z",
- "last_time_unknown": "2019-08-24T14:15:22Z",
- "last_time_warning": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "latency": 0.031,
- "next_check": "2019-08-24T14:15:22Z",
- "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,
- "downtimes": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "acknowledgement": {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}, - "flapping": false
}
List all the host groups in real-time monitoring by host id
host_id required | integer <int64> Example: 12 ID of the host |
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 |
{- "result": [
- {
- "id": 28,
- "name": "All",
- "host": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
]
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all the host groups in real-time monitoring.
The available parameters to search / sort_by are:
show_host | boolean Default: false Example: show_host=true Allows to display hosts belonging to items |
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 28,
- "name": "All",
- "host": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
]
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return a list of service groups for host-service pair.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "id": 13,
- "name": "MySG"
}
List all the service groups in real-time monitoring.
The available parameters to search / sort_by are:
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
show_host | boolean Default: false Example: show_host=true Allows to display hosts belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 13,
- "name": "MySG"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "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
}
}
object (Disacknowledgement.Resource) | |
Array of objects[ items ] |
{- "disacknowledgement": {
- "with_services": true
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Display one acknowledgement.
acknowledgement_id required | integer <int64> Example: 227 ID of the acknowledgement |
{- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "with_services": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "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
}
}
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
host_id required | integer <int64> Example: 12 ID of the host |
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
{- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "with_services": true
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "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
}
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
{- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
object (Acknowledgement.Resource) | |
Array of objects[ items ] |
{- "acknowledgement": {
- "comment": "Acknowledged by admin",
- "with_services": true,
- "is_notify_contacts": false
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all downtimes
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Display one downtime.
downtime_id required | integer <int64> Example: 329 ID of the downtime |
{- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
List all downtimes of hosts
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
author_id | integer ID of the contact who requested the downtime |
comment | string Comment of the downtime |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "author_id": 3,
- "comment": "Downtime set by admin",
- "with_services": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all downtimes of services
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
author_id | integer ID of the contact who requested the downtime |
comment | string Comment of the downtime |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "author_id": 3,
- "comment": "Downtime set by admin",
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all downtimes of a host.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a downtime on a host.
host_id required | integer <int64> Example: 12 ID of the host |
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
author_id | integer ID of the contact who requested the downtime |
comment | string Comment of the downtime |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
{- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "author_id": 3,
- "comment": "Downtime set by admin",
- "with_services": true
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all downtimes of a service.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a downtime on a service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
author_id | integer ID of the contact who requested the downtime |
comment | string Comment of the downtime |
{- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "author_id": 3,
- "comment": "Downtime set by admin"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
object (Downtime.Resource) | |
Array of objects[ items ] |
{- "downtime": {
- "comment": "Downtime set by admin",
- "with_services": true,
- "is_fixed": true,
- "duration": 7200,
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z"
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Register a server to the platform topology
name required | string Name of the server to register in the topology |
hostname | string Platform's 'physical' name |
type required | string Enum: "central" "poller" "remote" "map" "mbi" Type of the server from available Server types :
|
address required | string Address of the server. IPv4, IPv6 or DNS |
parent_address | string It should not be added to register a Central or other platforms in specific cases: Eg : To register a remote server as top level platform on its own platform. Mandatory parameter for all other types, to be able to link a platform to its parent Example : - To link a poller to a Central - To link a remote server to a Central - To link a poller to a remote server |
{- "name": "myPoller",
- "hostname": "my.poller.physical.hostname",
- "type": "poller",
- "address": "1.1.1.2",
- "parent_address": "1.1.1.1"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "graph": {
- "label": "centreon-topology",
- "metadata": {
- "version": "1.0.0"
}, - "nodes": {
- "id": {
- "type": "central",
- "label": "Central",
- "metadata": {
- "centreon-id": "1",
- "hostname": "localhost.localdomain"
}
}
}, - "edges": [
- {
- "source": "91",
- "relation": "peer_retention",
- "target": "1"
}
]
}
}
List all icons from centreon configuration.
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "directory": "ppm",
- "name": "operatingsystems-linux-snmp-linux-128.png",
- "url": "/centreon/img/media/ppm/operatingsystems-linux-snmp-linux-128.png"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
{- "id": 1,
- "name": "Administrator",
- "alias": "admin",
- "email": "admin@localhost",
- "timezone": "Europe/Paris",
- "locale": "en_US",
- "is_admin": true,
- "use_deprecated_pages": false
}
internal
Since Centreon web 20.04.6
List user filters saved for a given page.
page_name required | string Example: events-view name of the page |
{- "result": [
- {
- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
internal
Since Centreon web 20.04.6
Add user filter for a given page.
page_name required | string Example: events-view name of the page |
name | string filter name |
criterias | Array of objects[ items ] list of filter criterias |
{- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
]
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Get detailed information of a user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Update user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
id | integer filter id |
name required | string filter name |
criterias required | Array of objects[ items ] list of filter criterias |
order | integer filter order |
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Patch user filter order for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
order required | integer filter order |
{- "order": 1
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Delete user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all the resources in real-time monitoring : hosts and services.
The available parameters to search / sort_by are:
Only for searching:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
types | Array of strings Items Enum: "service" "host" Example: types=["host"] Filter the resources by type |
states | Array of strings Items Enum: "unhandled_problems" "resources_problems" "in_downtime" "acknowledged" "all" Example: states=["in_downtime", "acknowledged"] Filter the resources by state |
statuses | Array of strings Items Enum: "OK" "UP" "WARNING" "DOWN" "CRITICAL" "UNREACHABLE" "UNKNOWN" "PENDING" Example: statuses=["OK", "UP", "PENDING"] Filter the resources by status |
hostgroup_ids | Array of integers <int64> [ items <int64> ] Example: hostgroup_ids=[13, 22, 31] Filter the resources by host group ID |
servicegroup_ids | Array of integers <int64> [ items <int64> ] Example: servicegroup_ids=[2033] Filter the resources by service group ID |
{- "result": [
- {
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "name": "Ping",
- "alias": null,
- "fqdn": null,
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/beta/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/beta/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/beta/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/beta/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D"
}, - "externals": {
}
}, - "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "parent": {
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "name": "Central",
- "alias": "Host",
- "fqdn": "127.0.0.1",
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/beta/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/beta/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/beta/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/beta/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D"
}, - "externals": {
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "icon": {
- "name": "linux",
- "url": "/img/media/topology/firewall.png"
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "in_downtime": false,
- "acknowledged": false,
- "severity_level": 1,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "active_checks": true,
- "passive_checks": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "is_forced": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "is_forced": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
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) |
{- "is_forced": true
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Schedule immediate check on chosen service
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Schedule immediate check on chosen resources
Array of objects[ items ] |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Submit a result (check status, output and perfdata) to a single host
host_id required | integer <int64> Example: 12 ID of the host |
status required | integer Enum: 0 1 2 Host status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 1,
- "output": "CRITICAL: Connection lost",
- "performance_data": "'nbproc'=0;;1:1;0;"
}
{- "code": 401,
- "message": "string"
}
Submit a result (check status, output and perfdata) to a single service
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
status required | string Enum: 0 1 2 3 Service status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
{- "code": 401,
- "message": "string"
}
Submit a result (check status, output and perfdata) to resources
required | Array of objects[ items ] |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}, - "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
]
}
{- "code": 401,
- "message": "string"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start required | string <date-time> Example: 2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end required | string <date-time> Example: 2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "global": {
- "title": "graph title",
- "start": 1594504800,
- "end": 1594591200,
- "vertical-label": "Value",
- "base": "1024",
- "width": "550",
- "height": "140",
- "lower-limit": "0",
- "scaled": 1,
- "multiple_services": false
}, - "metrics": [
- {
- "index_id": "4",
- "metric_id": "29",
- "metric": "cpu",
- "metric_legend": "cpu",
- "unit": "%",
- "hidden": 0,
- "min": "0",
- "max": "100",
- "virtual": 0,
- "ds_data": {
- "ds_min": "1",
- "ds_max": "1",
- "ds_minmax_int": null,
- "ds_last": "1",
- "ds_average": "1",
- "ds_total": null,
- "ds_tickness": "1",
- "ds_color_line_mode": "1",
- "ds_color_line": "#666600"
}, - "legend": "cpu (%)",
- "stack": 0,
- "warn": null,
- "warn_low": null,
- "crit": null,
- "crit_low": null,
- "ds_color_area_warn": "#ff9a13",
- "ds_color_area_crit": "#e00b3d",
- "ds_order": 0,
- "data": [
- 1,
- null,
- 1
], - "prints": [
- [
- "Last:1.00"
]
], - "minimum_value": 1,
- "maximum_value": 1
}
], - "times": [
- "1594505100",
- "1594505400",
- "1594505700"
]
}
Get status data from a service between given interval
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start required | string <date-time> Example: 2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end required | string <date-time> Example: 2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "critical": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "warning": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "ok": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "unknown": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
]
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start | string <date-time> Example: start=2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end | string <date-time> Example: end=2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "global": {
- "title": "graph title",
- "start": "2020-02-18T00:00:00",
- "end": "2020-02-19T00:00:00",
- "vertical-label": "Value",
- "base": "1024",
- "width": "550",
- "height": "140",
- "lower-limit": "0",
- "scaled": 1,
- "multiple_services": false
}, - "metrics": [
- {
- "index_id": "4",
- "metric_id": "29",
- "metric": "cpu",
- "metric_legend": "cpu",
- "unit": "%",
- "hidden": 0,
- "min": "0",
- "max": "100",
- "virtual": 0,
- "ds_data": {
- "ds_min": "1",
- "ds_max": "1",
- "ds_minmax_int": null,
- "ds_last": "1",
- "ds_average": "1",
- "ds_total": null,
- "ds_tickness": "1",
- "ds_color_line_mode": "1",
- "ds_color_line": "#666600"
}, - "legend": "cpu (%)",
- "stack": 0,
- "warn": null,
- "warn_low": null,
- "crit": null,
- "crit_low": null,
- "ds_color_area_warn": "#ff9a13",
- "ds_color_area_crit": "#e00b3d",
- "ds_order": 0,
- "data": [
- 1,
- null,
- 1
], - "prints": [
- [
- "Last:1.00"
]
], - "minimum_value": 1,
- "maximum_value": 1
}
], - "times": [
- "2020-02-19T00:00:00",
- "2020-02-19T00:05:00",
- "2020-02-19T00:10:00"
]
}
Get status data from a service between given interval
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start | string <date-time> Example: start=2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end | string <date-time> Example: end=2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "critical": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "warning": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "ok": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "unknown": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
]
}
List all events for a given host
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 1,
- "type": "event",
- "date": "2019-08-24T14:15:22Z",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "content": "string",
- "contact": {
- "id": 0,
- "name": "string"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "tries": 0
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all events for a given service
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
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 |
{- "result": [
- {
- "id": 1,
- "type": "event",
- "date": "2019-08-24T14:15:22Z",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "content": "string",
- "contact": {
- "id": 0,
- "name": "string"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "tries": 0
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
platformName | string The name of the platform |
isRemote | boolean Platform is a remote server |
centralServerAddress | string Central linked address |
apiUsername | string Api Username |
apiCredentials | string Api Password |
apiScheme | string Protocol |
apiPort | integer Port used by the API |
apiPath | string name of your API root folder |
peerValidation | boolean Usage of peer validation |
object |
{- "platformName": "string",
- "isRemote": true,
- "centralServerAddress": "192.168.0.1",
- "apiUsername": "admin",
- "apiCredentials": "centreon",
- "apiScheme": "http",
- "apiPort": "80",
- "apiPath": "centreon",
- "peerValidation": false,
- "proxy": {
- "host": "example.proxy.com",
- "port": 80,
- "user": "admin",
- "password": "centreon"
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}