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:
| Mode | How it is selected | Purpose |
|---|---|---|
| Single-target mode | TOML has no [[targets]] entries, or CLI options such as --server-key are used | Export metrics for one resolved LMC root target |
| Multi-target mode | TOML contains one or more [[targets]] tables | Export 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_keyvalues. - An application metric set, such as
ads,adh, orats. - A valid
license_filefor normal startup.
How It Works
Configuration loading order
When you use TOML and CLI options together, LMC Exporter applies configuration in this order:
- Load built-in defaults.
- Load values from the TOML file passed with
--config. - 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
| Key | Type | Default | Description |
|---|---|---|---|
context_id | string | "shmApp" | Shared-memory pool context ID. |
pool_name | string | "pool" | Shared-memory pool name. |
app | string | "ads" | Application metric set used in single-target mode. Built-in values include ads, adh, and ats. |
instance | string | "" | Optional root-selection hint. Can be a full root ID or an instance_no segment when roots follow hostname.instance_no.application naming. |
variable | string | "" | Optional descendant variable path to highlight. |
classes | string array | [] | Optional app-specific class aliases used to limit subscription and metric output. |
seed_path_groups | string array | [] | Optional app-specific logical filter groups. |
seed_paths | string array | [] | Optional raw seed-path prefixes. The reserved value @root targets variables directly on the selected root object. |
server_keys | string array | ["82", "456", "999"] | Shared-memory server keys used in single-target mode. |
metrics_interval_seconds | integer | 10 | Interval for stdout snapshot output when HTTP mode is disabled. |
render_min_interval_ms | integer | 250 | Minimum spacing between demand renders for one target. Set to 0 to restore render-per-update behavior. |
target_workers | integer | 0 | Number of logical worker partitions. 0 enables automatic sizing from the configured target count. |
worker_execution_mode | string | "logical" | Worker model. Supported values are logical and threaded. |
worker_assignment_mode | string | "hash" | Target assignment strategy. Supported values are hash and least_loaded. |
worker_rebalance_enabled | boolean | false | Enables optional low-frequency worker target rebalancing. |
debug | boolean | false | Enables verbose sync, update, and lookup diagnostics. |
metrics_http_enabled | boolean | false | Enables the HTTP scrape listener. |
metrics_bind_address | string | "0.0.0.0" | IPv4 bind address for the HTTP listener. |
metrics_port | integer | 9464 | HTTP listener port. |
metrics_path | string | "/metrics" | HTTP scrape path. |
license_file | string | "" | 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:
| Key | Required | Description |
|---|---|---|
app | Yes | Application metric set for the target. |
server_key | Yes | Shared-memory server key for the target. |
instance | No | Optional root-selection hint. |
variable | No | Optional descendant variable path. |
classes | No | Optional target-level class filters. |
seed_path_groups | No | Optional target-level filter groups. |
seed_paths | No | Optional 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:
| Key | Required | Description |
|---|---|---|
name | Yes | Scope name. May contain only letters, digits, ., _, and -. |
metrics | Yes | Metric 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 asads_client_session_thread_*. - Wildcard matches with
*anywhere, such asads_*_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"