Configure Exporter Targets
Overview
lmc_exporter exposes LMC shared-memory managed object data as Prometheus-compatible metrics. Target configuration controls which LMC root the exporter discovers, subscribes to, and renders during a scrape.
This article explains how to configure:
- single-target scraping
- preloaded multi-target scraping
- HTTP query routing with
server_key,app, andinstance
Use TOML configuration with --config for most deployments. A legacy flat target file is also supported for minimal multi-target setups.
Use TOML unless you specifically need the legacy --targets-config format. TOML can define runtime defaults, HTTP settings, metric scopes, and preloaded scrape targets in one file.
Prerequisites
Before configuring targets, ensure that:
- The tar archive is installed as described in Installation. Commands use the EL8 binary; use
lmc_exporter-el9on EL9. - The target LMC shared-memory roots are visible from the host running the exporter.
- You know the shared-memory
server_keyvalues for the targets you want to scrape. - You know the application metric mapping to use, such as
ads,adh,ats,rtc, orrrcp_trans. - A valid local license or Gateway configuration is available. Partial TOML examples must be combined with those licensing settings.
- HTTP scraping is enabled if Prometheus or
curlwill scrape the exporter.
A minimal HTTP-enabled configuration requires:
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"
How It Works
At startup, lmc_exporter creates a shared-memory server pool, discovers visible root handles, selects a matching root, subscribes to the target subtree, and renders metrics after the tracked objects and variables are ready.
The selected target is determined from:
| Configuration value | Purpose |
|---|---|
server_key or server_keys | Identifies the shared-memory server key used to discover a target root. |
app | Selects the application-specific metric mapping set, such as ads, adh, ats, rtc, or rrcp_trans. |
instance | Optional root-selection hint. It can be a full resolved root id or the instance_no segment when roots follow hostname.instance_no.application naming. |
variable | Optional descendant variable path to highlight. |
classes | Optional app-specific class aliases that limit subscribed and rendered metrics. |
seed_path_groups | Optional named app-specific filter groups that limit subscription and rendered metrics. |
seed_paths | Optional raw seed-path prefixes that limit subscription and rendered metrics. |
When instance is omitted, the exporter resolves the selected root instance from the configured server_key at runtime.
The HTTP endpoint returns 503 until the requested target subtree has completed its initial sync. After a target is ready, the exporter serves the rendered snapshot for that target.
Configuration Modes
Use one entry in the top-level server_keys list and no [[targets]] tables for a single target.
Without target tables, multiple server_keys entries still create one target per key using the shared top-level app, instance hint, and filters. Route scrapes explicitly when more than one target is configured.
context_id = "shmApp"
pool_name = "pool"
app = "ads"
server_keys = ["82"]
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"Run the exporter:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --config ./lmcExporterConfig.tomlScrape the target:
curl "http://127.0.0.1:9464/metrics?server_key=82"Use preloaded multi-target mode when one exporter process should serve multiple scrape targets.
Multi-target mode is active when the TOML file contains one or more [[targets]] tables.
context_id = "shmApp"
pool_name = "pool"
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
[[targets]]
app = "ads"
server_key = "82"
[[targets]]
app = "ads"
server_key = "456"
[[targets]]
app = "adh"
server_key = "999"Run the exporter:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --config ./lmcExporterConfig.tomlScrape a specific target by server_key:
curl "http://127.0.0.1:9464/metrics?server_key=82"Use the legacy flat target format only when you need a minimal target-only registry.
Create targets.conf:
target app=ads server_key=82
target app=ads server_key=456Run the exporter with HTTP scraping enabled:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --targets-config ./targets.conf --enable-metrics-http --metrics-port 9464 --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.licScrape a target:
curl "http://127.0.0.1:9464/metrics?server_key=82"Single-Target Scraping
For a single target, use top-level target settings with exactly one server key.
Use this mode when:
- one exporter process maps to one primary application target
server_keyscontains the one key to monitor- you do not need preloaded
[[targets]]entries
Minimal Single-Target Configuration
context_id = "shmApp"
pool_name = "pool"
app = "ads"
server_keys = ["82"]
metrics_interval_seconds = 10
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
Add an Instance Hint
Use instance when multiple roots may be visible and you want to guide root selection.
app = "ads"
instance = "1"
server_keys = ["82"]
You can also use the full resolved root id:
app = "ads"
instance = "phoads01.1.ads"
server_keys = ["82"]
Limit the Target Scope
Use classes, seed_path_groups, or seed_paths to reduce the subscribed subtree and rendered metrics.
app = "ads"
server_keys = ["82"]
classes = ["ManagedProcess.SinkDist", "WSOCKServer"]
seed_path_groups = ["core", "sink_ripc"]
seed_paths = ["serviceGenerator.srcPrdServicePool"]
For ADS, the core group includes root-scoped variables.
Run Single-Target Mode from CLI
You can also configure a single target with CLI flags:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --app ads --server-key 82 --enable-metrics-http --metrics-port 9464 --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic
With an instance hint:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --app ads --instance phoads01.1.ads --server-key 82 --enable-metrics-http --metrics-port 9464 --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic
Multi-Target Scraping
Preloaded multi-target mode uses repeated [[targets]] tables. Each table defines one scrape target.
Each [[targets]] table supports:
| Key | Required | Description |
|---|---|---|
app | Yes | Application metric mapping 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 to highlight. |
component_instance_id | In Gateway mode | Stable licensed component identity. |
classes | No | Optional app-specific class aliases. |
seed_path_groups | No | Optional app-specific filter groups. |
seed_paths | No | Optional raw seed-path prefixes. |
Multi-Target TOML Example
context_id = "shmApp"
pool_name = "pool"
metrics_http_enabled = true
metrics_bind_address = "0.0.0.0"
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
[[targets]]
app = "ads"
instance = "1"
server_key = "82"
classes = ["ManagedProcess.SinkDist", "ConsumerDataStream"]
seed_path_groups = ["core", "users"]
[[targets]]
app = "ads"
instance = "1"
server_key = "456"
classes = ["SSLDispatcher", "ManagedSSLChannel"]
seed_paths = ["sourceApplicationPool"]
[[targets]]
app = "adh"
server_key = "999"
seed_path_groups = [
"consumer_mqos_service_service",
"mqos_service_attributes",
"mqos_service_datastreams"
]
Duplicate app + instance targets are allowed when the server_key differs. In that case, include server_key in scrape queries to disambiguate the target.
Query Routing
When multiple targets are configured, the HTTP endpoint uses query parameters to select which target to render.
The default metrics path is /metrics.
Route by server_key
Use server_key when you know the shared-memory server key for the target.
/metrics?server_key=82
Example:
curl "http://127.0.0.1:9464/metrics?server_key=82"
This is the clearest routing method for multi-target deployments.
Route by app and instance
Use app and instance when you want to route by the resolved root identity after discovery.
/metrics?app=ads&instance=phoads01.1.ads
Example:
curl "http://127.0.0.1:9464/metrics?app=ads&instance=phoads01.1.ads"
Disambiguate duplicate app and instance targets
If more than one target shares the same app and instance, add server_key.
/metrics?app=ads&instance=phoads01.1.ads&server_key=82
Example:
curl "http://127.0.0.1:9464/metrics?app=ads&instance=phoads01.1.ads&server_key=82"
Metric Scopes with Target Routing
Metric scopes expose named subsets of the rendered Prometheus output. They are configured with repeated [[metric_scopes]] tables.
[[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 scope can be selected as a path segment:
/metrics/client_threads?server_key=82
Or as a query parameter:
/metrics?scope=client_threads&server_key=82
When multiple targets are configured, target routing is still required with scoped endpoints.
curl "http://127.0.0.1:9464/metrics/process_health?server_key=82"
If a scoped endpoint is requested without enough target routing information in multi-target mode, the request fails with:
scope selected, but target routing still required when multiple targets are configured.
CLI Override Behavior
TOML values are loaded first. CLI flags override TOML values afterwards.
Common overrides include:
| CLI flag | Effect |
|---|---|
--metrics-port 9564 | Overrides metrics_port. |
--debug | Enables debug logging even if debug = false in TOML. |
--instance ... | Clears TOML [[targets]] and uses global target settings. |
--server-key ... | Clears TOML [[targets]] and uses global target settings. |
--targets-config ... | Uses the legacy flat target file instead of TOML targets. |
Passing --instance or --server-key clears TOML target tables. The first --server-key replaces the global key list; repeated flags add keys. --instance alone retains the global key list. Multiple global keys create multiple targets and still require scrape routing.
Examples
Single ADS Target
context_id = "shmApp"
pool_name = "pool"
app = "ads"
server_keys = ["82"]
metrics_http_enabled = true
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
Run:
/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --config ./lmcExporterConfig.toml
Scrape:
curl "http://127.0.0.1:9464/metrics?server_key=82"
Multiple ADS Targets
metrics_http_enabled = true
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
[[targets]]
app = "ads"
server_key = "82"
[[targets]]
app = "ads"
server_key = "456"
Scrape each target separately:
curl "http://127.0.0.1:9464/metrics?server_key=82"
curl "http://127.0.0.1:9464/metrics?server_key=456"
Multiple Applications
metrics_http_enabled = true
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
[[targets]]
app = "ads"
server_key = "82"
[[targets]]
app = "adh"
server_key = "999"
Scrape by server_key:
curl "http://127.0.0.1:9464/metrics?server_key=82"
curl "http://127.0.0.1:9464/metrics?server_key=999"
RRCP Trans Target
Add this target to your existing HTTP and licensing configuration, replacing the illustrative shared-memory key:
[[targets]]
app = "rrcp_trans"
server_key = "123"
seed_path_groups = ["core", "sink", "source"]
# Required in Gateway mode:
# component_instance_id = "rrcp-trans-primary"
curl "http://127.0.0.1:9464/metrics?app=rrcp_trans&server_key=123"
Gateway mode for RRCP Trans requires Keystone Gateway v0.2.1. Provision the rrcp_trans entitlement before restarting the exporter. See Metric Configuration for role filters, metric semantics, and deployment validation.
Scoped Multi-Target Scrape
metrics_http_enabled = true
metrics_port = 9464
metrics_path = "/metrics"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"
[[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"
]
[[targets]]
app = "ads"
server_key = "82"
[[targets]]
app = "ads"
server_key = "456"
Scrape the scoped output for one target:
curl "http://127.0.0.1:9464/metrics/process_health?server_key=82"
Equivalent query-parameter form:
curl "http://127.0.0.1:9464/metrics?scope=process_health&server_key=82"