The page has been translated by Gen AI.

Installing ServiceWatch Agent

Users can install the ServiceWatch Agent on a Virtual Server to collect custom metrics and logs.

Note
Collecting custom metrics/logs via the ServiceWatch Agent is currently only available on Samsung Cloud Platform for Enterprise. It will be offered for other offerings in the future.
Caution
Metrics collected via the ServiceWatch Agent are considered custom metrics and incur charges, unlike the default metrics collected from each service. Therefore, it is recommended to remove or disable unnecessary metric collection settings.

ServiceWatch Agent

The agents required to collect custom metrics and logs for ServiceWatch on a Virtual Server can be broadly divided into two types: Prometheus Exporter and Open Telemetry Collector.

CategoryDescription
Prometheus ExporterProvides metrics of a specific application or service in a format that Prometheus can scrape.
  • Depending on the OS, you can use the Node Exporter for Linux servers and the Windows Exporter for Windows servers.
Open Telemetry CollectorActs as a centralized collector that gathers telemetry data such as metrics and logs from distributed systems, processes them (filtering, sampling, etc.), and exports them to multiple backends (e.g., Prometheus, Jaeger, Elasticsearch).
  • Exports data to the ServiceWatch Gateway so that ServiceWatch can collect metric and log data.
Table. Description of Prometheus Exporter and Open Telemetry Collector

Prerequisites for Using ServiceWatch Agent

To use the ServiceWatch Agent, please refer to Prerequisite environment configuration for ServiceWatch Agent and prepare the necessary settings.

Installing Prometheus Exporter for Virtual Server (Linux)

Install the Prometheus Exporter on a Linux server following the steps below.

Installing Node Exporter

Install Node Exporter according to the steps below.

  1. Create Node Exporter User
  2. Node Exporter Configuration

Create Node Exporter User

Create a dedicated user to securely isolate the Node Exporter process.

Color mode
sudo useradd --no-create-home --shell /bin/false node_exporter
sudo useradd --no-create-home --shell /bin/false node_exporter
Code block. Node Exporter User creation command

Node Exporter Configuration

  1. Download Node Exporter for installation. The guide uses the following version:

    • Download path: /tmp
    • Version: 1.7.0
      Color mode
      cd /tmp
      wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz
      cd /tmp
      wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz
      Code block. Node Exporter download command
      Note
      The latest Node Exporter version can be found at Node Exporter > Releases > Latest, and specific versions are available at Node Exporter > Releases.
  2. Install the downloaded Node Exporter and set permissions on the executable.

    Color mode
    cd /tmp
    sudo tar -xvf node_exporter-1.7.0.linux-amd64.tar.gz -C /usr/local/bin --strip-components=1 node_exporter-1.7.0.linux-amd64/node_exporter
    cd /tmp
    sudo tar -xvf node_exporter-1.7.0.linux-amd64.tar.gz -C /usr/local/bin --strip-components=1 node_exporter-1.7.0.linux-amd64/node_exporter
    Code block. Node Exporter installation command
    Color mode
    sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
    sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
    Code block. Node Exporter permission setting command

  3. Create a service file. Configure Node Exporter to collect memory (meminfo) or block storage (filesystem) metrics.

    Color mode
    sudo vi /etc/systemd/system/node_exporter.service
    sudo vi /etc/systemd/system/node_exporter.service
    Code block. Open Node Exporter service file
    Color mode
    [Unit]
    Description=Prometheus Node Exporter (meminfo only)
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    User=node_exporter
    Group=node_exporter
    Type=simple
    ExecStart=/usr/local/bin/node_exporter \
      --collector.disable-defaults \    # Disable default collectors
      --collector.meminfo \             # Enable memory metrics
      --collector.filesystem            # Enable block storage filesystem metrics
    
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    [Unit]
    Description=Prometheus Node Exporter (meminfo only)
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    User=node_exporter
    Group=node_exporter
    Type=simple
    ExecStart=/usr/local/bin/node_exporter \
      --collector.disable-defaults \    # Disable default collectors
      --collector.meminfo \             # Enable memory metrics
      --collector.filesystem            # Enable block storage filesystem metrics
    
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    Code block. Node Exporter service file content
    Note
    • Collectors can be enabled or disabled using flags.

      • <code>--collector.{name}</code>: Enables a specific metric collector.
      • <code>--no-collector.{name}</code>: Disables a specific metric collector.
      • To disable all default metrics and enable only specific collectors, use <code>--collector.disable-defaults --collector.{name} ...</code>.
    • Below is a description of the main collectors.

    CollectorDescriptionLabels
    meminfoProvides memory statistics-
    filesystemProvides filesystem statistics such as used disk space
    • device: Physical or virtual device path where the filesystem is located (e.g., /dev/sda1)
    • fstype: Filesystem type (e.g., ext4, xfs, nfs, tmpfs)
    • mountpoint: Path where the filesystem is mounted on the host OS; serves as an intuitive way to distinguish disks (e.g., /, /var/lib/docker, /mnt/data)
    Table. Description of main Node Exporter collectors
    • For detailed information on available metrics and configuration, see the Node Exporter > Collector page.
    • Available metrics may vary depending on the version of Node Exporter you use. See the Node Exporter repository.

Caution
Metrics collected via the ServiceWatch Agent are considered custom metrics and incur charges, unlike the default metrics collected from each service. Remove or disable unnecessary metric collection to avoid excessive charges.
  1. Enable and start the service. Register the Node Exporter service and verify the registered service and configured metrics.
    Color mode
    sudo systemctl daemon-reload
    sudo systemctl enable --now node_exporter
    sudo systemctl daemon-reload
    sudo systemctl enable --now node_exporter
    Code block. Enable and start Node Exporter service
    Color mode
    sudo systemctl status node_exporter
    sudo systemctl status node_exporter
    Code block. Check Node Exporter service status
    Color mode
    curl http://localhost:9100/metrics | grep node_memory
    curl http://localhost:9100/metrics | grep node_memory
    Code block. Verify Node Exporter metrics
Info
After completing the Node Exporter setup, you must install the Open Telemetry Collector provided by ServiceWatch to finish the ServiceWatch Agent configuration.
See ServiceWatch > Using ServiceWatch Agent for details.

Installing Prometheus Exporter for Virtual Server (Windows)

Install the Prometheus Exporter on a Windows server following the steps below.

Installing Windows Exporter

Install the Windows Exporter according to the steps below.

  1. Windows Exporter Configuration

Windows Exporter Configuration

  1. Download the Windows Exporter installation file.

    • Download path: C:\Temp
    • Test version: 0.31.3
      Color mode
      $ mkdir /Temp
      $ Invoke-WebRequest -Uri "https://github.com/prometheus-community/windows_exporter/releases/download/v0.31.3/windows_exporter-0.31.3-amd64.exe" -OutFile "C:\Temp\windows_exporter-0.31.3-amd64.exe"
      $ mkdir /Temp
      $ Invoke-WebRequest -Uri "https://github.com/prometheus-community/windows_exporter/releases/download/v0.31.3/windows_exporter-0.31.3-amd64.exe" -OutFile "C:\Temp\windows_exporter-0.31.3-amd64.exe"
      Code block. Windows Exporter download
      Note
      Windows Exporter versions and installation files can be found at Windows Exporter > Releases.
  2. Test the Windows Exporter execution. By default, Windows Exporter enables all collectors, but to collect only desired metrics, enable the following collectors:

    • Memory metrics: memory
    • Block storage metrics: logical_disk
    • Host name: os
      Color mode
      $ cd C:\Temp
      $ .\windows_exporter-0.31.3-amd64.exe --collectors.enabled memory,logical_disk,os
      $ cd C:\Temp
      $ .\windows_exporter-0.31.3-amd64.exe --collectors.enabled memory,logical_disk,os
      Code block. Test Windows Exporter execution
Note
  • Collectors can be enabled using flags.

    • <code>--collectors.enabled "[defaults]"</code>: Enables the default provided metrics.
    • <code>--collector.enabled {name},{name},{name}...</code>: Enables specific metrics.
  • Below is a description of the main collectors.

CollectorDescriptionLabels
memoryProvides memory statistics
logical_diskCollects performance and status metrics of local logical disks (e.g., C:, D: drives)
  • volume: Physical or virtual device path where the filesystem resides (e.g., C:, D:)
Table. Description of main Windows Exporter collectors
참고
  • Available metrics may vary depending on the version of Windows Exporter you use. See the Windows Exporter repository.
Caution
Metrics collected via the ServiceWatch Agent are considered custom metrics and incur charges, unlike the default metrics collected from each service. Remove or disable unnecessary metric collection to avoid excessive charges.
  1. Register the service and verify.

    Color mode
    $ sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --collectors.enabled memory,logical_disk,os" DisplayName= "Prometheus Windows Exporter" start= auto
    $ Start-Service windows_exporter
    $ sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --collectors.enabled memory,logical_disk,os" DisplayName= "Prometheus Windows Exporter" start= auto
    $ Start-Service windows_exporter
    Code block. Register Windows Exporter service
    Color mode
    # Verify service
    $ Get-Service windows_exporter
    
    # Verify metrics
    $ Invoke-WebRequest -Uri "http://localhost:9182/metrics" | Select-String memory
    # Verify service
    $ Get-Service windows_exporter
    
    # Verify metrics
    $ Invoke-WebRequest -Uri "http://localhost:9182/metrics" | Select-String memory
    Code block. Verify Windows Exporter service

  2. Set configuration file.

    • Use the --config.file option to specify a YAML configuration file.
      Color mode
      $ .\windows_exporter.exe --config.file=config.yml
      $ .\windows_exporter.exe --config.file="C:\Program Files\windows_exporter\config.yml" # When using an absolute path, wrap it in quotes
      $ .\windows_exporter.exe --config.file=config.yml
      $ .\windows_exporter.exe --config.file="C:\Program Files\windows_exporter\config.yml" # When using an absolute path, wrap it in quotes
      Code block. Run Windows Exporter with config file
      Color mode
      collectors:
        enabled: cpu,net,service
      collector:
        service:
          include: windows_exporter
      log:
        level: warn
      collectors:
        enabled: cpu,net,service
      collector:
        service:
          include: windows_exporter
      log:
        level: warn
      Code block. Sample Windows Exporter config

Color mode
$ sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --config.file=C:\Temp\config.yml" DisplayName= "Prometheus Windows Exporter" start= auto
$ Start-Service windows_exporter
$ sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --config.file=C:\Temp\config.yml" DisplayName= "Prometheus Windows Exporter" start= auto
$ Start-Service windows_exporter
Code block. Register Windows Exporter with config file
Note
When using both a configuration file and command‑line options, command‑line options take precedence over configuration file values.

Info
After completing the Windows Exporter setup, you must install the Open Telemetry Collector provided by ServiceWatch to finish the ServiceWatch Agent configuration.
See ServiceWatch > Using ServiceWatch Agent for details.

Node Exporter Metrics

Main Node Exporter metrics

The following are the collector and metric information available through Node Exporter. Collectors can be enabled, and specific metrics can be activated.

CategoryCollectorMetricDescription
Memorymeminfonode_memory_MemTotal_bytesTotal memory
Memorymeminfonode_memory_MemAvailable_bytesAvailable memory (used for determining memory shortage)
Memorymeminfonode_memory_MemFree_bytesFree memory
Memorymeminfonode_memory_Buffers_bytesIO buffers
Memorymeminfonode_memory_Cached_bytesPage cache
Memorymeminfonode_memory_SwapTotal_bytesTotal swap
Memorymeminfonode_memory_SwapFree_bytesRemaining swap
Filesystemfilesystemnode_filesystem_size_bytesTotal filesystem size
Filesystemfilesystemnode_filesystem_free_bytesTotal free space
Filesystemfilesystemnode_filesystem_avail_bytesSpace actually available to unprivileged users
Table. Main Node Exporter metrics

Node Exporter collector and metric collection settings

Node Exporter enables most collectors by default, but you can enable or disable specific collectors as needed.

Enable specific collectors only

  • When you want to use only memory and filesystem collectors:
    Color mode
    ./node_exporter \
      --collector.meminfo            # Enable memory collector
      --collector.filesystem         # Enable filesystem collector
    ./node_exporter \
      --collector.meminfo            # Enable memory collector
      --collector.filesystem         # Enable filesystem collector
    Code block. Enable specific Node Exporter collectors
  • When you want to disable all default collectors and use only memory and filesystem collectors:
    Color mode
    ./node_exporter \
      --collector.disable-defaults    # Disable default metrics
      --collector.meminfo             # Enable memory collector
      --collector.filesystem          # Enable filesystem collector
    ./node_exporter \
      --collector.disable-defaults    # Disable default metrics
      --collector.meminfo             # Enable memory collector
      --collector.filesystem          # Enable filesystem collector
    Code block. Enable specific Node Exporter collectors (disable defaults)
  • Enable filesystem collector for specific mount points:
    Color mode
    ./node_exporter \
      --collector.disable-defaults \
      --collector.filesystem.mount-points-include="/|/data"          # Enable filesystem collector for / (root) and /data mount points
    ./node_exporter \
      --collector.disable-defaults \
      --collector.filesystem.mount-points-include="/|/data"          # Enable filesystem collector for / (root) and /data mount points
    Code block. Enable filesystem collector for specific mount points
  • Enable filesystem collector excluding specific mount points:
    Color mode
    ./node_exporter \
      --collector.disable-defaults \
      --collector.filesystem.mount-points-exclude="/boot|/var/log"    # Exclude /boot and /var/log mount points
    ./node_exporter \
      --collector.disable-defaults \
      --collector.filesystem.mount-points-exclude="/boot|/var/log"    # Exclude /boot and /var/log mount points
    Code block. Exclude specific mount points from filesystem collector

Disable specific collectors (no-collector)

When you do not want to use the filesystem collector:

Color mode
./node_exporter --no-collector.filesystem
./node_exporter --no-collector.filesystem
Code block. Disable specific Node Exporter collector

Color mode
[Unit]
Description=Node Exporter
After=network-online.target

[Service]
User=nodeexp
ExecStart=/usr/local/bin/node_exporter \
  --collector.disable-defaults # Disable all default metric collectors
  --collector.meminfo
  --collector.filesystem

[Install]
WantedBy=multi-user.target
[Unit]
Description=Node Exporter
After=network-online.target

[Service]
User=nodeexp
ExecStart=/usr/local/bin/node_exporter \
  --collector.disable-defaults # Disable all default metric collectors
  --collector.meminfo
  --collector.filesystem

[Install]
WantedBy=multi-user.target
Code block. /etc/systemd/system/node_exporter.service configuration

Filter specific metrics

Using the Open Telemetry Collector configuration, you can select only the required metrics collected by Node Exporter.
For guidance on pre‑configuring the Open Telemetry Collector for ServiceWatch, see Prerequisite Open Telemetry Collector configuration for ServiceWatch.

Caution
Metrics collected via the ServiceWatch Agent are considered custom metrics and incur charges, unlike the default metrics collected from each service. It is recommended to configure only the necessary metrics.

Windows Exporter Metrics

Main Windows Exporter metrics

The following are the collector and metric information available through Windows Exporter. Collectors can be enabled, and specific metrics can be activated.

CategoryCollectorMetricDescription
Memorymemorywindows_memory_available_bytesAvailable memory
Memorymemorywindows_memory_cache_bytesCached memory
Memorymemorywindows_memory_committed_bytesCommitted memory
Memorymemorywindows_memory_commit_limitCommit limit
Memorymemorywindows_memory_pool_paged_bytesPaged pool
Memorymemorywindows_memory_pool_nonpaged_bytesNon‑paged pool
Disklogical_diskwindows_logical_disk_free_bytesFree space
Disklogical_diskwindows_logical_disk_size_bytesTotal capacity
Disklogical_diskwindows_logical_disk_read_bytes_totalTotal read bytes
Disklogical_diskwindows_logical_disk_write_bytes_totalTotal written bytes
Disklogical_diskwindows_logical_disk_read_seconds_totalRead latency
Disklogical_diskwindows_logical_disk_write_seconds_totalWrite latency
Disklogical_diskwindows_logical_disk_idle_seconds_totalIdle time
Table. Main Windows Exporter metrics

Windows Exporter collector and metric collection settings

Windows Exporter enables most collectors by default, but you can configure only the desired collectors.

Enable specific collectors only

If you want to use only CPU, memory, and logical disk collectors:

Color mode
# The --collector.enabled option disables defaults and enables only the listed collectors
.\windows_exporter.exe --collectors.enabled="memory,logical_disk"
# The --collector.enabled option disables defaults and enables only the listed collectors
.\windows_exporter.exe --collectors.enabled="memory,logical_disk"
Code block. Enable specific Windows Exporter collectors

Note
Windows Exporter does not need you to disable unused collectors; using --collector.enabled will collect only the collectors specified in the option.

Color mode
# Register windows_exporter as a service
sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --config.file=C:\Temp\config.yml" DisplayName= "Prometheus Windows Exporter" start= auto
# Start the service
Start-Service windows_exporter
# Register windows_exporter as a service
sc.exe create windows_exporter binPath= "C:\Temp\windows_exporter-0.31.3-amd64.exe --config.file=C:\Temp\config.yml" DisplayName= "Prometheus Windows Exporter" start= auto
# Start the service
Start-Service windows_exporter
Code block. Register service
Color mode
# Note this is not an exhaustive list of all configuration values
collectors:
  enabled: logical_disk,memory # Set collectors to enable
collector:
  service:
    include: "windows_exporter"
  scheduled_task:
    include: /Microsoft/.+
log:
  level: debug
scrape:
  timeout-margin: 0.5
telemetry:
  path: /metrics
web:
  listen-address: ":9182"
# Note this is not an exhaustive list of all configuration values
collectors:
  enabled: logical_disk,memory # Set collectors to enable
collector:
  service:
    include: "windows_exporter"
  scheduled_task:
    include: /Microsoft/.+
log:
  level: debug
scrape:
  timeout-margin: 0.5
telemetry:
  path: /metrics
web:
  listen-address: ":9182"
Code block. Service configuration file

Filter specific metrics

Using the Open Telemetry Collector configuration, you can select only the required metrics collected by Windows Exporter.
For guidance on pre‑configuring the Open Telemetry Collector for ServiceWatch, see Prerequisite Open Telemetry Collector configuration for ServiceWatch.

Caution
Metrics collected via the ServiceWatch Agent are considered custom metrics and incur charges, unlike the default metrics collected from each service. It is recommended to configure only the necessary metrics.
Setting up RHEL Repo and WKMS
Release Note