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.
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.
| API | description |
|---|---|
| ListMetricData | Metric data list retrieval.
|
| DownloadMetricDataImage | Metric data widget image download.
|
| ListMetricInfos | Retrieve metric data.
|
| CreateCustomMetricMetas | Create custom metric meta data
|
| CreateCustomMetrics | Create custom metric data (transmission)
|
| ShowDashboard | Dashboard view
|
| ListDashboards | Dashboard list retrieval
|
| CreateDashboard | Create Dashboard
|
| SetDashboard | Edit Dashboard
|
| DeleteBulkDashboards | Delete Dashboard
|
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 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 |
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
- 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.
- 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.
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.
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.
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.
| Parameter | Explanation |
|---|---|
| namespace | Users can define a namespace in ServiceWatch that can be distinguished from other metrics
|
| metricMetas > metricName | Set 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.
|
| metricMetas > storageResolution | Set the collection interval for the corresponding metric. The default is 60 (1 minute) and can be set in seconds |
| metricMetas > unit | Metric unit can be set
|
| metricMetas > dimensions | You 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 > descriptionKo | Korean description of the metric being collected |
| metricMetas > descriptionEn | English description of the metric being collected |
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.