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 target configuration styles:

Overview
ModeHow it is selectedPurpose
Global target settingsTOML has no [[targets]] entries, or --server-key / --instance clears themCreate one target per server key using the shared app, instance hint, and filters
Explicit target tablesTOML contains one or more [[targets]] tablesConfigure each target separately and route scrapes by query parameter

Commands use the EL8 archive path and active-install link from Installation. Use lmc_exporter-el9 on EL9. TOML snippets illustrating individual settings must be combined with your licensing and target configuration.

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, ats, rtc, or rrcp_trans.
  • Either a valid local license_file or access to a configured licensing Gateway.

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

To configure one target with global settings, use top-level app, instance, variable, and a single entry in server_keys.

Multiple server_keys entries create one target per key, even without [[targets]] tables. These targets share the top-level app and filters and require scrape routing. Repeating --server-key has the same effect.

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

Run the exporter with:

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --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_mode = "local_file"
license_file = "/opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic"

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

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

The defaults below are built into the executable. The archive configuration enables HTTP, preloads an example ADS target, and sets a relative license path; edit these values before use. Runtime settings are loaded through TOML and CLI flags, not through application-specific environment variables. The process timezone affects timestamp conversion.

Top-level configuration keys

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 for global target settings. Built-in values include ads, adh, ats, rtc, and rrcp_trans.
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"]One target is created per key when explicit target tables are absent.
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_modestring"local_file"Licensing backend. Supported values are local_file and gateway.
license_filestring""Path to the customer license JSON file. Required only in local_file mode.
NoteLicensing happens before LMC discovery

In local_file mode, lmc_exporter validates the license fingerprint, signature, and expiry state before creating the LMC shared-memory pool. In gateway mode, it first acquires the complete configured workload. See Gateway Licensing for Gateway settings, target identities, and lease behavior.

Target configuration

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

Each [[targets]] table supports:

Target configuration
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.
component_instance_idIn Gateway modeStable licensed component identity.

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:

Metric scopes
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 installed configuration and edit it for your environment:

cp /opt/particle_horizon/local_config/lmc_exporter/lmc_exporter.toml ./lmcExporterConfig.toml

Run LMC Exporter with the TOML file:

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --config ./lmcExporterConfig.toml

Run with CLI-only options

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

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --server-key 82 --app ads --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic

Enable HTTP scrape mode from the CLI:

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --server-key 82 --app ads --enable-metrics-http --metrics-port 9464 --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic

Enable verbose diagnostics:

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --server-key 82 --debug --license-file /opt/particle_horizon/local_data/lmc_exporter/lmc_exporter.lic

Override TOML values with CLI options

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

/opt/particle_horizon/lmc_exporter/bin/lmc_exporter-el8 --config ./lmcExporterConfig.toml --metrics-port 9564

--instance or --server-key clears TOML [[targets]] entries and uses global target settings. The first --server-key replaces the TOML key list; repeated flags add keys. --instance alone retains the global key list, so it does not necessarily select only one target.

Examples

Minimal single-target TOML

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

metrics_http_enabled = true
metrics_port = 9464

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"

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 = "/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"

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"

Confirm