Skip to main content
APA
Sponsored byCAST AI — Kubernetes cost optimizationBetter Stack — Uptime monitoring and log managementVictoriaMetrics — Fast, open-source time series database and drop-in Prometheus replacement.

Solr logoSolr Prometheus Alert Rules

10 Prometheus alerting rules for Solr.Exported via embedded exporter.These rules cover critical and warning conditions — copy and paste the YAML into your Prometheus configuration.

⚠️

Alert thresholds depend on the nature of your applications. Some queries may have arbitrary tolerance thresholds. Building an efficient monitoring platform takes time. 😉

2.16.Solr logoembedded exporter(10 rules)

wget https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/refs/heads/master/dist/rules/solr/embedded-exporter.yml
critical

2.16.1.Solr shard has no leader

Solr collection {{ $labels.collection }} shard {{ $labels.shard }} has no elected leader and cannot accept writes until a new leader is elected.

- alert: SolrShardHasNoLeader
  expr: max by (collection, shard) (solr_collections_shard_leader) < 1
  for: 2m
  labels:
    severity: critical
  annotations:
    summary: Solr shard has no leader (instance {{ $labels.instance }})
    description: "Solr collection {{ $labels.collection }} shard {{ $labels.shard }} has no elected leader and cannot accept writes until a new leader is elected.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

2.16.2.Solr high JVM heap usage

Solr node {{ $labels.base_url }} is using more than 90% of its JVM heap, which can lead to node instability, stop-the-world GC pauses, or OutOfMemory crashes.

- alert: SolrHighJVMHeapUsage
  expr: sum by (base_url) (solr_metrics_jvm_memory_heap_bytes{item="used"}) / sum by (base_url) (solr_metrics_jvm_memory_heap_bytes{item="max"}) > 0.9
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: Solr high JVM heap usage (instance {{ $labels.instance }})
    description: "Solr node {{ $labels.base_url }} is using more than 90% of its JVM heap, which can lead to node instability, stop-the-world GC pauses, or OutOfMemory crashes.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.3.Solr disk space very low

Solr node {{ $labels.base_url }} has less than 10% usable disk space remaining, an imminent risk of index corruption or write failures.

- alert: SolrDiskSpaceVeryLow
  expr: min by (base_url) (solr_metrics_core_fs_bytes{item="usableSpace"}) / max by (base_url) (solr_metrics_core_fs_bytes{item="totalSpace"}) <= 0.1
  for: 10m
  labels:
    severity: critical
  annotations:
    summary: Solr disk space very low (instance {{ $labels.instance }})
    description: "Solr node {{ $labels.base_url }} has less than 10% usable disk space remaining, an imminent risk of index corruption or write failures.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

2.16.4.Solr disk space low

Solr node {{ $labels.base_url }} has less than 20% usable disk space remaining, risking index corruption if it fills up.

- alert: SolrDiskSpaceLow
  expr: min by (base_url) (solr_metrics_core_fs_bytes{item="usableSpace"}) / max by (base_url) (solr_metrics_core_fs_bytes{item="totalSpace"}) <= 0.2
  for: 10m
  labels:
    severity: warning
  annotations:
    summary: Solr disk space low (instance {{ $labels.instance }})
    description: "Solr node {{ $labels.base_url }} has less than 20% usable disk space remaining, risking index corruption if it fills up.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.5.Solr update errors

Solr collection {{ $labels.collection }} has failed updates for replica {{ $labels.replica }} on {{ $labels.base_url }}.

- alert: SolrUpdateErrors
  expr: increase(solr_metrics_core_update_handler_errors_total[1m]) > 1
  for: 0m
  labels:
    severity: critical
  annotations:
    summary: Solr update errors (instance {{ $labels.instance }})
    description: "Solr collection {{ $labels.collection }} has failed updates for replica {{ $labels.replica }} on {{ $labels.base_url }}.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.6.Solr replication errors

Solr collection {{ $labels.collection }} has replication errors for replica {{ $labels.replica }} on {{ $labels.base_url }}.

- alert: SolrReplicationErrors
  expr: increase(solr_metrics_core_errors_total{category="REPLICATION"}[1m]) > 1
  for: 0m
  labels:
    severity: critical
  annotations:
    summary: Solr replication errors (instance {{ $labels.instance }})
    description: "Solr collection {{ $labels.collection }} has replication errors for replica {{ $labels.replica }} on {{ $labels.base_url }}.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.7.Solr low live node count

Solr collection {{ $labels.collection }} has less than two live nodes for replica {{ $labels.replica }} on {{ $labels.base_url }}.

- alert: SolrLowLiveNodeCount
  expr: solr_collections_live_nodes < 2
  for: 0m
  labels:
    severity: critical
  annotations:
    summary: Solr low live node count (instance {{ $labels.instance }})
    description: "Solr collection {{ $labels.collection }} has less than two live nodes for replica {{ $labels.replica }} on {{ $labels.base_url }}.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.8.Solr shard has no active replica

Solr collection {{ $labels.collection }} shard {{ $labels.shard }} has no active replicas, causing a complete read/write outage for that shard.

- alert: SolrShardHasNoActiveReplica
  expr: count by (collection, shard) (solr_collections_replica_state{state="active"}) < 1
  for: 5m
  labels:
    severity: critical
  annotations:
    summary: Solr shard has no active replica (instance {{ $labels.instance }})
    description: "Solr collection {{ $labels.collection }} shard {{ $labels.shard }} has no active replicas, causing a complete read/write outage for that shard.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
critical

2.16.9.Solr blocked or deadlocked JVM threads

Solr node {{ $labels.base_url }} has blocked or deadlocked JVM threads, indicating the JVM may be stuck and unable to serve requests.

- alert: SolrBlockedOrDeadlockedJVMThreads
  expr: max by (base_url) (solr_metrics_jvm_threads{item=~"blocked|deadlock"}) > 0
  for: 2m
  labels:
    severity: critical
  annotations:
    summary: Solr blocked or deadlocked JVM threads (instance {{ $labels.instance }})
    description: "Solr node {{ $labels.base_url }} has blocked or deadlocked JVM threads, indicating the JVM may be stuck and unable to serve requests.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

2.16.10.Solr query errors

Solr has increased query errors in collection {{ $labels.collection }} for replica {{ $labels.replica }} on {{ $labels.base_url }}.

- alert: SolrQueryErrors
  expr: increase(solr_metrics_core_errors_total{category="QUERY"}[1m]) > 1
  for: 5m
  labels:
    severity: warning
  annotations:
    summary: Solr query errors (instance {{ $labels.instance }})
    description: "Solr has increased query errors in collection {{ $labels.collection }} for replica {{ $labels.replica }} on {{ $labels.base_url }}.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"