LMC Exporter

Core Configuration

Overview

lmc_exporter is configured at runtime with one of the following methods:

Use --config <path> to load a TOML file. This is the preferred configuration format because it can define runtime defaults, HTTP settings, metric scopes, and preloaded scrape targets in one file.

Pass runtime options directly to lmc_exporter. CLI values override values loaded from TOML.

LMC Exporter supports two main operating modes:

ModeHow it is selectedPurpose
Single-target modeTOML has no [[targets]] entries, or CLI options such as --server-key are usedExport metrics for one resolved LMC root target
Multi-target modeTOML contains one or more [[targets]] tablesExport metrics for multiple targets and route scrapes by query parameter

Prerequisites

Before configuring LMC Exporter, make sure you have:

  • Installed the LMC Exporter as the user the shared-memory is configured under.
  • One or more valid shared-memory server_key values.
  • An application metric set, such as ads, adh, or ats.
  • A valid license_file for normal startup.

How It Works

Configuration loading order

When you use TOML and CLI options together, LMC Exporter applies configuration in this order:

  1. Load built-in defaults.
  2. Load values from the TOML file passed with --config.
  3. Apply CLI options as overrides.

This means a command-line option such as --metrics-port 9564 overrides metrics_port = 9464 in TOML.

Single-target mode

Single-target mode uses top-level values such as app, instance, variable, and server_keys.

Use this mode when you want one exporter process to resolve and scrape one target on a host.

app = "ads"
server_keys = ["82"]
metrics_http_enabled = true
metrics_port = 9464

Run the exporter with:

lmc_exporter --config ./lmcExporterConfig.toml

Multi-target mode

Multi-target mode is enabled when the TOML file contains one or more [[targets]] tables.

Each target defines its own application and server key. Optional target-level filters can narrow the subscribed subtree and emitted metrics.

metrics_http_enabled = true
metrics_port = 9464

[[targets]]
app = "ads"
instance = "1"
server_key = "82"
classes = ["ManagedProcess.SinkDist", "ConsumerDataStream"]

[[targets]]
app = "ads"
instance = "1"
server_key = "456"
classes = ["SSLDispatcher", "ManagedSSLChannel"]

Configuration

Basic TOML structure

A typical TOML file includes shared-memory settings, application selection, server keys, runtime behavior, HTTP settings, license settings, optional metric scopes, and optional preloaded targets.

context_id = "shmApp"
pool_name = "pool"

app = "ads"
server_keys = ["82", "456", "999"]

metrics_interval_seconds = 10
render_min_interval_ms = 250
target_workers = 0
worker_execution_mode = "logical"
worker_assignment_mode = "hash"
worker_rebalance_enabled = false

debug = false
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"

license_file = "./scratch/example.lic"

[[targets]]
app = "ads"
server_key = "82"

[[targets]]
app = "adh"
server_key = "999"

Top-level configuration keys

KeyTypeDefaultDescription
context_idstring"shmApp"Shared-memory pool context ID.
pool_namestring"pool"Shared-memory pool name.
appstring"ads"Application metric set used in single-target mode. Built-in values include ads, adh, and ats.
instancestring""Optional root-selection hint. Can be a full root ID or an instance_no segment when roots follow hostname.instance_no.application naming.
variablestring""Optional descendant variable path to highlight.
classesstring array[]Optional app-specific class aliases used to limit subscription and metric output.
seed_path_groupsstring array[]Optional app-specific logical filter groups.
seed_pathsstring array[]Optional raw seed-path prefixes. The reserved value @root targets variables directly on the selected root object.
server_keysstring array["82", "456", "999"]Shared-memory server keys used in single-target mode.
metrics_interval_secondsinteger10Interval for stdout snapshot output when HTTP mode is disabled.
render_min_interval_msinteger250Minimum spacing between demand renders for one target. Set to 0 to restore render-per-update behavior.
target_workersinteger0Number of logical worker partitions. 0 enables automatic sizing from the configured target count.
worker_execution_modestring"logical"Worker model. Supported values are logical and threaded.
worker_assignment_modestring"hash"Target assignment strategy. Supported values are hash and least_loaded.
worker_rebalance_enabledbooleanfalseEnables optional low-frequency worker target rebalancing.
debugbooleanfalseEnables verbose sync, update, and lookup diagnostics.
metrics_http_enabledbooleanfalseEnables the HTTP scrape listener.
metrics_bind_addressstring"0.0.0.0"IPv4 bind address for the HTTP listener.
metrics_portinteger9464HTTP listener port.
metrics_pathstring"/metrics"HTTP scrape path.
license_filestring""Path to the customer license JSON file. Required for normal startup.

Target configuration

Use repeated [[targets]] tables to preload multiple scrape targets.

Each [[targets]] table supports:

KeyRequiredDescription
appYesApplication metric set for the target.
server_keyYesShared-memory server key for the target.
instanceNoOptional root-selection hint.
variableNoOptional descendant variable path.
classesNoOptional target-level class filters.
seed_path_groupsNoOptional target-level filter groups.
seed_pathsNoOptional target-level raw seed paths.

Example:

[[targets]]
app = "ads"
server_key = "82"
classes = ["ManagedProcess.SinkDist", "RIPCServer", "ConsumerDataStream"]
seed_path_groups = ["core", "admin", "sink_ripc", "users"]

[[targets]]
app = "adh"
server_key = "999"
seed_path_groups = [
  "consumer_mqos_service_service",
  "mqos_service_attributes",
  "mqos_service_datastreams"
]

Metric scopes

Metric scopes define named subsets of rendered metrics. Each scope becomes available as an HTTP path segment under the configured metrics path.

[[metric_scopes]]
name = "client_threads"
metrics = [
  "ads_client_session_thread_*"
]

[[metric_scopes]]
name = "process_health"
metrics = [
  "ads_managed_process_sink_dist_state",
  "ads_managed_process_sink_dist_process_id",
  "ads_shmem_mo_server_stats_num_clients"
]

A metric scope supports:

KeyRequiredDescription
nameYesScope name. May contain only letters, digits, ., _, and -.
metricsYesMetric name patterns included in the scope.

The metrics list supports:

  • Exact metric names, such as ads_managed_process_sink_dist_state.
  • Prefix matches with a trailing *, such as ads_client_session_thread_*.
  • Wildcard matches with * anywhere, such as ads_*_num_clients.

For summary and histogram metrics, exact metric names also include matching _sum, _count, and _bucket series.

Usage

Use a TOML configuration file

Copy the sample TOML file and edit it for your environment:

cp docs/lmcExporterConfig.toml.sample ./lmcExporterConfig.toml

Run LMC Exporter with the TOML file:

lmc_exporter --config ./lmcExporterConfig.toml

Run with CLI-only options

Use CLI-only configuration for simple single-target runs:

lmc_exporter --server-key 82 --app ads

Enable HTTP scrape mode from the CLI:

lmc_exporter --server-key 82 --app ads --enable-metrics-http --metrics-port 9464

Enable verbose diagnostics:

lmc_exporter --server-key 82 --debug

Override TOML values with CLI options

The following command loads TOML first, then overrides the configured metrics port:

lmc_exporter --config ./lmcExporterConfig.toml --metrics-port 9564

CLI options that select a single target, such as --instance or --server-key, switch the process to single-target mode and clear TOML [[targets]] entries.

Examples

Minimal single-target TOML

app = "ads"
server_keys = ["82"]

metrics_http_enabled = true
metrics_port = 9464

license_file = "./scratch/example.lic"

Run:

lmc_exporter --config ./lmcExporterConfig.toml

Scrape:

curl "http://127.0.0.1:9464/metrics?server_key=82"

Multi-target TOML with HTTP routing

metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"

license_file = "./scratch/example.lic"

[[targets]]
app = "ads"
server_key = "82"

[[targets]]
app = "ads"
server_key = "456"

[[targets]]
app = "adh"
server_key = "999"

Scrape a specific target by server key:

curl "http://127.0.0.1:9464/metrics?server_key=82"

Route by resolved instance and app:

curl "http://127.0.0.1:9464/metrics?instance=phoads01.1.ads&app=ads"

If more than one target shares the same app and instance, include server_key as well:

curl "http://127.0.0.1:9464/metrics?instance=phoads01.1.ads&app=ads&server_key=82"

Scoped metrics endpoint

Given this scope:

[[metric_scopes]]
name = "process_health"
metrics = [
  "ads_managed_process_sink_dist_state",
  "ads_managed_process_sink_dist_process_id",
  "ads_shmem_mo_server_stats_num_clients"
]

Scrape the scope directly:

curl "http://127.0.0.1:9464/metrics/process_health?server_key=82"

Or use the base path with a scope query parameter:

curl "http://127.0.0.1:9464/metrics?scope=process_health&server_key=82"