The page has been translated by Gen AI.

Custom Metrics and Logs

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

Custom metrics and logs can be collected in the following two ways.

Collection MethodsDetailed Description
ServiceWatch AgentInstall the Agent directly on the resource and configure the metrics and logs to collect.
ServiceWatch Custom Metrics and Logs APICollected through the OpenAPI/CLI provided by ServiceWatch
Table. Custom metrics and log collection methods
Notice
When collecting custom metrics or logs using the ServiceWatch Agent, contact us separately for the kr-south3 region by referring to Support Center > Inquiry.
Notice
When using the ServiceWatch Agent or ServiceWatch OpenAPI through a NAT Gateway or Internet Gateway in the kr-south1 or kr-south2 regions, you must separately request firewall release.
To request firewall release, submit a request via Support Center > Inquiry.
Warning
The ServiceWatch metrics API incurs a cost for each call. Metric collection through the ServiceWatch Agent also operates on an OpenAPI basis, incurring costs for metric API calls. Be careful not to make excessive API calls for metrics and log collection. For billable APIs, refer to Billable Metrics API.

Billable Metrics API

The following metrics APIs are billed when collecting custom metrics and logs. ListMetricData and DownloadMetricDataImage are always billed without a free tier, while all other APIs are free up to 1,000,000 calls per month.

APIDescriptionBilling unitProvided for free
ListMetricDataRetrieve the list of metric dataPer 1,000 requested metricsNone
DownloadMetricDataImageDownload metric data widget imagePer 1,000 requested metricsNone
ListMetricInfosQuery metric dataPer 1,000 calls1,000,000 per month
CreateCustomMetricMetasCreate custom metric metadataPer 1,000 calls1,000,000 per month
CreateCustomMetricsGenerate (Send) Custom Metric DataPer 1,000 calls1,000,000 per month
ShowDashboardView DashboardPer 1,000 calls1,000,000 per month
ListDashboardsRetrieve dashboard listPer 1,000 calls1,000,000 per month
CreateDashboardCreate DashboardPer 1,000 calls1,000,000 per month
SetDashboardEdit DashboardPer 1,000 calls1,000,000 per month
DeleteBulkDashboardsDelete DashboardPer 1,000 calls1,000,000 per month
Table. Billable Metric API
  • Direct API calls, the user console, and the ServiceWatch Agent also use the ServiceWatch API and are therefore included in API calls.
  • When making ListMetricData and DownloadMetricDataImage API requests, you can include up to 500 metrics per request, and billing is based on the number of requested metrics rather than the number of API requests.
  • APIs other than ListMetricData and DownloadMetricDataImage are billed based on the number of API requests, with the first 1,000,000 requests per month free of charge.
    • CreateCustomMetricMetas is called once when configuring custom metric collection.
    • CreateCustomMetrics is called to send metric data to ServiceWatch at 1-minute intervals.
  • Logs are billed based on the collected volume, so no additional charges are applied for API calls.

For detailed pricing information, refer to the ServiceWatch pricing information in the Samsung Cloud Platform Service Portal.

ServiceWatch Agent

You can install the ServiceWatch Agent on user resources such as Virtual Servers, GPU Servers, and Bare Metal Servers to collect custom metrics and logs.

ServiceWatch Agent Network Environment

The ServiceWatch Agent is designed to send collected metrics and logs using OpenAPI. Therefore, a network environment that can communicate with the ServiceWatch OpenAPI endpoint from server resources is required, and one of the following two methods is used.

  • How to Use an Internet Gateway: Create an Internet Gateway in the VPC where the resources are located, and configure a NAT IP on the server resources to enable communication with external networks.
  • How to Use PrivateLink: Create a PrivateLink Endpoint in the VPC to communicate over the internal network without going through the internet.

For the configuration procedures and supported actions for each method, refer to Pre-Environment Configuration for ServiceWatch Agent.

Supported OS Images for ServiceWatch Agent

The following OS images are available for the ServiceWatch Agent.

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. Supported OS Images for the ServiceWatch Agent

It is provided in the same manner as the OS image for the virtual server. See Virtual Server > OS Image provided versions.

Quick Guide for Using the ServiceWatch Agent

The following is a quick guide for collecting OS metrics and logs for Virtual Servers in a Linux environment.

  1. Refer to Installing Node Exporter to install Node Exporter on the server for collecting custom metrics.
    • Installing Node Exporter allows ServiceWatch to collect OS metrics through Node Exporter, in addition to the metrics provided by default monitoring.
  2. Refer to ServiceWatch Agent Configuration to download the ServiceWatch_Agent archive, then configure and run the ServiceWatch Agent Manager.
    • Refer to the os-metrics-min-examples folder in the compressed file to configure the minimum metrics (4) and run the ServiceWatch Agent.
Warning

Metric collection through the ServiceWatch Agent is categorized as custom metrics and is subject to charges, unlike the default metrics collected from each service. Therefore, be careful not to configure unnecessary metric collection. Configure the system to collect only the metrics that are essential.

  • Free provision is available for up to 10 per account/region.
Reference
For details on using the ServiceWatch Agent, see How-to guides > Using the ServiceWatch Agent.

ServiceWatch Custom Metrics and Logs API

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

You can send custom metric data and custom logs to ServiceWatch via the ServiceWatch OpenAPI/CLI and view the visualized information in the Console.

Warning

Metric collection via ServiceWatch OpenAPI/CLI is billed as custom metrics, unlike the default metrics collected from each service. Therefore, be careful not to configure unnecessary metric collection. Configure the system to collect only the metrics that are essential.

  • Free tier: Up to 10 per account/region.

Custom Metrics API

Create Custom Metric Metadata

To collect metric data generated by user resources or applications, rather than metrics provided by Samsung Cloud Platform services (such as Virtual Server), you must create custom metric metadata in ServiceWatch.

ParameterDescription
namespaceIn ServiceWatch, users can define a namespace to distinguish it from other metrics.
A namespace must be 3 to 128 characters long, start with an English letter, and can include letters, numbers, spaces, and special characters (_- /).
For more information, see Namespace.
metricMetas > metricNameSet the name of the metric to collect. The metric name must be 3 to 128 characters long, start with an English letter, and may include letters, numbers, and special characters (_).
  • Example: custom_cpu_seconds_total
metricMetas > storageResolutionSets the collection interval for the specified metric. The default value is 60 (1 minute), and the interval can be configured in seconds.
metricMetas > unitYou can set the unit for a metric.
  • Example: Bytes, Count, etc.
metricMetas > dimensionsTo identify custom metric data, configure dimensions to visualize and display it in the Console. When visualizing collected metrics in the Console, they are displayed in combinations based on the configured dimensions.
metricMetas > descriptionKoKorean description of the metrics being collected
metricMetas > descriptionEnEnglish description of the metrics being collected
Table. Custom metric metadata parameter descriptions

For details on creating custom metric metadata, see CreateCustomMetricMetas.

Create Custom Metrics

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

The delivered metric data can be queried by the configured namespace.

For details on creating custom metric data, see CreateCustomMetrics.

Querying Metrics Data

You can query metric data, including custom metrics, by using the Console and the ListMetricInfos and ListMetricData APIs.

For details on querying metric data, refer to ListMetricInfos and ListMetricData.

Custom Log API

Create a Log Stream

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 Create Log Stream API to create a log stream to be sent to ServiceWatch.

For details on creating a log stream, see CreateCustomLogStream.

Create a log event

To send individual log messages (log events) to ServiceWatch for custom log collection, use the log event creation API after creating a log group and a log stream.

For details on creating log events, see CreateCustomLogEvents.

ServiceWatch integration service
How-to guides