The page has been translated by Gen AI.

Custom Metrics and Logs

ServiceWatch can collect user-defined custom metrics defined by the user and can collect log files from resources created by the user.

There are two ways to collect custom metrics and logs.

First, you can install the ServiceWatch Agent directly on the resource, set the resources to be collected, and collect them.
The second is that you can collect custom metrics and logs through the OpenAPI/CLI provided by ServiceWatch.

Reference
Custom metric/log collection via ServiceWatch Agent is currently only available on Samsung Cloud Platform For Enterprise. It will be offered in other offerings in the future.
Caution

ServiceWatch’s metric API incurs costs for calls. Collecting metrics via the ServiceWatch Agent also operates on an OpenAPI basis, so metric API calls incur costs.
Caution is needed to avoid excessive API calls for metric and log collection. The billable metric APIs are as follows.

APIdescription
ListMetricDataMetric data list retrieval.
  • Since a single API call can request multiple metrics, charges are applied per 1,000 metric requests.
DownloadMetricDataImageMetric data widget image download.
  • Since a single API call can request multiple metrics, a charge is applied per 1,000 requested metrics.
ListMetricInfosRetrieve metric data.
  • Charges apply per 1,000 calls of this API
CreateCustomMetricMetasCreate custom metric meta data
  • This API is charged per 1,000 calls
CreateCustomMetricsCreate custom metric data (transmission)
  • This API is charged per 1,000 calls
ShowDashboardDashboard view
  • This API charges a fee per 1,000 calls
ListDashboardsDashboard list retrieval
  • This API is charged per 1,000 calls
CreateDashboardCreate Dashboard
  • This API is charged per 1,000 calls
SetDashboardEdit Dashboard
  • This API is charged per 1,000 calls
DeleteBulkDashboardsDelete Dashboard
  • This API is charged per 1,000 calls
Table. Indicator API Billing Guide

Logs incur charges based on the amount of data collected, so there is no separate charge for API calls.

※ For detailed pricing information, please refer to the ServiceWatch pricing information on the Samsung Cloud Platform Service Portal.

ServiceWatch Agent

You can install the ServiceWatch Agent on the user’s resources such as Virtual Server/GPU Server/Bare Metal Server to collect custom metrics and logs.

ServiceWatch Agent Constraints

ServiceWatch Agent Network Environment

ServiceWatch Agent is designed to collect data using OpenAPI by default, so to install and use it on server resources, external communication via the Internet must be possible. Please create an Internet Gateway in the VPC where the resources are located and set a NAT IP on the server resources so that they can communicate with the outside.

ServiceWatch Agent Supported OS Image

The OS images available for ServiceWatch Agent are as follows.

OS Image VersionEOS Date
Alma Linux 8.102029-05-31
Alma Linux 9.62025-11-17
Oracle Linux 8.102029-07-31
Oracle Linux 9.62025-11-25
RHEL 8.102029-05-31
RHEL 9.42026-04-30
RHEL 9.62027-05-31
Rocky Linux 8.102029-05-31
Rocky Linux 9.62025-11-30
Ubuntu 22.042027-06-30
Ubuntu 24.042029-06-30
Windows 20192029-01-09
Windows 20222031-10-14
Table. ServiceWatch Agent usable OS Image

Provides the same as the OS Image provided by Virtual Server. Please refer to Virtual Server > OS Image provided version.

Quick Guide for Using ServiceWatch Agent

Below, we introduce a quick guide for collecting OS metrics and logs of Virtual Server in a Linux environment.

Node Exporter Installation and Configuration

  1. Refer to Node Exporter installation and install Node Exporter on the server for collecting custom metrics.
    • If you install Node Exporter, you can collect OS metrics through Node Exporter in addition to the metrics provided by ServiceWatch’s default monitoring.
  2. ServiceWatch Agent Settings refer to and after downloading the ServiceWatch_Agent zip file, configure and run the ServiceWatch Manager.
    • Refer to the examples/os-metric-min-examples folder in the zip file to set at least two metrics and run the ServiceWatch Agent.
Caution

Metric collection via ServiceWatch Agent is classified as custom metrics and, unlike the metrics collected by default from each service, incurs charges, so you must be careful not to set up unnecessary metric collection. Ensure that only the metrics that need to be collected are collected.

  • Free provision is provided up to 10 per Account/region.
Note
For detailed information on using ServiceWatch Agent, please refer to How-to guides > Using ServiceWatch Agent.

ServiceWatch Custom Metrics and Logs API

You can collect custom metrics and logs through the OpenAPI/CLI provided by ServiceWatch.

Custom metric data and custom logs can be delivered to ServiceWatch via ServiceWatch OpenAPI/CLI, allowing you to view visualized information in the Console.

Caution

Collecting metrics via ServiceWatch OpenAPI/CLI is classified as custom metrics, and unlike the metrics that are collected by default from each service, charges apply, so you must be careful not to set up unnecessary metric collection. Make sure to configure it so that only the metrics that need to be collected are collected.

  • Free provision is provided up to 10 per Account/region.

Create Custom Metric Metadata

To collect metric data generated from user resources or applications, rather than metrics provided by Samsung Cloud Platform services (e.g., Virtual Server), into ServiceWatch, you need to create custom metric metadata.

ParameterExplanation
namespaceUsers can define a namespace in ServiceWatch that can be distinguished from other metrics
  • The namespace must be 3 to 128 characters, including letters, numbers, spaces, and special characters (_-/), and must start with a letter.
  • For detailed information, refer to Namespace.
metricMetas > metricNameSet the name of the metric to be collected. The metric name must be 3 to 128 characters long, including English letters, numbers, and special characters (_), and must start with an English letter.
  • Example: custom_cpu_seconds_total
metricMetas > storageResolutionSet the collection interval for the corresponding metric. The default is 60 (1 minute) and can be set in seconds
metricMetas > unitMetric unit can be set
  • Example: Bytes, Count, etc.
metricMetas > dimensionsYou can set dimensions to identify custom metric data and visualize it in the Console. When visualizing the collected metrics in the Console, they are displayed in combinations according to the dimension (dimensions) settings.
metricMetas > descriptionKoKorean description of the metric being collected
metricMetas > descriptionEnEnglish description of the metric being collected
Table. User-defined metric metadata parameter description

For detailed information on creating custom metric metadata, see CreateCustomMetricMetas.

Create Custom Metrics

After generating custom metric metadata, you can deliver the resulting metric data to ServiceWatch using the CreateCustomMetrics API.

The transmitted metric data can be queried, separated by the configured namespace.

For detailed information on creating custom metric data, refer to CreateCustomMetrics.

Indicator Data Query

Metric data, including custom metrics, can be queried using the Console and the ListMetricInfos, ListMetricInfos API.

For detailed information on metric data retrieval, refer to ListMetricInfos and ListMetricData.

Log Stream Creation

A ServiceWatch log group is required for custom log collection. Log groups can only be created in the Console. After creating a log group in advance, you can use the log stream creation API to create a log stream to be delivered to ServiceWatch.

For detailed information on creating a log stream, refer to CreateCustomLogStream.

Log Event Creation

To collect custom logs, after creating log groups and log streams, we use the log event creation API to deliver individual log messages (log events) to ServiceWatch.

For detailed information on creating log events, refer to CreateCustomLogEvents.

ServiceWatch linked service
How-to guides