There are two modes of authentication:
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 | string 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 (Monitoring.Resource.Action) |
{- "disacknowledgement": {
- "with_services": true
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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": 400,
- "message": "Property 'name' not found"
}
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 | string 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": 400,
- "message": "Property 'name' not found"
}
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 | string 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": 400,
- "message": "Property 'name' not found"
}
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 | string 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": 400,
- "message": "Property 'name' not found"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "code": 400,
- "message": "Property 'name' not found"
}
meta_id required | integer <int64> Example: 1 ID of the meta 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 | string 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
}
}
meta_id required | integer <int64> Example: 1 ID of the meta 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": 400,
- "message": "Property 'name' not found"
}
object (Acknowledgement.Resource) | |
Array of objects (Monitoring.Resource.Action) |
{- "acknowledgement": {
- "comment": "Acknowledged by admin",
- "with_services": true,
- "is_notify_contacts": false,
- "is_persistent_comment": false,
- "is_sticky": false,
- "force_active_checks": false
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
{- "password_security_policy": {
- "password_min_length": 12,
- "has_uppercase": true,
- "has_lowercase": true,
- "has_number": true,
- "has_special_character": true,
- "attempts": 5,
- "blocking_duration": 900,
- "password_expiration": {
- "expiration_delay": 15552000,
- "excluded_users": [
- "admin"
]
}, - "can_reuse_passwords": false,
- "delay_before_new_password": 3600
}
}
required | object |
{- "password_security_policy": {
- "password_min_length": 12,
- "has_uppercase": true,
- "has_lowercase": true,
- "has_number": true,
- "has_special_character": true,
- "attempts": 5,
- "blocking_duration": 900,
- "password_expiration": {
- "expiration_delay": 15552000,
- "excluded_users": [
- "admin"
]
}, - "can_reuse_passwords": false,
- "delay_before_new_password": 3600
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "authorization_endpoint": "/authorize",
- "token_endpoint": "/token",
- "introspection_token_endpoint": "/introspect",
- "userinfo_endpoint": "/userinfo",
- "endsession_endpoint": "/logout",
- "connection_scopes": [
- "openid"
], - "login_claim": "sub",
- "client_id": "client_id",
- "client_secret": "client_secret",
- "authentication_type": "client_secret_post",
- "verify_peer": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "group_value": "group1",
- "contact_group": {
- "id": 1,
- "name": "cg1"
}
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "claim_value": "scope",
- "access_group": {
- "id": 1,
- "name": "Default"
}
}
]
}
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
base_url required | string or null Base URL of the provider |
authorization_endpoint required | string or null Authorization endpoint of the provider |
token_endpoint required | string or null Token endpoint of the provider |
introspection_token_endpoint required | string or null Introspection token endpoint of the provider |
userinfo_endpoint required | string or null Userinfo endpoint of the provider |
endsession_endpoint required | string or null Endsession endpoint of the provider |
connection_scopes required | Array of strings List of scopes to request |
login_claim required | string or null Claim used to login |
client_id required | string or null Client ID |
client_secret required | string or null Client secret |
authentication_type required | string or null Enum: "client_secret_post" "client_secret_basic" Authentication type |
verify_peer required | boolean Verify peer |
auto_import required | boolean Auto import user from external provider |
required | object or null |
email_bind_attribute required | string or null Email bind attribute |
fullname_bind_attribute required | string or null Fullname bind attribute |
redirect_url required | string or null custom redirect url |
object | |
object | |
object |
{- "is_active": true,
- "is_forced": false,
- "authorization_endpoint": "/authorize",
- "token_endpoint": "/token",
- "introspection_token_endpoint": "/introspect",
- "userinfo_endpoint": "/userinfo",
- "endsession_endpoint": "/logout",
- "connection_scopes": [
- "openid"
], - "login_claim": "sub",
- "client_id": "client_id",
- "client_secret": "client_secret",
- "authentication_type": "client_secret_post",
- "verify_peer": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "group_value": "group1",
- "contact_group_id": 1
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "access_group_id": 1
}
]
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
is_active | boolean Indicates whether the provider is active or not |
is_forced | boolean Indicates whether the provider is forced or not |
base_url | string or null Base URL of the provider |
authorization_endpoint | string or null Authorization endpoint of the provider |
token_endpoint | string or null Token endpoint of the provider |
introspection_token_endpoint | string or null Introspection token endpoint of the provider |
userinfo_endpoint | string or null Userinfo endpoint of the provider |
endsession_endpoint | string or null Endsession endpoint of the provider |
connection_scopes | Array of strings List of scopes to request |
login_claim | string or null Claim used to login |
client_id | string or null Client ID |
client_secret | string or null Client secret |
authentication_type | string or null Enum: "client_secret_post" "client_secret_basic" Authentication type |
verify_peer | boolean Verify peer |
auto_import | boolean Auto import user from external provider |
object or null | |
email_bind_attribute | string or null Email bind attribute |
fullname_bind_attribute | string or null Fullname bind attribute |
redirect_url | string or null custom redirect url |
object | |
object | |
object |
{- "is_active": true,
- "is_forced": false,
- "authorization_endpoint": "/authorize",
- "token_endpoint": "/token",
- "introspection_token_endpoint": "/introspect",
- "userinfo_endpoint": "/userinfo",
- "endsession_endpoint": "/logout",
- "connection_scopes": [
- "openid"
], - "login_claim": "sub",
- "client_id": "client_id",
- "client_secret": "client_secret",
- "authentication_type": "client_secret_post",
- "verify_peer": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "group_value": "group1",
- "contact_group_id": 1
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "access_group_id": 1
}
]
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "certificate": "string",
- "user_id_attribute": "string",
- "logout_from": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "relations": [
- {
- "group_value": "group1",
- "contact_group": {
- "id": 1,
- "name": "cg1"
}
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group": {
- "id": 1,
- "name": "Default"
}
}
]
}
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
remote_login_url required | string Indicates the remote login URL |
entity_id_url required | string Indicates the issuer URL |
certificate required | string IDP certificate |
user_id_attribute required | string |
logout_from required | boolean Logout |
logout_from_url | string or null Indicates the logout URL |
auto_import | boolean Auto import user from external provider |
required | object or null |
email_bind_attribute required | string or null Email bind attribute |
fullname_bind_attribute required | string or null Fullname bind attribute |
object | |
object | |
object |
{- "is_active": true,
- "is_forced": false,
- "certificate": "string",
- "user_id_attribute": "string",
- "logout_from": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "relations": [
- {
- "group_value": "group1",
- "contact_group_id": 1
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group_id": 1
}
]
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "login_header_attribute": "HTTP_AUTH_USER",
- "pattern_matching_login": "/@.*/",
- "pattern_replace_login": "/@.*/"
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
trusted_client_addresses required | Array of strings List of trusted client addresses |
blacklist_client_addresses required | Array of strings List of blacklisted client addresses |
login_header_attribute required | string or null Header used to retrieve user's login |
pattern_matching_login required | string or null Pattern to search for in the login header attribute name |
pattern_replace_login required | string or null String that will replace the string defined in the Pattern match login (regex) field |
{- "is_active": true,
- "is_forced": false,
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "login_header_attribute": "HTTP_AUTH_USER",
- "pattern_matching_login": "/@.*/",
- "pattern_replace_login": "/@.*/"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "monitoring_default_downtime_duration": 3600,
- "monitoring_default_refresh_interval": 15,
- "monitoring_default_acknowledgement_persistent": true,
- "monitoring_default_acknowledgement_sticky": true,
- "monitoring_default_acknowledgement_notify": true,
- "monitoring_default_acknowledgement_force_active_checks": true,
- "monitoring_default_acknowledgement_with_services": true,
- "monitoring_default_downtime_fixed": true,
- "monitoring_default_downtime_with_services": true
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
name required | string Vault configuration name |
address required | string Vault URL or IP |
port required | integer Vault Port |
root_path required | string Vault root storage path |
role_id required | string Vault role id |
secret_id required | string Vault secret id |
{- "name": "centreon_vault",
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string",
- "secret_id": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
{- "result": [
- {
- "id": 1,
- "name": "centreon_vault",
- "vault_id": 1,
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
address required | string Vault URL or IP |
port required | integer Vault Port |
role_id required | string Vault role id |
secret_id required | string Vault secret id |
{- "address": "127.0.0.1",
- "port": 8200,
- "role_id": "string",
- "secret_id": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
{- "id": 1,
- "name": "centreon_vault",
- "vault_id": 1,
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string"
}
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.com",
- "is_admin": true
}, - "security": {
- "token": "9ed937d3911d212eae59300ac6977352"
}
}
alias required | string Alias of the user |
old_password | string Old user password |
new_password | string New user password |
{- "old_password": "Centreon!2021",
- "new_password": "Centreon!2022"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Endpoint to list active existing providers configuration
[- {
- "id": 1,
- "type": "local",
- "name": "local",
- "authentication_uri": "/centreon/authentication/providers/configurations/local",
- "is_active": true,
- "is_forced": false
}
]
provider_configuration_name required | string Example: local |
login | string |
password | string |
{- "login": "admin",
- "password": "centreon"
}
{- "redirect_uri": "/centreon/main.php?p=50113&o=ldap"
}
Return all command configurations.
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "check_host_alive",
- "type": 2,
- "command_line": "string",
- "is_shell": true,
- "is_locked": false,
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a command configuration
name required | string Command name |
type required | integer Indicates the type of command
|
command_line required | string Command line to be executed by the poller |
is_shell | boolean Is required if your command requires shell features like pipes, redirections, globbing etc. If you are using the monitoring engine this option cannot be disabled. Note that commands that require shell features are slowing down the poller server. |
argument_example | string or null Example of command argument values |
Array of objects descriptions of arguments used in the command line | |
Array of objects descriptions of macros used in the command line | |
connector_id | integer or null A connector is run in the background and executes specific commands without the need to execute a binary. |
graph_template_id | integer or null Graph template for the command |
{- "name": "check_host_alive",
- "type": 2,
- "command_line": "string",
- "is_shell": true,
- "argument_example": "!80!90",
- "arguments": [
- {
- "name": "argument-name",
- "description": "argument-description"
}
], - "macros": [
- {
- "name": "macro-name",
- "type": 1,
- "description": "macro-description"
}
], - "connector_id": 0,
- "graph_template_id": 0
}
{- "id": 1,
- "name": "check_host_alive",
- "type": 2,
- "command_line": "string",
- "is_shell": true,
- "is_locked": false,
- "is_activated": true,
- "argument_example": "!80!90",
- "arguments": [
- {
- "name": "argument-name",
- "description": "argument-description"
}
], - "macros": [
- {
- "name": "macro-name",
- "type": 1,
- "description": "macro-description"
}
], - "connector": {
- "id": 12,
- "name": "SSH Connector"
}, - "graph_template": {
- "id": 8,
- "name": "Default_Graph"
}
}
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 | string 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 | string 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 |
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,
- "comment": "Downtime set by admin",
- "with_services": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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 |
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,
- "comment": "Downtime set by admin",
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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 |
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,
- "comment": "Downtime set by admin",
- "with_services": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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 |
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,
- "comment": "Downtime set by admin"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all downtimes of a service.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta 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 | string 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 metaservice.
meta_id required | integer <int64> Example: 1 ID of the meta 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 |
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,
- "comment": "Downtime set by admin"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
object (Downtime.Resource) | |
Array of objects (Monitoring.Resource.Action) |
{- "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": 400,
- "message": "Property 'name' not found"
}
Partially update a host configuration.
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
host_id required | integer >= 1 Example: 1 Host ID |
monitoring_server_id | integer ID of the host's monitoring server |
name | string Host name |
address | string IP or domain of the host |
alias | string Host alias |
snmp_community | string or null Community of the SNMP agent |
snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
geo_coords | string or null Geographic coordinates of the host |
timezone_id | integer or null Timezone ID |
severity_id | integer or null Severity ID |
check_command_id | integer or null Check command ID. Must be of type 'Check'. |
check_command_args | Array of strings Check command arguments |
check_timeperiod_id | integer or null Check command timeperiod ID |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
notification_enabled | integer Specify whether notifications for this host are enabled or not
|
notification_options | integer or null Define the states of the host for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about alerts for this host - only one alert notification will be sent out. |
notification_timeperiod_id | integer or null Notification timeperiod ID |
add_inherited_contact_group | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
add_inherited_contact | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first alert notification when this host enters a non-UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this host. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this host. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this host |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this host |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null Event handler command ID |
event_handler_command_args | Array of strings Event handler command arguments |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
note | string or null <= 65535 characters Define an optional note. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
icon_id | integer or null Define the ID of the image that should be associated with this host |
icon_alternative | string or null <= 200 characters Define an optional string that is used as alternative description for the icon |
comment | string or null Host comments |
is_activated | boolean Indicates whether the host is activated or not |
categories | Array of integers Define the host category IDs that should be associated with this host |
groups | Array of integers Define the host group IDs that should be associated with this host |
templates | Array of integers Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "monitoring_server_id": 0,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "is_activated": true,
- "categories": [
- 1,
- 15,
- 8
], - "groups": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Return all host configurations.
The available parameters to search / sort_by are:
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "Centreon-Server",
- "alias": "",
- "address": "127.0.0.1",
- "monitoring_server": {
- "id": 1,
- "name": "Central"
}, - "templates": [
- {
- "id": 2,
- "name": "generic-host"
}
], - "normal_check_interval": 5,
- "retry_check_interval": 1,
- "notification_timeperiod": {
- "id": 1,
- "name": "24x7"
}, - "check_timeperiod": {
- "id": 1,
- "name": "24x7"
}, - "severity": {
- "id": 1,
- "name": "Priority 1"
}, - "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "host-group-name"
}
], - "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host configuration
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
monitoring_server_id required | integer ID of the host's monitoring server |
name required | string Host template name |
address required | string IP or domain of the host |
alias | string Host template alias |
snmp_community | string or null Community of the SNMP agent |
snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
geo_coords | string or null Geographic coordinates of the host |
timezone_id | integer or null Timezone ID |
severity_id | integer or null Severity ID |
check_command_id | integer or null Check command ID. Must be of type 'Check'. |
check_command_args | Array of strings Check command arguments |
check_timeperiod_id | integer or null Check command timeperiod ID |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
notification_enabled | integer Specify whether notifications for this host are enabled or not
|
notification_options | integer or null Define the states of the host for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about alerts for this host - only one alert notification will be sent out. |
notification_timeperiod_id | integer or null Notification timeperiod ID |
add_inherited_contact_group | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
add_inherited_contact | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first alert notification when this host enters a non-UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this host. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this host. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this host |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this host |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null Event handler command ID |
event_handler_command_args | Array of strings Event handler command arguments |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
note | string or null <= 65535 characters Define an optional note. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
icon_id | integer or null Define the ID of the image that should be associated with this host |
icon_alternative | string or null <= 200 characters Define an optional string that is used as alternative description for the icon |
comment | string or null Host template comments |
is_activated | boolean Indicates whether the host template is activated or not |
categories | Array of integers Define the host category IDs that should be associated with this host |
groups | Array of integers Define the host group IDs that should be associated with this host |
templates | Array of integers Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "monitoring_server_id": 0,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "is_activated": true,
- "categories": [
- 1,
- 15,
- 8
], - "groups": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "id": 1,
- "monitoring_server_id": 1,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "is_activated": true,
- "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "host-group-name"
}
], - "templates": [
- {
- "id": 1,
- "name": "parent-template-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
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 | string 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 of host category configurations
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host category
This endpoint does NOT update the ACL rights with the new host category
name | string Host category name |
alias | string Host category alias |
is_activated | boolean is active or not (enable/disable) |
comment | string or null some comment |
{- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Get a host category configuration
host_category_id required | integer <int64> Example: 1 ID of existing host category configuration |
{- "id": 1,
- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
Update a host category
host_category_id required | integer <int64> Example: 1 ID of existing host category configuration |
name | string Host category name |
alias | string Host category alias |
is_activated | boolean is active or not (enable/disable) |
comment | string or null some comment |
{- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a host category configuration
host_category_id required | integer <int64> Example: 1 ID of existing host category configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Delete a service category configuration
service_category_id required | integer <int64> Example: 1 ID of existing service category configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all host group configurations.
The available parameters to search / sort_by are:
Changes in 23.04 :
icon
was renamed icon_id
and is no longer an object but the image IDicon_map
was renamed icon_map_id
and is no longer an object but the image IDThis endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
{- "result": [
- {
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true,
- "id": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new host group configuration.
Mandatory body properties are:
Since Centreon web 23.04
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
name | string <= 200 characters Host group name |
alias | string or null <= 200 characters Host group alias |
notes | string or null <= 255 characters Define an optional string of notes pertaining to the host group |
notes_url | string or null <= 255 characters Define an optional URL that can be used to provide more information about the host group |
action_url | string or null <= 255 characters Define an optional URL that can be used to provide more actions to be performed on the host group. You will see the link to the action URL in the host group details |
icon_id | integer or null Define the image ID that should be associated with this host group |
icon_map_id | integer or null Define an image ID that should be associated with this host group in the statusmap CGI in monitoring engine |
geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
rrd | integer or null [ 1 .. 2147483648 ] RRD retention duration in days of all the services that are in this host group |
comment | string or null <= 65535 characters Comments on this host group |
is_activated | boolean Indicates whether the host group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true
}
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true,
- "id": 1
}
internal
Since Centreon web 23.10
Get host group.
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
hostgroup_id required | integer <int64> Example: 5 ID of the host group |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true,
- "id": 1
}
internal
Since Centreon web 23.04
Delete host group.
hostgroup_id required | integer <int64> Example: 5 ID of the host group |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
internal
Since Centreon web 23.10
Update host group.
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
hostgroup_id required | integer <int64> Example: 5 ID of the host group |
name | string <= 200 characters Host group name |
alias | string or null <= 200 characters Host group alias |
notes | string or null <= 255 characters Define an optional string of notes pertaining to the host group |
notes_url | string or null <= 255 characters Define an optional URL that can be used to provide more information about the host group |
action_url | string or null <= 255 characters Define an optional URL that can be used to provide more actions to be performed on the host group. You will see the link to the action URL in the host group details |
icon_id | integer or null Define the image ID that should be associated with this host group |
icon_map_id | integer or null Define an image ID that should be associated with this host group in the statusmap CGI in monitoring engine |
geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
rrd | integer or null [ 1 .. 2147483648 ] RRD retention duration in days of all the services that are in this host group |
comment | string or null <= 65535 characters Comments on this host group |
is_activated | boolean Indicates whether the host group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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 | string 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 meta services 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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "TOTAL_FIREWALL_CONNECTIONS",
- "output": "Number of connections: %d",
- "calulation_type": "average",
- "data_source_type": "gauge",
- "meta_select_mode": 2,
- "regexp_string": "%service_name%",
- "metric": "used",
- "warning": "80",
- "critical": "90",
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get a meta service configuration by its id
meta_id required | integer <int64> Example: 1 ID of the meta service |
{- "id": 2,
- "name": "TOTAL_FIREWALL_CONNECTIONS",
- "output": "Number of connections: %d",
- "calulation_type": "average",
- "data_source_type": "gauge",
- "meta_select_mode": 2,
- "regexp_string": "%service_name%",
- "metric": "used",
- "warning": "80",
- "critical": "90",
- "is_activated": true
}
List all meta services metrics from realtime.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta 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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "rta",
- "unitName": "ms",
- "currentValue": 0.25,
- "resource": {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "host_id": 12,
- "service_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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "metrics": "/centreon/api/latest/monitoring/hosts/17/services/23/metrics"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "metrics": "/centreon/api/latest/monitoring/hosts/17/services/23/metrics"
}, - "externals": {
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "is_in_downtime": false,
- "is_acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "has_active_checks_enabled": true,
- "has_passive_checks_enabled": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "is_notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
meta_id required | integer <int64> Example: 1 ID of the meta 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 | string 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
}
}
List all downtimes of a service.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta 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 | string 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
}
}
Schedule immediate check on chosen metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single metaservice
meta_id required | integer <int64> Example: 1 ID of the meta 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": 400,
- "message": "Property 'name' not found"
}
List of all host severity configurations
The available parameters to search / sort_by are:
Changes in 23.04 :
icon
was renamed icon_id
and is no longer an object but the image ID{- "result": [
- {
- "id": 1,
- "name": "host-severity",
- "alias": "host-severity",
- "level": 2,
- "icon_id": 1,
- "comment": "string",
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host severity
name | string |
alias | string |
level | integer |
icon_id | integer |
{- "name": "host-severity-name",
- "alias": "host-severity-alias",
- "level": 2,
- "icon_id": 1
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a host severity configuration
host_severity_id required | integer <int64> Example: 1 ID of existing host severity configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Update a host severity
host_severity_id required | integer <int64> Example: 1 ID of existing host severity configuration |
name | string Host severity name |
alias | string Host severity alias |
level | integer Host severity priority |
icon_id | integer Define the image ID associated with this severity |
comment | string or null Host severity comment |
is_activated | boolean Indicates whether this host severity is enabled or not |
{- "name": "host-severity",
- "alias": "host-severity",
- "level": 2,
- "icon_id": 1,
- "comment": "string",
- "is_activated": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Return all host template configurations.
The available parameters to search / sort_by are:
Changes in 23.10 :
check_interval
was renamed normal_check_interval:
active_checks_status
was renamed active_check_enabled
passive_checks_status
was renamed passive_check_enabled
notifications_status
was renamed notification_enabled
url_notes
was renamed note_url
note
was renamed note
icon
was renamed icon_id
and is no longer an object but the image IDThis endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "is_locked": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host template configuration
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
name required | string Host template name |
alias required | string Host template alias |
snmp_community | string or null Community of the SNMP agent |
snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
timezone_id | integer or null Timezone ID |
severity_id | integer or null Severity ID |
check_command_id | integer or null Check command ID. Must be of type 'Check'. |
check_command_args | Array of strings Check command arguments |
check_timeperiod_id | integer or null Check command timeperiod ID |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether the active checks is enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
notification_enabled | integer Specify whether notifications for this host are enabled or not
|
notification_options | integer or null Define the states of the host for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this host - only one problem notification will be sent out. |
notification_timeperiod_id | integer or null Notification timeperiod ID |
add_inherited_contact_group | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
add_inherited_contact | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this host enters a non-UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this host. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this host. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this host |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this host |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null Event handler command ID |
event_handler_command_args | Array of strings Event handler command arguments |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
note | string or null <= 65535 characters Define an optional note. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
icon_id | integer or null Define the image ID that should be associated with this host template |
icon_alternative | string or null <= 200 characters Define an optional string that is used as alternative description for the icon |
comment | string or null Host template comments |
categories | Array of integers Define the host category IDs that should be associated with this host template |
templates | Array of integers Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "categories": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "id": 1,
- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string",
- "is_locked": true,
- "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "templates": [
- {
- "id": 1,
- "name": "parent-template-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
Delete a host template configuration
host_template_id required | integer >= 1 Example: 1 Host template ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Partially update a host template configuration.
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
host_template_id required | integer >= 1 Example: 1 Host template ID |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. | |
categories | Array of integers Define the host category IDs that should be associated with this host template In the case of non-admin users, only categories the user has access to will be accepted and their association to the host template created or deleted. |
templates | Array of integers Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order. |
name | string Host template name |
alias | string Host template alias |
snmp_community | string or null Community of the SNMP agent |
snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
timezone_id | integer or null Timezone ID |
severity_id | integer or null Severity ID |
check_command_id | integer or null Check command ID. Must be of type 'Check'. |
check_command_args | Array of strings Check command arguments |
check_timeperiod_id | integer or null Check command timeperiod ID |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether the active checks is enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
notification_enabled | integer Specify whether notifications for this host are enabled or not
|
notification_options | integer or null Define the states of the host for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this host - only one problem notification will be sent out. |
notification_timeperiod_id | integer or null Notification timeperiod ID |
add_inherited_contact_group | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
add_inherited_contact | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this host enters a non-UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this host. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this host. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this host |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this host |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null Event handler command ID |
event_handler_command_args | Array of strings Event handler command arguments |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
note | string or null <= 65535 characters Define an optional note. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
icon_id | integer or null Define the image ID that should be associated with this host template |
icon_alternative | string or null <= 200 characters Define an optional string that is used as alternative description for the icon |
comment | string or null Host template comments |
{- "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
], - "categories": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_command_id": 1,
- "check_command_args": [
- "0",
- "OK"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 0,
- "passive_check_enabled": 0,
- "notification_enabled": 0,
- "notification_options": 5,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "add_inherited_contact_group": true,
- "add_inherited_contact": true,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 0,
- "freshness_threshold": 0,
- "flap_detection_enabled": 0,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "0",
- "OK"
], - "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "icon_alternative": "string",
- "comment": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Create a media
directory required | string Directory where the file will be created |
data required | string <binary> File content |
{- "result": [
- {
- "id": 1,
- "filename": "centreon_logo.jpg",
- "directory": "logos",
- "md5": "f7d5fc06a33946703054046c7174bbf4"
}
], - "errors": [
- {
- "filename": "old_logo.jpg",
- "directory": "logos",
- "reason": "Media already exists"
}
]
}
Return all media configurations.
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "filaname": "logo.png",
- "directory": "logos"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
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 | string 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,
- "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
}
}
Generate and move the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Reload the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate, move and reload the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate and move the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Reload the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate, move and reload the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all monitoring servers configured and stored in real time.
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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "description": "Central server",
- "isRunning": true,
- "lastAlive": 0,
- "version": "20.10.0"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
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": 400,
- "message": "Property 'name' not found"
}
Partial update of a service configuration
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
service_id required | integer >= 1 Example: 1 Service ID |
name | string Service name. |
host_id | integer ID of the host linked to this service. |
geo_coords | string or null Geographic coordinates of the service |
comment | string or null Service comment. |
service_template_id | integer or null >= 1 Template ID of the service template. |
check_command_id | integer or null >= 1 Check command ID. |
check_command_args | Array of strings |
check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
volatility_enabled | integer Indicates whether the service is "volatile" or not
|
notification_enabled | integer Specify whether notifications are enabled or not
|
is_contact_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
is_contact_group_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out. |
notification_timeperiod_id | integer or null >= 1 Notification timeperiod ID. |
notification_type | integer Define the states of the service for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this service. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this service. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this service. |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this service. |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null >= 1 Event handler command ID. |
event_handler_command_args | Array of strings |
graph_template_id | integer or null >= 1 ID of the default graph template that will be used for this service. |
note | string or null <= 65535 characters Define an optional note. |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
icon_id | integer or null >= 1 Define the image ID that should be associated with this service. |
icon_alternative | string or null <= 200 characters Define an optional string that is used as an alternative description for the icon. |
severity_id | integer or null >= 1 Severity ID. |
is_activated | boolean Indicates whether the service is activated or not |
service_categories | Array of integers |
service_groups | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "is_activated": true,
- "service_categories": [
- 1,
- 2
], - "service_groups": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Add a service configuration
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
name required | string Service name. |
host_id required | integer ID of the host linked to this service. |
geo_coords | string or null Geographic coordinates of the service |
comment | string or null Service comment. |
service_template_id | integer or null >= 1 Template ID of the service template. |
check_command_id | integer or null >= 1 Check command ID. |
check_command_args | Array of strings |
check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
volatility_enabled | integer Indicates whether the service is "volatile" or not
|
notification_enabled | integer Specify whether notifications are enabled or not
|
is_contact_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
is_contact_group_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out. |
notification_timeperiod_id | integer or null >= 1 Notification timeperiod ID. |
notification_type | integer Define the states of the service for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this service. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this service. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this service. |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this service. |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null >= 1 Event handler command ID. |
event_handler_command_args | Array of strings |
graph_template_id | integer or null >= 1 ID of the default graph template that will be used for this service. |
note | string or null <= 65535 characters Define an optional note. |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
icon_id | integer or null >= 1 Define the image ID that should be associated with this service. |
icon_alternative | string or null <= 200 characters Define an optional string that is used as an alternative description for the icon. |
severity_id | integer or null >= 1 Severity ID. |
is_activated | boolean Indicates whether the service is activated or not |
service_categories | Array of integers |
service_groups | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "is_activated": true,
- "service_categories": [
- 1,
- 2
], - "service_groups": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "id": 1,
- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "is_activated": true,
- "categories": [
- {
- "id": 1,
- "name": "service-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "service-group-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
Return all service configurations.
The available parameters to search by are:
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "generic-service",
- "hosts": [
- {
- "id": 12,
- "name": "entity-name"
}
], - "service_template": {
- "id": 12,
- "name": "entity-name"
}, - "check_timeperiod": {
- "id": 12,
- "name": "entity-name"
}, - "notification_timeperiod": {
- "id": 12,
- "name": "entity-name"
}, - "severity": {
- "id": 12,
- "name": "entity-name"
}, - "categories": [
- {
- "id": 12,
- "name": "entity-name"
}
], - "groups": [
- {
- "id": 12,
- "name": "sg-name",
- "host_id": 12,
- "host_name": "host-name"
}
], - "normal_check_interval": 0,
- "retry_check_interval": 0,
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 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 | string 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 | string 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,
- "notify": true
}
Return all service group configurations.
The available parameters to search / sort_by are:
{- "result": [
- {
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true,
- "id": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new service group configuration.
Mandatory body properties are:
Since Centreon web 23.04
name | string <= 200 characters Service group name |
alias | string or null <= 200 characters Service group alias |
geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
comment | string or null <= 65535 characters Comments on this service group |
is_activated | boolean Indicates whether the service group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true
}
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true,
- "id": 1
}
internal
Since Centreon web 23.04
Delete service group.
servicegroup_id required | integer <int64> Example: 5 ID of the service group |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
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 | string 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
}
}
List of service category configurations
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a service category
This endpoint does NOT update the ACL rights with the new service category
name | string Service category name |
alias | string Service category alias |
is_activated | boolean is active or not (enabled/disabled) |
{- "name": "service-category",
- "alias": "service-category",
- "is_activated": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all the service severities 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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 13,
- "name": "severity-name",
- "level": 50,
- "type": "host|service",
- "icon": {
- "name": "centreon.png",
- "url": "img/centreon.png"
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all the host severities 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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 13,
- "name": "severity-name",
- "level": 50,
- "type": "host|service",
- "icon": {
- "name": "centreon.png",
- "url": "img/centreon.png"
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get list of all time periods
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- {
- "id": 1,
- "alias": "Always"
}
], - "exceptions": [
- {
- "id": 1,
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
name | string Name of the time period |
alias | string Alias of the time period |
Array of objects (Configuration.TimePeriod.days) | |
templates | Array of integers IDs of the time periods used as a template |
Array of objects (Configuration.TimePeriod.ExtraTimePeriod) List of exceptions to the standard schedule |
{- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- 0
], - "exceptions": [
- {
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
id required | integer <int64> Example: 1 Time period ID |
{- "id": 1,
- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- {
- "id": 1,
- "alias": "Always"
}
], - "exceptions": [
- {
- "id": 1,
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
id required | integer <int64> Example: 1 ID of the time period to be updated |
name | string Name of the time period |
alias | string Alias of the time period |
Array of objects (Configuration.TimePeriod.days) | |
templates | Array of integers IDs of the time periods used as a template |
Array of objects (Configuration.TimePeriod.ExtraTimePeriod) List of exceptions to the standard schedule |
{- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- 0
], - "exceptions": [
- {
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
{- "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": 400,
- "message": "Property 'name' not found"
}
Get a platform topology in Json Graph Format
{- "graph": {
- "label": "centreon-topology",
- "metadata": {
- "version": "1.0.0"
}, - "nodes": {
- "id": {
- "type": "central",
- "label": "Central",
- "metadata": {
- "centreon-id": "1",
- "hostname": "localhost.localdomain",
- "address": "192.168.0.1"
}
}
}, - "edges": [
- {
- "source": "91",
- "relation": "peer_retention",
- "target": "1"
}
]
}
}
Add a broker output configuration
broker_id required | integer <int64> Example: 5 ID of the broker configuration |
name required | string output name |
type | integer Output type ID Must be one of the following:
|
parameters required | object Output parameters specific to the output type. For multiselect fields the property name is a combination of the group field name and the sub field name as "{fieldName}_{subfieldName}" (ex: "filters_category") All fields must be provided, but can be null/empty if they are optional. |
{- "name": "central-broker-master-unified-sql",
- "type": "33",
- "parameters": "{\n \"path\": \"some/test/path\",\n \"filters.category\": [\"storage\", \"neb\"],\n \"lua_parameter\": [\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-1\",\n \"value\": \"azerty\"\n },\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-2\",\n \"value\": \"qwerty\"\n }\n ]\n}\n"
}
{- "brokerId": 1,
- "name": "central-broker-master-unified-sql",
- "type": {
- "id": 33,
- "name": "lua"
}, - "parameters": "{\n \"path\": \"some/test/path\",\n \"filters.category\": [\"storage\", \"neb\"],\n \"lua_parameter\": [\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-1\",\n \"value\": \"azerty\"\n },\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-2\",\n \"value\": \"qwerty\"\n }\n ]\n}\n"
}
Create a configuration file with provided JSON content and update the output configuration accordingly
broker_id required | integer <int64> Example: 5 ID of the broker configuration |
output_id required | integer <int64> Example: 5 ID of the broker configuration output |
file_content required | string Content of the file to be created. Must be a valid JSON encoded string. |
{- "file_content": "{\"test\": \"hello world\"}"
}
{- "path": "/some/path/my-new-file.json"
}
Return all graph template configurations.
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "CPU",
- "vertical_axis_label": "some axis label",
- "width": 120,
- "height": 120,
- "base": 1024,
- "grid": { },
- "is_graph_scaled": true,
- "is_default_centreon_template": false
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return all connector configurations.
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "SSH Connector",
- "command_line": "string",
- "description": "some description",
- "is_activated": true,
- "commands": [
- {
- "id": 1,
- "name": "check_host_alive",
- "type": 2
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return all service template configurations.
The available parameters to search / sort_by are:
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "is_locked": true,
- "name": "generic-service",
- "alias": "generic-service",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a service template configuration.
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
name required | string Service template name. |
alias required | string Service template alias. |
comment | string or null Service template comment. |
service_template_id | integer or null >= 1 Template ID of the service template. |
check_command_id | integer or null >= 1 Check command ID. |
check_command_args | Array of strings |
check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
normal_normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
volatility_enabled | integer Indicates whether the service is "volatile" or not
|
notification_enabled | integer Specify whether notifications are enabled or not
|
is_contact_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
is_contact_group_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out. |
notification_timeperiod_id | integer or null >= 1 Notification timeperiod ID. |
notification_type | integer Define the states of the service for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer or null Specify a duration of acknowledgement for this service template. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer or null Specify the freshness threshold (in seconds) for this service. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer or null Specify the low state change threshold used in flap detection for this service. |
high_flap_threshold | integer or null Specify the high state change threshold used in flap detection for this service. |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null >= 1 Event handler command ID. |
event_handler_command_args | Array of strings |
graph_template_id | integer or null >= 1 ID of the default graph template that will be used for this service. |
note | string or null <= 65535 characters Define an optional note. |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
icon_id | integer or null >= 1 Define the image ID that should be associated with this service template. |
icon_alternative | string or null <= 200 characters Define an optional string that is used as an alternative description for the icon. |
severity_id | integer or null >= 1 Severity ID. |
host_templates | Array of integers |
service_categories | Array of integers |
Array of objects | |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "alias": "generic-service",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a service template configuration
service_template_id required | integer >= 1 Example: 1 Service template ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Partial update of a service template configuration
This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.
service_template_id required | integer >= 1 Example: 1 Service template ID |
name | string Service template name. |
alias | string Service template alias. |
comment | string or null Service template comment. |
service_template_id | integer or null >= 1 Template ID of the service template. |
check_command_id | integer or null >= 1 Check command ID. |
check_command_args | Array of strings |
check_timeperiod_id | integer >= 1 Time period ID of the check command. |
max_check_attempts | integer Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
normal_check_interval | integer Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
retry_check_interval | integer Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
active_check_enabled | integer Indicates whether active checks are enabled or not
|
passive_check_enabled | integer Indicates whether passive checks are enabled or not
|
volatility_enabled | integer Indicates whether the service is "volatile" or not
|
notification_enabled | integer Specify whether notifications are enabled or not
|
is_contact_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead. |
is_contact_group_additive_inheritance | boolean Only used when notification inheritance for hosts and services is set to vertical inheritance only. When enabled, the contact definition will not override the definitions on template levels, it will be appended instead. |
notification_interval | integer or null Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. With the default time unit of 60s, this number will mean multiples of 1 minute. A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out. |
notification_timeperiod_id | integer >= 1 Notification timeperiod ID. |
notification_type | integer Define the states of the service for which notifications should be sent out. The value is the sum of all the values of the selected options.
example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL |
first_notification_delay | integer or null Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
recovery_notification_delay | integer or null Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state. With the default time unit of 60s, this number will mean multiples of 1 minute. |
acknowledgement_timeout | integer Specify a duration of acknowledgement for this service template. |
freshness_checked | integer Indicates whether freshness is checked or not
|
freshness_threshold | integer Specify the freshness threshold (in seconds) for this service. |
flap_detection_enabled | integer Indicates whether the flap detection is enabled or not
|
low_flap_threshold | integer Specify the low state change threshold used in flap detection for this service. |
high_flap_threshold | integer Specify the high state change threshold used in flap detection for this service. |
event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
event_handler_command_id | integer or null >= 1 Event handler command ID. |
event_handler_command_args | Array of strings |
graph_template_id | integer or null >= 1 ID of the default graph template that will be used for this service. |
note | string or null <= 65535 characters Define an optional note. |
note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
icon_id | integer or null >= 1 Define the image ID that should be associated with this service template. |
icon_alternative | string or null <= 200 characters Define an optional string that is used as an alternative description for the icon. |
severity_id | integer or null >= 1 Severity ID. |
host_templates | Array of integers |
service_categories | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. | |
Array of objects |
{- "name": "generic-service",
- "alias": "generic-service",
- "comment": "string",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "active_check_enabled": 2,
- "passive_check_enabled": 2,
- "volatility_enabled": 2,
- "notification_enabled": 2,
- "is_contact_additive_inheritance": true,
- "is_contact_group_additive_inheritance": true,
- "notification_interval": 0,
- "notification_timeperiod_id": 1,
- "notification_type": 5,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "acknowledgement_timeout": 0,
- "freshness_checked": 2,
- "freshness_threshold": 0,
- "flap_detection_enabled": 2,
- "low_flap_threshold": 0,
- "high_flap_threshold": 0,
- "event_handler_enabled": 2,
- "event_handler_command_id": null,
- "event_handler_command_args": [
- "80",
- "90"
], - "graph_template_id": null,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "icon_alternative": "string",
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List of all service severity configurations
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "service-severity",
- "alias": "service-severity",
- "level": 2,
- "icon_id": 1,
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a service severity
name required | string Service severity name |
alias required | string Service severity alias |
level required | integer Service severity priority |
icon_id required | integer Define the image ID associated with this severity |
is_activated | boolean Indicates whether this service severity is enabled or not |
{- "name": "service-severity",
- "alias": "service-severity",
- "level": 2,
- "icon_id": 1,
- "is_activated": true
}
{- "id": 1,
- "name": "service-severity",
- "alias": "service-severity",
- "level": 2,
- "icon_id": 1,
- "is_activated": true
}
Delete a service severity configuration
service_severity_id required | integer >= 1 Example: 1 Service severity ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Update a service severity configuration
service_severity_id required | integer >= 1 Example: 1 Service severity ID |
name required | string Service severity name |
alias required | string Service severity alias |
level required | integer Service severity priority |
icon_id required | integer Define the image ID associated with this severity |
is_activated | boolean Indicates whether this service severity is enabled or not |
{- "name": "service-severity",
- "alias": "service-severity",
- "level": 2,
- "icon_id": 1,
- "is_activated": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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
}
}
Return the notified contacts and contact groups of a host.
host_id required | integer <int64> Example: 12 ID of the host |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Return the notified contacts and contact groups of a service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Return the notified contacts and contact groups of a meta service.
meta_id required | integer <int64> Example: 1 ID of the meta service |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Get list of configured users
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "John Doe",
- "alias": "admin",
- "email": "root@localhost",
- "is_admin": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List configured parameters for the current user
{- "id": 1,
- "name": "Administrator",
- "alias": "admin",
- "email": "admin@localhost",
- "timezone": "Europe/Paris",
- "locale": "en_US",
- "is_admin": true,
- "use_deprecated_pages": false,
- "theme": "light",
- "user_interface_density": "extended",
- "default_page": "/main.php?p=60901",
- "dashboard": {
- "global_user_role": "viewer",
- "view_dashboards": true,
- "create_dashboards": true,
- "administrate_dashboards": true
}
}
Update a user
The available parameters to be updated are :
theme | string Enum: "light" "dark" Theme |
user_interface_density | string Enum: "compact" "extended" User interface view mode |
{- "theme": "light",
- "user_interface_density": "extended"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
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. Currently only 'events-view' is allowed. |
{- "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
Get detailed information of a user filter for a given page.
page_name required | string Example: events-view name of the page. Currently only 'events-view' is allowed. |
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
}
Return all dashboard configurations.
The available parameters to search / sort_by are:
Since Centreon web 23.10
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "my dashboard",
- "description": "my description",
- "created_by": {
- "id": 0,
- "name": "string"
}, - "updated_by": {
- "id": 0,
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "own_role": "viewer",
- "panels": [
- {
- "name": "my panel",
- "layout": {
- "x": 0,
- "y": 0,
- "width": 0,
- "height": 0,
- "min_width": 0,
- "min_height": 0
}, - "widget_type": "string",
- "widget_settings": { }
}
], - "refresh": {
- "type": "manual",
- "interval": 10
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new dashboard configuration.
Mandatory body properties are:
Since Centreon web 23.10
name required | string <= 200 characters Dashboard name |
description | string or null <= 65535 characters Description about this dashboard |
Array of objects | |
object |
{- "name": "my dashboard",
- "description": "my description",
- "panels": [
- {
- "name": "my panel",
- "layout": {
- "x": 0,
- "y": 0,
- "width": 0,
- "height": 0,
- "min_width": 0,
- "min_height": 0
}, - "widget_type": "string",
- "widget_settings": { }
}
], - "refresh": {
- "type": "manual",
- "interval": 10
}
}
{- "id": 1,
- "name": "my dashboard",
- "description": "my description",
- "created_by": {
- "id": 0,
- "name": "string"
}, - "updated_by": {
- "id": 0,
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "own_role": "viewer",
- "panels": [
- {
- "name": "my panel",
- "layout": {
- "x": 0,
- "y": 0,
- "width": 0,
- "height": 0,
- "min_width": 0,
- "min_height": 0
}, - "widget_type": "string",
- "widget_settings": { }
}
], - "refresh": {
- "type": "manual",
- "interval": 10
}
}
Return one dashboard configuration.
Since Centreon web 23.10
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
{- "id": 1,
- "name": "my dashboard",
- "description": "my description",
- "created_by": {
- "id": 0,
- "name": "string"
}, - "updated_by": {
- "id": 0,
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "own_role": "viewer",
- "refresh": {
- "type": "manual",
- "interval": 10
}, - "panels": [
- {
- "name": "my panel",
- "layout": {
- "x": 0,
- "y": 0,
- "width": 0,
- "height": 0,
- "min_width": 0,
- "min_height": 0
}, - "widget_type": "string",
- "widget_settings": { },
- "id": 1
}
]
}
Since Centreon web 23.10
Partial update dashboard.
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
name | string <= 200 characters Dashboard name |
description | string or null <= 65535 characters Description about this dashboard |
Array of objects | |
object |
{- "name": "my dashboard",
- "description": "my description",
- "panels": [
- {
- "name": "my panel",
- "layout": {
- "x": 0,
- "y": 0,
- "width": 0,
- "height": 0,
- "min_width": 0,
- "min_height": 0
}, - "widget_type": "string",
- "widget_settings": { },
- "id": 1
}
], - "refresh": {
- "type": "manual",
- "interval": 10
}
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete one dashboard configuration.
Since Centreon web 23.10
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all contact access rights of a dashboard.
The available parameters to search / sort_by are:
Since Centreon web 23.10
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "John Doe",
- "email": "john.doe@centreon.com",
- "role": "viewer"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new contact access right for a dashboard.
Mandatory body properties are:
Since Centreon web 23.10
id required | integer Contact ID |
role required | string Enum: "viewer" "editor" The role of the contact for this dashboard. |
{- "id": 1,
- "role": "viewer"
}
{- "id": 1,
- "name": "John Doe",
- "email": "john.doe@centreon.com",
- "role": "viewer"
}
Since Centreon web 23.10
Update the contact access right of a dashboard.
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
contact_id required | integer <int64> Example: 5 ID of the contact |
role | string Enum: "viewer" "editor" The role of the contact for this dashboard. |
{- "role": "viewer"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete the contact access right of a dashboard.
Since Centreon web 23.10
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
contact_id required | integer <int64> Example: 5 ID of the contact |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all contact access rights of a dashboard.
The available parameters to search / sort_by are:
Since Centreon web 23.10
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "John Doe",
- "role": "viewer"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new contact access right for a dashboard.
Mandatory body properties are:
Since Centreon web 23.10
id required | integer Contact group ID |
role required | string Enum: "viewer" "editor" The role of the contact group for this dashboard. |
{- "id": 1,
- "role": "viewer"
}
{- "id": 1,
- "name": "John Doe",
- "role": "viewer"
}
Since Centreon web 23.10
Update the contact access right of a dashboard.
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
contact_group_id required | integer <int64> Example: 5 ID of the contact group |
role | string Enum: "viewer" "editor" The role of the contact group for this dashboard. |
{- "role": "viewer"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete the contact access right of a dashboard.
Since Centreon web 23.10
dashboard_id required | integer <int64> Example: 5 ID of the dashboard |
contact_group_id required | integer <int64> Example: 5 ID of the contact group |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all contacts for the sharing modal of a dashboard.
The available parameters to search / sort_by are:
Since Centreon web 23.10
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 0,
- "name": "string",
- "email": "string",
- "most_permissive_role": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return all contact groups for the sharing modal of a dashboard.
The available parameters to search / sort_by are:
Since Centreon web 23.10
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 0,
- "name": "string",
- "most_permissive_role": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get list of all metrics
The available parameters to search / sort_by are: AND
{- "result": [
- {
- "id": 26,
- "name": "Ping",
- "parent_name": "Printers",
- "uuid": "h24-s16",
- "metrics": [
- {
- "id": 1,
- "name": "rta",
- "unit": "%",
- "warning_high_threshold": 200,
- "critical_high_threshold": 400,
- "warning_low_threshold": 200,
- "critical_low_threshold": 400
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get data for given metrics
The available parameters to search / sort_by are: AND
start required | string <date-time> Example: start=2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end required | string <date-time> Example: end=2020-02-19T00:00:00 End date of metrics (default date is current date) |
metric_names required | string^\[\w+(,\w+)*\]$ Example: metric_names=[rta,pl] List of metric names |
{- "base": 1000,
- "metrics": [
- {
- "metric_id": "29",
- "metric": "cpu",
- "metric_legend": "cpu",
- "unit": "%",
- "min": "0",
- "max": "100",
- "ds_data": {
- "ds_color_line": "#666600"
}, - "legend": "cpu (%)",
- "stack": 0,
- "warning_high_threshold": null,
- "critical_high_threshold": null,
- "warning_low_threshold": null,
- "critical_low_threshold": null,
- "ds_order": 0,
- "data": [
- 1,
- null,
- 1
], - "last_value": 5,
- "average_value": 5.64,
- "minimum_value": 1,
- "maximum_value": 1
}
], - "times": [
- "2020-02-19T00:00:00",
- "2020-02-19T00:05:00",
- "2020-02-19T00:10:00"
]
}
List all of the metrics of a services with their threshold and current value
host_id required | integer >= 1 Example: 1 Host ID |
service_id required | integer >= 1 Example: 1 Service ID |
[- {
- "id": null,
- "name": "string",
- "unit": "string",
- "current_value": null,
- "warning_high_threshold": null,
- "warning_low_threshold": null,
- "critical_high_threshold": null,
- "critical_low_threshold": null
}
]
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"
]
], - "last_value": 5,
- "minimum_value": 0,
- "maximum_value": 10,
- "average_value": 5.64
}
], - "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) |
{- "base": 1024,
- "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": [
- "1690965300"
]
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start_date required | string <date-time> Example: start_date=2022-01-01T00:00:22Z Start date of metrics (date format should be in ISO 8601) |
end required | string <date-time> Example: end=2023-01-01T00:00:00Z End date of metrics (date format should be in ISO 8601) |
{- "code": 500,
- "message": "Internal Server Error"
}
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 the resources in real-time monitoring by their parents : parent -> resources.
The available parameters to search / sort_by are:
Only for searching:
search | string Retrieve only data matching the defined search value.
A simple search can be done like in 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 page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
types | string^\["[^"]+"(,"[^"]+")*\]$ Example: types=["host"] Filter the resources by type |
states | string^\["[^"]+"(,"[^"]+")*\]$ Example: states=["in_downtime", "acknowledged"] Filter the resources by state |
statuses | string^\["[^"]+"(,"[^"]+")*\]$ Example: statuses=["OK", "UP", "PENDING"] Filter the resources by status |
hostgroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: hostgroup_names=["ESX-Paris", "ESX-London"] Filter the resources by host group names |
servicegroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: servicegroup_names=["Memory-Services", "Ping-Services"] Filter the resources by service group names |
service_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: service_category_names=["Ping", "CPUs"] Filter the resources by service category names |
host_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_category_names=["Linux", "Windows"] Filter the resources by host category names |
host_severity_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_severity_names=["Linux", "Windows"] Filter the resources by host severity names |
service_severity_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: service_severity_names=["Ping", "CPUs"] Filter the resources by service severity names |
host_severity_levels | string^\[\d+(,\d+)*\]$ Example: host_severity_levels=[50, 75] Filter the resources by host severity levels |
service_severity_levels | string^\[\d+(,\d+)*\]$ Example: service_severity_levels=[50, 75] Filter the resources by service severity levels |
monitoring_server_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: monitoring_server_names=["Central", "Remote-Server-Paris", "Poller-Lyon"] Filter the resources by monitoring server names |
status_types | string^\["[^"]+"(,"[^"]+")*\]$ Example: status_types=["soft"] Filter the resources by status types |
{- "result": [
- {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "is_in_downtime": false,
- "is_acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "has_active_checks_enabled": true,
- "has_passive_checks_enabled": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "is_notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}, - "name": "Central",
- "children": {
- "total": "10",
- "status_count": {
- "ok": 1,
- "warning": 1,
- "critical": 1,
- "unknown": 1
}, - "resources": [
- {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "is_in_downtime": false,
- "is_acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "has_active_checks_enabled": true,
- "has_passive_checks_enabled": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "is_notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}, - "resource_name": "Ping",
- "host_id": 12,
- "service_id": 12,
- "parent": {
- "id": 12
}
}
]
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
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 | string Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
types | string^\["[^"]+"(,"[^"]+")*\]$ Example: types=["host"] Filter the resources by type |
states | string^\["[^"]+"(,"[^"]+")*\]$ Example: states=["in_downtime", "acknowledged"] Filter the resources by state |
statuses | string^\["[^"]+"(,"[^"]+")*\]$ Example: statuses=["OK", "UP", "PENDING"] Filter the resources by status |
hostgroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: hostgroup_names=["ESX-Paris", "ESX-London"] Filter the resources by host group names |
servicegroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: servicegroup_names=["Memory-Services", "Ping-Services"] Filter the resources by service group names |
service_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: service_category_names=["Ping", "CPUs"] Filter the resources by service category names |
host_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_category_names=["Linux", "Windows"] Filter the resources by host category names |
host_severity_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_severity_names=["Linux", "Windows"] Filter the resources by host severity names |
service_severity_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: service_severity_names=["Ping", "CPUs"] Filter the resources by service severity names |
host_severity_levels | string^\[\d+(,\d+)*\]$ Example: host_severity_levels=[50, 75] Filter the resources by host severity levels |
service_severity_levels | string^\[\d+(,\d+)*\]$ Example: service_severity_levels=[50, 75] Filter the resources by service severity levels |
monitoring_server_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: monitoring_server_names=["Central", "Remote-Server-Paris", "Poller-Lyon"] Filter the resources by monitoring server names |
status_types | string^\["[^"]+"(,"[^"]+")*\]$ Example: status_types=["soft"] Filter the resources by status types |
{- "result": [
- {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "host_id": 12,
- "service_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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "metrics": "/centreon/api/latest/monitoring/hosts/17/services/23/metrics"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "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/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/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",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "metrics": "/centreon/api/latest/monitoring/hosts/17/services/23/metrics"
}, - "externals": {
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "is_in_downtime": false,
- "is_acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "has_active_checks_enabled": true,
- "has_passive_checks_enabled": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "is_notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return the full detail of a resource typed Service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
null
Count hosts by their status (UP/DOWN/UNREACHABLE/PENDING)
The available parameters to search / sort_by are:
hostgroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: hostgroup_names=["ESX-Paris", "ESX-London"] Filter the resources by host group names |
host_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_category_names=["Linux", "Windows"] Filter the resources by host category names |
{- "up": {
- "total": null
}, - "down": {
- "total": null
}, - "unreachable": {
- "total": null
}, - "pending": {
- "total": null
}, - "total": null
}
Count hosts by their status (UP/DOWN/UNREACHABLE/PENDING)
The available parameters to search / sort_by are:
hostgroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: hostgroup_names=["ESX-Paris", "ESX-London"] Filter the resources by host group names |
host_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: host_category_names=["Linux", "Windows"] Filter the resources by host category names |
servicegroup_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: servicegroup_names=["Memory-Services", "Ping-Services"] Filter the resources by service group names |
service_category_names | string^\["[^"]+"(,"[^"]+")*\]$ Example: service_category_names=["Ping", "CPUs"] Filter the resources by service category names |
{- "critical": {
- "total": null
}, - "unknown": {
- "total": null
}, - "ok": {
- "total": null
}, - "down": {
- "total": null
}, - "pending": {
- "total": null
}, - "total": null
}
{- "result": [
- {
- "id": 1,
- "name": "Access group",
- "alias": "Access group alias",
- "is_activated": true,
- "has_changed": true
}
], - "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. Currently only 'events-view' is allowed. |
name | string filter name |
criterias | Array of objects 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
Update user filter for a given page.
page_name required | string Example: events-view name of the page. Currently only 'events-view' is allowed. |
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 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. Currently only 'events-view' is allowed. |
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. Currently only 'events-view' is allowed. |
filter_id required | integer <int64> Example: 1 id of the filter |
{- "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": 400,
- "message": "Property 'name' not found"
}
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": 400,
- "message": "Property 'name' not found"
}
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": 400,
- "message": "Property 'name' not found"
}
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": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen resources
object | |
Array of objects |
{- "check": {
- "is_forced": true
}, - "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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": 400,
- "message": "Property 'name' not found"
}
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": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single metaservice
meta_id required | integer <int64> Example: 1 ID of the meta 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": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to resources
required | Array of objects |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}, - "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Add at least one comment to a single or to multiple resources
required | Array of objects |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}, - "date": "2019-08-24T14:15:22Z",
- "comment": "Resource is not-OK but it is expected"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
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 | string 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 | string 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 |
address | string The address of the platform |
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,
- "address": "10.0.0.1",
- "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": 400,
- "message": "Property 'name' not found"
}
List versions of web, widgets and modules
{- "web": {
- "version": "22.04.0",
- "major": "22",
- "minor": "04",
- "fix": "0"
}, - "widgets": {
- "property1": null,
- "property2": null
}, - "modules": {
- "property1": null,
- "property2": null
}
}
Return all API authentication tokens.
The available parameters to search / sort_by are:
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "name": "my-api-token",
- "user": {
- "id": 23,
- "name": "Jane Doe"
}, - "creator": {
- "id": 23,
- "name": "Jane Doe"
}, - "creation_date": "2023-08-31T15:46:00+02:00",
- "expiration_date": "2024-08-31T00:00:00+00:00",
- "is_revoked": false
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add an API authentication token
name required | string Token name |
user_id required | integer User ID linked to the API authentication token |
expiration_date required | string <date-time> Expiration date of the API authentication token |
{- "name": "my-api-token",
- "user_id": 23,
- "expiration_date": "2023-08-31T15:46:00+02:00"
}
{- "name": "my-api-token",
- "token": "xxxxxxx",
- "user": {
- "id": 23,
- "name": "Jane Doe"
}, - "creator": {
- "id": 23,
- "name": "Jane Doe"
}, - "creation_date": "2023-08-31T15:46:00+02:00",
- "expiration_date": "2024-08-31T00:00:00+00:00",
- "is_revoked": false
}
Delete an API token
token_name required | string Example: my-token-name token name |
user_id required | integer >= 1 Example: 1 User ID linked to the token |
{- "code": 400,
- "message": "Property 'name' not found"
}