Custom metrics and logs
ServiceWatch can collect 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.
The first method is to install the ServiceWatch Agent directly on the resource, configure the resources to be collected, and then collect them.
The second method allows you to collect custom metrics and logs via the OpenAPI/CLI provided by ServiceWatch.
The ServiceWatch metrics API incurs a cost per call. Collecting metrics via the ServiceWatch Agent also operates on an OpenAPI basis, so there is a cost associated with metric API calls.
Caution is required to avoid excessive API calls for metric and log collection. The billing target metric APIs are listed below.
| API | Explanation |
|---|---|
| ListMetricData | Retrieve metric data list.
|
| DownloadMetricDataImage | Indicator data widget image download.
|
| ListMetricInfos | Metric data retrieval.
|
| CreateCustomMetricMetas | Create custom metric metadata
|
| CreateCustomMetrics | Custom metric data creation (transmission)
|
| ShowDashboard | Dashboard view
|
| ListDashboards | Retrieve dashboard list
|
| CreateDashboard | Create dashboard
|
| SetDashboard | Dashboard edit
|
| DeleteBulkDashboards | Delete dashboard
|
Since logs incur charges based on the amount collected, there are no additional fees for API calls.
※ For detailed pricing information, refer to the ServiceWatch pricing details on the Samsung Cloud Platform Service Portal.
ServiceWatch Agent
You can install the ServiceWatch Agent on user resources such as Virtual Server, GPU Server, Bare Metal Server, etc., to collect custom metrics and logs.
ServiceWatch Agent Constraints
ServiceWatch Agent Network Environment
The ServiceWatch Agent is designed to collect data using OpenAPI by default, and therefore, to be installed and used on server resources, it must be able to communicate externally via the Internet. Please create an Internet Gateway in the VPC where the resources are located and configure a NAT IP for the server resources so they can communicate with the external network.
ServiceWatch Agent supported OS Image
The OS images available for the ServiceWatch Agent are as follows.
| OS Image version | EOS Date |
|---|---|
| Alma Linux 8.10 | 2029-05-31 |
| Alma Linux 9.6 | 2025-11-17 |
| Oracle Linux 8.10 | 2029-07-31 |
| Oracle Linux 9.6 | 2025-11-25 |
| RHEL 8.10 | 2029-05-31 |
| RHEL 9.4 | 2026-04-30 |
| RHEL 9.6 | 2027-05-31 |
| Rocky Linux 8.10 | 2029-05-31 |
| Rocky Linux 9.6 | 2025-11-30 |
| Ubuntu 22.04 | 2027-06-30 |
| Ubuntu 24.04 | 2029-06-30 |
| Windows 2019 | 2029-01-09 |
| Windows 2022 | 2031-10-14 |
It is provided identically to the OS image provided by the Virtual Server. Please refer to the Virtual Server > OS Image 제공 버전.
Quick Guide for Using ServiceWatch Agent
Below, we introduce a quick guide for collecting OS metrics and logs of a Virtual Server in a Linux environment.
Installing and Configuring Node Exporter
- Refer to Node Exporter 설치 to install Node Exporter on the server for collecting custom metrics.
- When you install Node Exporter, you can collect OS metrics through Node Exporter in addition to the metrics provided by ServiceWatch’s default monitoring.
- Refer to ServiceWatch Agent 설정, download the ServiceWatch_Agent archive, and then configure and run ServiceWatch Manager.
- By referring to the examples/os-metric-min-examples folder in the archive, you can run the ServiceWatch Agent by configuring at least two metrics.
Collecting metrics through the ServiceWatch Agent is classified as custom metrics, and unlike the default metrics gathered from each service, it incurs charges, so you should be careful not to configure unnecessary metric collection. Make sure to configure it so that only the metrics that need to be collected are collected.
- Free provision is available up to 10 per Account/region.
ServiceWatch custom metrics and logs API
You can collect custom metrics and logs using the OpenAPI/CLI provided by ServiceWatch.
You can deliver custom metric data and custom logs to ServiceWatch via the ServiceWatch OpenAPI/CLI, and view the visualized information in the Console.
Collecting metrics through ServiceWatch OpenAPI/CLI is classified as custom metrics, and unlike the default metrics gathered from each service, it incurs charges, so you should be careful not to configure unnecessary metric collection. Make sure to configure it so that only the metrics that need to be collected are collected.
- Free provision is available up to 10 per Account/region.
Create custom metric metadata
To collect metric data generated from a user’s resources or applications—not the metrics provided by Samsung Cloud Platform services (e.g., Virtual Server)—into ServiceWatch, you must create custom metric metadata.
| Parameter | Explanation |
|---|---|
| namespace | Users can define a namespace in ServiceWatch that distinguishes it from other metrics
|
| metricMetas > metricName | Set the name of the metric to be collected. The metric name must be 3 to 128 characters long, consisting of letters, numbers, and special characters (_), and must start with a letter.
|
| metricMetas > storageResolution | Set the collection interval for the relevant metric. The default is 60 (1 minute) and can be configured in seconds. |
| metricMetas > unit | Ability to set the unit of the metric
|
| metricMetas > dimensions | You can set dimensions to identify custom metric data and visualize it in the Console. When visualizing collected metrics in the Console, they are displayed in combinations based on the dimension (dimensions) settings. |
| metricMetas > descriptionKo | Korean description of the collected metrics |
| metricMetas > descriptionEn | English description of the metrics being collected |
For detailed information on creating custom metric metadata, see CreateCustomMetricMetas.
Create custom metric
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 generating custom metric data, see CreateCustomMetrics.
Indicator Data Query
Metric data, including custom metrics, can be retrieved using the Console and the ListMetricInfos, ListMetricInfos API.
For detailed information on retrieving metric data, refer to ListMetricInfos and ListMetricData.
Create log stream
A ServiceWatch log group is required for custom log collection. Log groups can only be created in the Console. You can create a log stream for delivery to ServiceWatch by first creating a log group and then using the log stream creation API.
For detailed information on creating a log stream, refer to CreateCustomLogStream.
Create log event
To collect custom logs, after creating a log group and log stream, 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.