Data Source
A DataSource is a plugin instance collecting `metric` and `log` data from Cloudforet.
Package : spaceone.api.monitoring.v1
DataSource
register
POST /monitoring/v1/data-sources
Registers a DataSource with information of the plugin to use. Information of the plugin includes version
, provider
, upgrade_mode
.
{
"name": "datasource-test",
"plugin_info": {
"plugin_id": "plugin-123456789012",
"version": "1.1.4.20220617.135934",
"options": {},
"provider": "aws",
"metadata": {
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
],
"required_keys": [
"data.cloudwatch"
],
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"a": "b"
},
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-123456789012",
"name": "datasource-test",
"state": "ENABLED",
"monitoring_type": "METRIC",
"provider": "aws",
"capability": {
"supported_schema": [
"aws_access_key",
"aws_assume_role"
],
"use_resource_secret": true,
"monitoring_type": "METRIC"
},
"plugin_info": {
"plugin_id": "plugin-123456789012",
"version": "1.1.4.20220617.135934",
"options": {},
"provider": "aws",
"metadata": {
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
],
"required_keys": [
"data.cloudwatch"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"a": "b"
},
"domain_id": "domain-123456789012",
"created_at": "2022-06-21T01:17:12.144Z"
}
update
PUT /monitoring/v1/data-source/{data_source_id}
Updates a specific DataSource. You can make changes in DataSource settings, including name
and tags
.
{
"data_source_id": "ds-123456789012",
"name": "tmp-datasource_test",
"tags": {
"b": "c"
},
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-123456789012",
"name": "tmp-datasource_test",
"state": "ENABLED",
"monitoring_type": "METRIC",
"provider": "aws",
"capability": {
"use_resource_secret": true,
"monitoring_type": "METRIC",
"supported_schema": [
"aws_access_key",
"aws_assume_role"
]
},
"plugin_info": {
"plugin_id": "plugin-123456789012",
"version": "1.1.4.20220617.135934",
"options": {},
"provider": "aws",
"metadata": {
"required_keys": [
"data.cloudwatch"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
],
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"b": "c"
},
"domain_id": "domain-123456789012",
"created_at": "2022-06-21T01:17:12.144Z"
}
enable
PUT /monitoring/v1/data-source/{data_source_id}/enable
Enables a specific DataSource. By enabling a DataSource, you can communicate with an external cloud service via the plugin.
{
"data_source_id": "ds-6167ed6b42f4",
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-6167ed6b42f4",
"name": "tmp-datasource_test",
"state": "ENABLED",
"monitoring_type": "METRIC",
"provider": "aws",
"capability": {
"supported_schema": [
"aws_access_key",
"aws_assume_role"
],
"monitoring_type": "METRIC",
"use_resource_secret": true
},
"plugin_info": {
"plugin_id": "plugin-5cdf8d72a7cc",
"version": "1.1.4.20220617.135934",
"options": {},
"provider": "aws",
"metadata": {
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
],
"required_keys": [
"data.cloudwatch"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"b": "c"
},
"domain_id": "domain-123456789012",
"created_at": "2022-06-21T01:17:12.144Z"
}
disable
PUT /monitoring/v1/data-source/{data_source_id}/disable
Disables a specific DataSource. By disabling a DataSource, you can block communication with an external cloud service via the plugin.
{
"data_source_id": "ds-6167ed6b42f4",
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-6167ed6b42f4",
"name": "tmp-datasource_test",
"state": "DISABLED",
"monitoring_type": "METRIC",
"provider": "aws",
"capability": {
"supported_schema": [
"aws_access_key",
"aws_assume_role"
],
"monitoring_type": "METRIC",
"use_resource_secret": true
},
"plugin_info": {
"plugin_id": "plugin-5cdf8d72a7cc",
"version": "1.1.4.20220617.135934",
"options": {},
"provider": "aws",
"metadata": {
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
],
"required_keys": [
"data.cloudwatch"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
]
},
"upgrade_mode": "AUTO"
},
"tags": {
"b": "c"
},
"domain_id": "domain-123456789012",
"created_at": "2022-06-21T01:17:12.144Z"
}
deregister
DELETE /monitoring/v1/data-source/{data_source_id}
Deregisters and deletes a specific DataSource. You must specify the data_source_id
of the DataSource to deregister.
{
"data_source_id": "ds-6167ed6b42f4",
"domain_id": "domain-123456789012"
}
update_plugin
PUT /monitoring/v1/data-source/{data_source_id}/plugin
Updates the plugin of a specific DataSource. This method resets the plugin data in the DataSource to update the metadata
.
{
"data_source_id": "ds-6167ed6b42f4",
"version": "1.1.3",
"options": {},
"upgrade_mode": "MANUAL",
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-6167ed6b42f4",
"name": "tmp-datasource_test",
"state": "ENABLED",
"monitoring_type": "METRIC",
"provider": "aws",
"capability": {
"use_resource_secret": true,
"supported_schema": [
"aws_access_key",
"aws_assume_role"
],
"monitoring_type": "METRIC"
},
"plugin_info": {
"plugin_id": "plugin-5cdf8d72a7cc",
"version": "1.1.3",
"options": {},
"provider": "aws",
"metadata": {
"required_keys": [
"data.cloudwatch"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
],
"supported_stat": [
"AVERAGE",
"MAX",
"MIN",
"SUM"
]
},
"upgrade_mode": "MANUAL"
},
"tags": {
"b": "c"
},
"domain_id": "domain-123456789012",
"created_at": "2022-06-21T01:17:12.144Z"
}
verify_plugin
PUT /monitoring/v1/data-source/{data_source_id}/plugin/verify
Verifies the plugin of a specific DataSource. This method validates the plugin data, version
and endpoint
.
{
"data_source_id": "ds-6167ed6b42f4",
"domain_id": "domain-123456789012"
}
get
GET /monitoring/v1/data-source/{data_source_id}
Gets a specific DataSource. Prints detailed information about the DataSource, including name
, state
, and plugin_info
.
{
"data_source_id": "ds-123456789012",
"domain_id": "domain-123456789012"
}
{
"data_source_id": "ds-89f1e81528e9",
"name": "AWS CloudTrail",
"state": "ENABLED",
"monitoring_type": "LOG",
"provider": "aws",
"capability": {
"use_resource_secret": true,
"supported_schema": [
"aws_access_key",
"aws_assume_role"
],
"monitoring_type": "LOG"
},
"plugin_info": {
"plugin_id": "plugin-9881b9b440a4",
"version": "1.0-dev2",
"options": {},
"provider": "aws",
"metadata": {
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
],
"required_keys": [
"reference.resource_id"
]
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123456789012",
"created_at": "2021-03-31T08:39:45.532Z"
}
list
GET /monitoring/v1/data-sources
POST /monitoring/v1/data-sources/search
Gets a list of all DataSources. You can use a query to get a filtered list of DataSources.
{
"query": {},
"domain_id": "domain-123456789012"
}
{
"results": [
{
"data_source_id": "ds-89f1e81528e9",
"name": "AWS CloudTrail",
"state": "ENABLED",
"monitoring_type": "LOG",
"provider": "aws",
"capability": {
"use_resource_secret": true,
"monitoring_type": "LOG",
"supported_schema": [
"aws_access_key",
"aws_assume_role"
]
},
"plugin_info": {
"plugin_id": "plugin-9881b9b440a4",
"version": "1.0-dev2",
"options": {},
"provider": "aws",
"metadata": {
"required_keys": [
"reference.resource_id"
],
"supported_resource_type": [
"inventory.Server",
"inventory.CloudService"
]
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123456789012",
"created_at": "2021-03-31T08:39:45.532Z"
}
],
"total_count": 2
}
stat
POST /monitoring/v1/data-sources/stat
Message
DataSourceInfo
DataSourcePluginInfo
DataSourceQuery
Field
Type
Required
Description
DataSourceRequest
Field
Type
Required
Description
DataSourceStatQuery
Field
Type
Required
Description
DataSourcesInfo
GetDataSourceRequest
Field
Type
Required
Description
RegisterDataSourceRequest
Field
Type
Required
Description
UpdateDataSourcePluginRequest
Field
Type
Required
Description
UpdateDataSourceRequest
Field
Type
Required
Description