# LMC Exporter Installation

## Overview

LMC Exporter is distributed as a precompiled application and does not require source compilation by end users.

This article describes:

-   Supported runtime environments
-   Installation methods
-   License configuration and validation
-   Runtime configuration
-   Post-installation validation
-   Common troubleshooting steps

## Prerequisites

### Supported Runtime Platforms

<table><caption class="sr-only">Supported Runtime Platforms</caption><thead><tr><th scope="col">Platform</th></tr></thead><tbody><tr><td><code>Oracle Linux 7</code></td></tr><tr><td><code>RedHat Enterprise Linux 8</code></td></tr><tr><td><code>RedHat Enterprise Linux 9</code></td></tr></tbody></table>

### Runtime Requirements

The target host must provide:

-   Access to the required RTDS installation
-   Access to the appropriate shared-memory environment
-   Valid Shared Memory server keys
-   A valid local LMC Exporter license, or access and credentials for a licensing Gateway
-   Network connectivity for Prometheus scraping when HTTP metrics mode is enabled

NoteImportant

LMC Exporter is supplied as a precompiled package. No compiler, source code, build tools, or manual compilation steps are required.

## Installation

LMC Exporter can be installed using either the CJC’s RPM repository or a supplied deployment archive.

### Install from the CJC Repository

Install the package from the configured CJC YUM repository:

```
sudo yum install lmc-exporter
```

For DNF-based systems:

```
sudo dnf install lmc-exporter
```

### Verify Installation

```
lmc_exporter --version
```

The command should return the installed exporter version.

### Extract the Distribution Archive

```
tar -xzf lmc-exporter-<version>.tar.gz
```

### Typical Archive Structure

```
particle_horizon
├── SOFTWARE
|   └── lmc_exporter-<version>-<platform>-x86_64
|   └── bin
|      └── lmc_exporter-<platform>
├── local_config
|   └── lmc_exporter
|      └── lmc_exporter.toml
├── local_data
|   └── lmc_exporter
```

### Deploy the Package

Extract the archive into the target installation directory according to your organization’s deployment standards.

Example:

```
tar -xzf lmc-exporter-<version>-<platform>-<arch>.tar.gz -C /opt
```

### Verify Installation

```
/opt/particle_horizon/bin/lmc_exporter --version
```

The command should return the installed exporter version.

NoteRecommended Installation Method

Use the RPM package from the Crown Jewels repository whenever possible. Repository-based installations simplify upgrades, dependency management, and version tracking.

## License Setup and Validation

### Create a Configuration File

Copy the supplied sample configuration file:

```
cp lmcExporterConfig.toml.sample ./lmcExporterConfig.toml
```

### Choose a Licensing Mode

Local-file licensing remains the default. Configure the path to the local license:

Update the configuration file with the path to your license key:

```
license_file = "/path/to/license.json"
```

Alternatively, 0.18.x can acquire online entitlement from a licensing Gateway:

```
license_mode = "gateway"
gateway_endpoints = ["https://gateway.example:8443"]
gateway_auth_mode = "mtls"
gateway_tls_ca_file = "/etc/lmc-exporter/gateway-ca.pem"
gateway_tls_cert_file = "/etc/lmc-exporter/client.pem"
gateway_tls_key_file = "/etc/lmc-exporter/client-key.pem"
gateway_state_directory = "/var/lib/lmc-exporter"
```

Gateway mode also requires a `component_instance_id` for every target. See **Gateway Licensing** for complete configuration, state-directory, and entitlement-counting requirements.

### Local License Validation Process

During startup, LMC Exporter validates:

1.  License fingerprint
2.  Digital signature
3.  License expiration status

Validation occurs before any LMC shared-memory discovery or metrics collection begins.

NoteImportant

If local validation fails, or Gateway does not grant the complete configured workload, LMC Exporter will not start.

### License Expiration Grace Period

<table><caption class="sr-only">License Expiration Grace Period</caption><thead><tr><th scope="col">Condition</th><th scope="col">Behavior</th></tr></thead><tbody><tr><td>License valid</td><td>Startup proceeds normally</td></tr><tr><td>From the expiry instant until, but not including, 36 hours after expiry</td><td>Startup proceeds with warning messages</td></tr><tr><td>At or after 36 hours past expiry</td><td>Startup is blocked</td></tr></tbody></table>

For running instances:

-   Warning messages continue throughout the grace period.
-   Once the grace period expires, the exporter exits during the next enforcement check.

## Runtime Configuration

### Example Configuration

```
context_id = 1
pool_name = "default"

app = "ads"
server_keys = [82]

metrics_interval_seconds = 30

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

license_file = "/licenses/lmc_exporter.json"
```

### Common Configuration Settings

<table><caption class="sr-only">Common Configuration Settings</caption><thead><tr><th scope="col">Setting</th><th scope="col">Description</th></tr></thead><tbody><tr><td><code>context_id</code></td><td>LMC context identifier</td></tr><tr><td><code>pool_name</code></td><td>Shared-memory pool name</td></tr><tr><td><code>app</code></td><td>Target application name</td></tr><tr><td><code>instance</code></td><td>Optional application instance</td></tr><tr><td><code>server_keys</code></td><td>Target LMC server keys</td></tr><tr><td><code>metrics_interval_seconds</code></td><td>Metric refresh interval</td></tr><tr><td><code>metrics_http_enabled</code></td><td>Enables HTTP metrics endpoint</td></tr><tr><td><code>metrics_bind_address</code></td><td>HTTP listener address</td></tr><tr><td><code>metrics_port</code></td><td>HTTP listener port</td></tr><tr><td><code>metrics_path</code></td><td>Metrics endpoint path</td></tr><tr><td><code>license_file</code></td><td>License file location</td></tr></tbody></table>

## Validation

### Start the Exporter

RPM installation:

```
lmc_exporter --config ./lmcExporterConfig.toml
```

Tarball installation:

```
/opt/lmc-exporter/bin/lmc_exporter --config ./lmcExporterConfig.toml
```

### Verify Version Information

```
lmc_exporter --version
```

### Verify Metrics Availability

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

Example application routing:

```
curl "http://127.0.0.1:9464/metrics?app=ads&instance=<resolved-instance>"
```

## Troubleshooting

### License Validation Failure

#### Symptoms

The exporter exits during startup before any LMC discovery occurs.

#### Resolution

Verify:

-   The configured license file exists
-   The license has not been modified
-   The license signature is valid
-   The license has not exceeded the grace period

### License Expired

#### Symptoms

Startup warning messages indicate license expiration.

#### Resolution

Replace the license before the 36-hour grace period expires.

### HTTP Endpoint Returns 503

#### Symptoms

```
HTTP 503 Service Unavailable
```

#### Resolution

The target subtree may not yet be fully synchronized.

Verify:

-   Server key configuration
-   Application configuration
-   LMC connectivity
-   Target availability

### No Metrics Returned

#### Symptoms

Metrics endpoint responds successfully but contains no application metrics.

#### Resolution

Verify:

-   Correct application configuration
-   Target selection
-   Application-specific metric mappings are configured for the target application
