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
  • Metric
  • list
  • get_data
  • Message
  • MetricDataInfo
  • MetricDataRequest
  • MetricInfo
  • MetricRequest
  • MetricsInfo

Was this helpful?

  1. Monitoring
  2. V1

Metric

A Metric is a monitoring metric of a specific cloud service delivered from a DataSource.

Package : spaceone.api.monitoring.v1

Metric

Metric Methods:

Method
Request
Response

list

GET /monitoring/v1/data-source/{data_source_id}/metrics

Gets a list of all Metrics of one or more specified Resources. The parameter resources is a list of Resources from which to get a list of Metrics collected.

Type
Message

Request

Response

{
    "data_source_id": "ds-31190a65a42a",
    "resource_type": "inventory.CloudService",
    "resources": [
        "cloud-svc-cd0105d255da"
    ],
    "domain_id": "domain-58010aa2e451"
}
{
    "metrics": [
        {
            "key": "AWS/EC2.CPUUtilization",
            "name": "CPUUtilization",
            "unit": {
                "y": "Percent",
                "x": "Timestamp"
            },
            "chart_type": "line",
            "chart_options": {}
        },
        {
            "key": "AWS/EC2.NetworkIn",
            "name": "NetworkIn",
            "unit": {
                "y": "Bytes",
                "x": "Timestamp"
            },
            "chart_type": "line",
            "chart_options": {}
        }
    ],
    "available_resources": {
        "cloud-svc-cd0105d255da": true
    },
    "domain_id": "domain-58010aa2e451"
}

get_data

GET /monitoring/v1/data-source/{data_source_id}/metric-data

Gets data of a single Metric. You must specify the parameter metric to get data of. You can specify the period to get data for.

Type
Message

Request

Response

{
    "data_source_id": "ds-31190a65a42a",
    "resource_type": "inventory.CloudService",
    "resources": [
        "cloud-svc-cd0105d255da"
    ],
    "metric": "AWS/EC2.CPUUtilization",
    "start": "2022-06-21T03:11:29.438Z",
    "end": "2022-06-21T04:11:29.438Z",
    "stat": "AVERAGE",
    "domain_id": "domain-58010aa2e451"
}
{
    "labels": [
        "2022-06-21T03:13:00.000Z",
        "2022-06-21T03:18:00.000Z",
        "2022-06-21T03:23:00.000Z",
        "2022-06-21T03:28:00.000Z",
        "2022-06-21T03:33:00.000Z",
        "2022-06-21T03:38:00.000Z",
        "2022-06-21T03:43:00.000Z",
        "2022-06-21T03:48:00.000Z",
        "2022-06-21T03:53:00.000Z",
        "2022-06-21T03:58:00.000Z",
        "2022-06-21T04:03:00.000Z",
        "2022-06-21T04:08:00.000Z"
    ],
    "resource_values": {
        "cloud-svc-cd0105d255da": [
            0.099999999999999,
            0.10001852366397981,
            0.10001852366397981,
            0.1328230362675432,
            0.099472075576548,
            0.06507936507936621,
            0.166703713994628,
            0.1338983050847476,
            0.1327868852458988,
            0.1339168287487284,
            0.1328610417160508,
            0.10056497175141618
        ]
    },
    "domain_id": "domain-58010aa2e451"
}

Message

MetricDataInfo

Field
Type
Description

labels

values

domain_id

string

MetricDataRequest

Field
Type
Required
Description

data_source_id

string

✔

metric_query

✔

metric

string

✔

start

string

✔

end

string

✔

period

✘

stat

string

✘

domain_id

string

✔

MetricInfo

Field
Type
Description

key

string

name

string

group

string

unit

metric_query

MetricRequest

Field
Type
Required
Description

data_source_id

string

✔

resources

list of string

✔

domain_id

string

✔

MetricsInfo

Field
Type
Description

metrics

available_resources

domain_id

string

PreviousMaintenance WindowNextNote

Last updated 2 years ago

Was this helpful?

google.protobuf.ListValue
google.protobuf.Struct
google.protobuf.Struct
int32
google.protobuf.Struct
google.protobuf.Struct
google.protobuf.Struct
list
MetricRequest
MetricsInfo
get_data
MetricDataRequest
MetricDataInfo
MetricRequest
MetricsInfo
MetricDataRequest
MetricDataInfo
list of MetricInfo