> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/sources/solr.md).

# Solr

The Solr source collects metrics from Apache Solr over JMX and reads Solr log files. Metrics are scraped from a JMX/RMI endpoint exposed by the Solr JVM, and logs are tailed from the Solr log files on disk.

### Supported Telemetry

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Prerequisites

#### Metrics

Metrics are collected over JMX, so the Solr JVM must have remote JMX enabled and reachable from the collector host.

* Enable remote JMX on Solr by setting `ENABLE_REMOTE_JMX_OPTS=true` (and choosing an `RMI_PORT`, for example `18983`) in `solr.in.sh` (Linux/macOS) or `solr.in.cmd` (Windows), then restart Solr. See the official [JMX with Solr](https://solr.apache.org/guide/solr/latest/deployment-guide/jmx-with-solr.html) guide.
* The collector host must have network reachability to the configured JMX/RMI port.
* The collector requires the OpenTelemetry Java JMX metrics JAR (`opentelemetry-java-contrib-jmx-metrics.jar`) present at the configured path. Bindplane collector installs ship this JAR at the default location.

#### Logs

* Solr must be writing its log files, and the collector must run where it can read those paths (or have them shipped to it).
* The default log path is `/var/solr/logs/solr.log`. Adjust the File Path(s) parameter if your deployment writes logs elsewhere.

### Configuration

<figure><img src="/files/WWNQEyXWRS33xDgnh1bh" alt="Bindplane docs - Solr - image 1"><figcaption></figcaption></figure>

**General**

| Parameter             | Type                  | Required | Default               | Description                                                                                                                                   |
| --------------------- | --------------------- | -------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Choose Telemetry Type | `Enum: Logs, Metrics` | No       | `["Logs", "Metrics"]` | Telemetry Type. Selects which signals to collect; the Logs and Metrics parameters below are relevant only when the matching type is selected. |

**Logs**

| Parameter    | Type    | Required | Default                   | Description                               |
| ------------ | ------- | -------- | ------------------------- | ----------------------------------------- |
| File Path(s) | Strings | No       | `/var/solr/logs/solr.log` | File or directory paths to tail for logs. |

**Metrics**

| Parameter | Type    | Required | Default     | Description                                        |
| --------- | ------- | -------- | ----------- | -------------------------------------------------- |
| Address   | String  | No       | `localhost` | IP address or hostname to scrape for Solr metrics. |
| Port      | Integer | No       | `9012`      | Port to scrape for Solr metrics.                   |

**Advanced**

| Parameter                       | Type                   | Required | Default                                           | Description                                                                   |
| ------------------------------- | ---------------------- | -------- | ------------------------------------------------- | ----------------------------------------------------------------------------- |
| Start At                        | `Enum: beginning, end` | No       | `end`                                             | Start reading logs from 'beginning' or 'end'. Relevant when Logs is selected. |
| Parse                           | Boolean                | No       | `true`                                            | Parses the log fields into structured data. Relevant when Logs is selected.   |
| JMX Metrics Collection Jar Path | String                 | No       | `/opt/opentelemetry-java-contrib-jmx-metrics.jar` | Full path to the JMX metrics jar. Relevant when Metrics is selected.          |
| Collection Interval             | Integer                | No       | `60`                                              | How often (seconds) to scrape for metrics. Relevant when Metrics is selected. |

### Examples

#### Collect metrics over JMX from a remote Solr host

Scrape Solr JMX metrics from a Solr instance reachable at `solr.internal:18983`, collecting every 30 seconds and disabling log collection.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  name: solr
spec:
  type: solr
  parameters:
    - name: telemetry_types
      value:
        - Metrics
    - name: address
      value: solr.internal
    - name: port
      value: 18983
    - name: collection_interval
      value: 30
```

### Configuration Tips

* The Port parameter must match the `RMI_PORT` you set when enabling remote JMX on Solr (the default in this source is `9012`, but Solr's example port is `18983`). Confirm the two agree.
* Keep the JMX Metrics Collection Jar Path pointing at the JAR shipped with the collector unless you have relocated it.
* Leave Parse enabled to get structured Solr log fields; disable it only if you intend to parse the raw log line downstream.

### Troubleshooting

**Symptom:** No metrics appear. **Solution:** Confirm remote JMX is enabled on Solr (`ENABLE_REMOTE_JMX_OPTS=true`) and that Solr was restarted, the configured Port matches Solr's RMI port, and the collector host can reach that port.

**Symptom:** Connection refused on the JMX port. **Solution:** Verify the Address and Port are correct and reachable from the collector host, and that no firewall is blocking the JMX/RMI port. Remote JMX binds only when `ENABLE_REMOTE_JMX_OPTS=true`.

**Symptom:** No logs are collected. **Solution:** Verify the File Path(s) match where Solr writes logs (default `/var/solr/logs/solr.log`) and that the collector user has read permission on those files.

### Standalone Source

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  name: solr
spec:
  type: solr
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
    - name: file_path
      value:
        - /var/solr/logs/solr.log
    - name: address
      value: localhost
    - name: port
      value: 9012
```

### Related Resources

* [JMX with Solr :: Apache Solr Reference Guide](https://solr.apache.org/guide/solr/latest/deployment-guide/jmx-with-solr.html)
* [OpenTelemetry JMX Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jmxreceiver)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/solr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
