SpaceONE APIs
Latest Version
Latest Version
  • README
  • Board
    • V1
      • Board
      • Post
  • Config
    • V1
      • Domain Config
      • User Config
  • Core
    • V1
      • Handler
      • Query
      • Server Info
  • Cost Analysis
    • Plugin
      • Cost
      • Data Source
      • Job
    • V1
      • Budget
      • Budget Usage
      • Cost
      • Cost Query Set
      • Custom Widget
      • Data Source
      • Data Source Rule
      • Exchange Rate
      • Job
      • Job Task
      • Public Dashboard
      • Schedule
      • User Dashboard
  • Identity
    • Plugin
      • Auth
    • V1
      • Api Key
      • Authorization
      • Domain
      • Domain Owner
      • Endpoint
      • Policy
      • Project
      • Project Group
      • Provider
      • Role
      • Role Binding
      • Service Account
      • Token
      • User
  • Inventory
    • Plugin
      • Collector
    • V1
      • Change History
      • Cloud Service
      • Cloud Service Type
      • Collector
      • Job
      • Job Task
      • Note
      • Region
      • Resource Group
      • Server
  • Monitoring
    • Plugin
      • Data Source
      • Event
      • Log
      • Metric
      • Webhook
    • V1
      • Alert
      • Data Source
      • Escalation Policy
      • Event
      • Event Rule
      • Log
      • Maintenance Window
      • Metric
      • Note
      • Project Alert Config
      • Webhook
  • Notification
    • Plugin
      • Notification
      • Protocol
    • V1
      • Notification
      • Notification Usage
      • Project Channel
      • Protocol
      • Quota
      • User Channel
  • Plugin
    • V1
      • Plugin
      • Supervisor
  • Repository
    • V1
      • Plugin
      • Policy
      • Repository
      • Schema
  • Sample
    • V1
      • Helloworld
  • Secret
    • V1
      • Secret
      • Secret Group
  • Statistics
    • Plugin
      • Storage
    • V1
      • History
      • Resource
      • Schedule
      • Storage
Powered by GitBook
On this page
  • DataSource
  • register
  • update
  • enable
  • disable
  • deregister
  • update_plugin
  • verify_plugin
  • get
  • list
  • stat
  • Message
  • DataSourceInfo
  • DataSourcePluginInfo
  • DataSourceQuery
  • DataSourceRequest
  • DataSourceStatQuery
  • DataSourcesInfo
  • GetDataSourceRequest
  • RegisterDataSourceRequest
  • UpdateDataSourcePluginRequest
  • UpdateDataSourceRequest

Was this helpful?

  1. Monitoring
  2. V1

Data Source

A DataSource is a plugin instance collecting `metric` and `log` data from Cloudforet.

Package : spaceone.api.monitoring.v1

DataSource

DataSource Methods:

Method
Request
Response

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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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.

Type
Message

Request

Response

{
    "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

Type
Message

Request

Response

Message

DataSourceInfo

Field
Type
Description

data_source_id

string

name

string

state

  • NONE

  • ENABLED

  • DISABLED

monitoring_type

  • NONE

  • METRIC

  • LOG

provider

string

capability

plugin_info

tags

domain_id

string

created_at

string

DataSourcePluginInfo

Field
Type
Description

plugin_id

string

version

string

options

metadata

upgrade_mode

  • NONE

  • MANUAL

  • AUTO

secret_id

string

provider

string

DataSourceQuery

Field
Type
Required
Description

query

✘

data_source_id

string

✘

name

string

✘

state

string

✘

monitoring_type

  • NONE

  • METRIC

  • LOG

✘

provider

string

✘

domain_id

string

✔

DataSourceRequest

Field
Type
Required
Description

data_source_id

string

✔

domain_id

string

✔

DataSourceStatQuery

Field
Type
Required
Description

query

✔

domain_id

string

✔

DataSourcesInfo

Field
Type
Description

results

total_count

GetDataSourceRequest

Field
Type
Required
Description

data_source_id

string

✔

domain_id

string

✔

only

list of string

✘

RegisterDataSourceRequest

Field
Type
Required
Description

name

string

✔

plugin_info

✔

tags

✘

domain_id

string

✔

UpdateDataSourcePluginRequest

Field
Type
Required
Description

data_source_id

string

✔

version

string

✘

options

✘

upgrade_mode

  • NONE

  • MANUAL

  • AUTO

✘

domain_id

string

✔

UpdateDataSourceRequest

Field
Type
Required
Description

data_source_id

string

✔

name

string

✘

tags

✘

domain_id

string

✔

PreviousAlertNextEscalation Policy

Last updated 2 years ago

Was this helpful?

google.protobuf.Empty
google.protobuf.Empty
google.protobuf.Struct
google.protobuf.Empty
google.protobuf.Empty
google.protobuf.Struct
google.protobuf.Struct
google.protobuf.Struct
google.protobuf.Struct
google.protobuf.Struct
spaceone.api.core.v1.Query
spaceone.api.core.v1.StatisticsQuery
int32
google.protobuf.Struct
google.protobuf.Struct
google.protobuf.Struct
register
RegisterDataSourceRequest
DataSourceInfo
update
UpdateDataSourceRequest
DataSourceInfo
enable
DataSourceRequest
DataSourceInfo
disable
DataSourceRequest
DataSourceInfo
deregister
DataSourceRequest
update_plugin
UpdateDataSourcePluginRequest
DataSourceInfo
verify_plugin
DataSourceRequest
get
GetDataSourceRequest
DataSourceInfo
list
DataSourceQuery
DataSourcesInfo
stat
DataSourceStatQuery
RegisterDataSourceRequest
DataSourceInfo
UpdateDataSourceRequest
DataSourceInfo
DataSourceRequest
DataSourceInfo
DataSourceRequest
DataSourceInfo
DataSourceRequest
UpdateDataSourcePluginRequest
DataSourceInfo
DataSourceRequest
GetDataSourceRequest
DataSourceInfo
DataSourceQuery
DataSourcesInfo
DataSourceStatQuery
DataSourcePluginInfo
list of DataSourceInfo
DataSourcePluginInfo