cloudforet-apis
  • README
  • content
    • en
      • Cloudforet API Documentation
      • board
        • _index
        • v1
          • Board
          • Post
          • v1
      • config
        • _index
        • v1
          • DomainConfig
          • PublicConfig
          • UserConfig
          • WorkspaceConfig
          • v1
      • core
        • _index
        • v1
          • Handler
          • Query
          • ServerInfo
          • v1
        • v2
          • Handler
          • Plugin
          • Query
          • v2
      • cost_analysis
        • _index
        • plugin
          • Cost
          • DataSource
          • Job
          • plugin
        • v1
          • Budget
          • BudgetUsage
          • Cost
          • CostQuerySet
          • CostReport
          • CostReportConfig
          • CostReportData
          • CustomWidget
          • DataSource
          • DataSourceAccount
          • DataSourceRule
          • ExchangeRate
          • Job
          • JobTask
          • PublicDashboard
          • Schedule
          • UnifiedCost
          • UserDashboard
          • v1
      • dashboard
        • _index
        • v1
          • CustomWidget
          • Dashboard
          • DomainDashboard
          • PrivateDashboard
          • PrivateDataTable
          • PrivateFolder
          • PrivateWidget
          • ProjectDashboard
          • PublicDashboard
          • PublicDataTable
          • PublicFolder
          • PublicWidget
          • v1
      • file_manager
        • _index
        • v1
          • File
          • PublicFile
          • v1
      • identity
        • _index
        • plugin
          • AccountCollector
          • Auth
          • ExternalAuth
          • plugin
        • v1
          • ApiKey
          • Authorization
          • Domain
          • DomainOwner
          • Endpoint
          • Policy
          • Project
          • ProjectGroup
          • Provider
          • Role
          • RoleBinding
          • ServiceAccount
          • Token
          • User
          • v1
        • v2
          • Agent
          • ApiKey
          • App
          • Authorization
          • Domain
          • Endpoint
          • ExternalAuth
          • Job
          • Package
          • Policy
          • Project
          • ProjectGroup
          • Provider
          • Role
          • RoleBinding
          • Schema
          • ServiceAccount
          • System
          • Token
          • TrustedAccount
          • TrustedServiceAccount
          • User
          • UserGroup
          • UserProfile
          • Workspace
          • WorkspaceGroup
          • WorkspaceGroupDetails
          • WorkspaceGroupUser
          • WorkspaceUser
          • v2
      • inventory
        • _index
        • plugin
          • Collector
          • Job
          • plugin
        • v1
          • ChangeHistory
          • CloudService
          • CloudServiceQuerySet
          • CloudServiceReport
          • CloudServiceStats
          • CloudServiceType
          • Collector
          • CollectorRule
          • Job
          • JobTask
          • Metric
          • MetricData
          • MetricExample
          • Namespace
          • Note
          • Region
          • ResourceGroup
          • v1
        • v2
          • Region
          • v2
      • monitoring
        • _index
        • plugin
          • DataSource
          • Event
          • Log
          • Metric
          • Webhook
          • plugin
        • v1
          • Alert
          • DataSource
          • EscalationPolicy
          • Event
          • EventRule
          • Log
          • MaintenanceWindow
          • Metric
          • Note
          • ProjectAlertConfig
          • Webhook
          • v1
      • mzc_service_api
        • _index
        • v1
          • Contract
          • Offering
          • Organization
          • v1
      • notification
        • _index
        • plugin
          • Notification
          • Protocol
          • plugin
        • v1
          • Notification
          • NotificationUsage
          • ProjectChannel
          • Protocol
          • Quota
          • UserChannel
          • v1
      • opsflow
        • _index
        • v1
          • Comment
          • Event
          • Task
          • TaskCategory
          • TaskType
          • v1
      • plugin
        • _index
        • v1
          • Plugin
          • Supervisor
          • v1
      • repository
        • _index
        • v1
          • DashboardTemplate
          • Plugin
          • Policy
          • Repository
          • Schema
          • v1
        • v2
          • Common
          • Provider
          • RemoteRepository
          • Schema
          • v2
      • sample
        • _index
        • v1
          • Helloworld
          • v1
      • search
        • _index
        • v1
          • Resource
          • v1
      • secret
        • _index
        • v1
          • Secret
          • SecretGroup
          • TrustedSecret
          • UserSecret
          • v1
      • statistics
        • _index
        • plugin
          • Storage
          • plugin
        • v1
          • History
          • Resource
          • Schedule
          • Storage
          • v1
Powered by GitBook
On this page
  • Metric
  • list
  • get_data
  • Message
  • MetricDataInfo
  • MetricDataRequest
  • MetricInfo
  • MetricRequest
  • MetricsInfo
  1. content
  2. en
  3. monitoring
  4. v1

Metric

PreviousMaintenanceWindowNextNote

Last updated 1 year ago

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

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.

POST /monitoring/v1/metric/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

  • data_source_id (string) Required

  • resources (string) Repeated Required

{{< highlight json >}} { "data_source_id": "ds-31190a65a42a", "resources": ["cloud-svc-cd0105d255da"], "domain_id": "domain-58010aa2e451" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • metrics (MetricInfo) Repeated Required

  • available_resources (Struct) Required

  • domain_id (string) Required

{{< highlight json >}} { "metrics": [ { "key": "CPUUtilization", "group": "AWS/EC2", "name": "CPUUtilization", "unit": { "y": "Percent", "x": "Timestamp" }, "metric_query": { "cloud-svc-cd0105d255da": { "Dimensions": [ { "Name": "InstanceId", "Value": "i-0400cdd39f1a4d5e9" } ], "MetricName": "CPUUtilization", "Namespace": "AWS/EC2" } } }, { "key": "NetworkIn", "group": "AWS/EC2", "name": "NetworkIn", "unit": { "y": "Bytes", "x": "Timestamp" }, "metric_query": { "cloud-svc-cd0105d255da": { "Dimensions": [ { "Name": "InstanceId", "Value": "i-0400cdd39f1a4d5e9" } ], "MetricName": "NetworkIn", "Namespace": "AWS/EC2" } } } ], "available_resources": { "cloud-svc-cd0105d255da": true }, "domain_id": "domain-31190a65a42a" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

get_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.

POST /monitoring/v1/metric/get-data

{{< tabs " get_data " >}}

{{< tab "Request Example" >}}

  • data_source_id (string) Required

  • metric_query (Struct) Required

  • metric (string) Required

  • start (string) Required

  • end (string) Required

  • period (int32)

  • stat (string)

{{< highlight json >}} { "data_source_id": "ds-31190a65a42a", "metric_query": { "cloud-svc-cd0105d255da": { "Dimensions": [ { "Name": "InstanceId", "Value": "i-0400cdd39f1a4d5e9" } ], "MetricName": "CPUUtilization", "Namespace": "AWS/EC2" } }, "metric": "CPUUtilization", "start": "2022-06-21T03:11:29.438Z", "end": "2022-06-21T04:11:29.438Z", "stat": "AVERAGE", "domain_id": "domain-58010aa2e451" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

  • labels (ListValue) Required

  • values (Struct) Required

  • domain_id (string) Required

{{< highlight json >}} { "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" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

Message

MetricDataInfo

  • labels (ListValue) Required

  • values (Struct) Required

  • domain_id (string) Required

MetricDataRequest

  • data_source_id (string) Required

  • metric_query (Struct) Required

  • metric (string) Required

  • start (string) Required

  • end (string) Required

  • period (int32)

  • stat (string)

MetricInfo

  • key (string) Required

  • name (string) Required

  • group (string) Required

  • unit (Struct) Required

  • metric_query (Struct) Required

MetricRequest

  • data_source_id (string) Required

  • resources (string) Repeated Required

MetricsInfo

  • metrics (MetricInfo) Repeated Required

  • available_resources (Struct) Required

  • domain_id (string) Required

MetricRequest
MetricDataRequest
MetricsInfo
MetricDataInfo
list
MetricRequest
MetricsInfo
get_data
MetricDataRequest
MetricDataInfo