lucidworks / solr-helm-chart

A helm chart to install solr into kubernetes
26 stars 30 forks source link

solr cloud metrics is not visible in prometheus, when using inbuilt exporter #11

Closed loginvarun closed 4 years ago

loginvarun commented 4 years ago

We are using latest version of solr cloud and we deployed it while enabling exporter services. We have found out that it is not providing any metrics to the prometheus. Logs of the exporter pods looks fine and are as below:

/opt/solr/contrib/prometheus-exporter/bin/solr-exporter -p 9984 -z solr-intranet2-zookeeper-0.solr-intranet2-zookeeper-headless:2181 -n 7 -f  /opt/solr/contrib/prometheus-exporter/conf/solr-exporter-config.xml
INFO  - 2020-01-09 12:07:22.473; org.apache.solr.core.SolrResourceLoader; solr home defaulted to 'solr/' (could not find system property or JNDI)
INFO  - 2020-01-09 12:07:23.443; org.apache.solr.common.cloud.SolrZkClient; Using ZkCredentialsProvider: org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider
INFO  - 2020-01-09 12:07:23.535; org.apache.solr.common.cloud.ConnectionManager; zkClient has connected
INFO  - 2020-01-09 12:07:23.589; org.apache.solr.common.cloud.ZkStateReader; Updated live nodes from ZooKeeper... (0) -> (3)
INFO  - 2020-01-09 12:07:23.650; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at solr-intranet2-zookeeper-0.solr-intranet2-zookeeper-headless:2181 ready
INFO  - 2020-01-09 12:07:23.696; org.apache.solr.prometheus.exporter.SolrExporter; Starting Solr Prometheus Exporting
INFO  - 2020-01-09 12:07:23.709; org.apache.solr.prometheus.collector.SchedulerMetricsCollector; Beginning metrics collection
INFO  - 2020-01-09 12:07:23.763; org.apache.solr.prometheus.exporter.SolrExporter; Solr Prometheus Exporter is running
INFO  - 2020-01-09 12:07:23.880; org.apache.solr.prometheus.collector.SchedulerMetricsCollector; Completed metrics collection
INFO  - 2020-01-09 12:08:23.881; org.apache.solr.prometheus.collector.SchedulerMetricsCollector; Beginning metrics collection
INFO  - 2020-01-09 12:08:23.899; org.apache.solr.prometheus.collector.SchedulerMetricsCollector; Completed metrics collection
INFO  - 2020-01-09 12:09:23.899; org.apache.solr.prometheus.collector.SchedulerMetricsCollector; Beginning metrics collection
INFO  - 2020-01-09 

On 9983 port, Exporter pod is providing only below limited information: http://127.0.0.1:9983/solr/admin/metrics

# HELP solr_collections_live_nodes See following URL: https://lucene.apache.org/solr/guide/collections-api.html#clusterstatus
# TYPE solr_collections_live_nodes gauge
solr_collections_live_nodes{zk_host="solr-intranet2-zookeeper-headless:2181",} 3.0
# HELP solr_exporter_scrape_error_total Number of scrape error.
# TYPE solr_exporter_scrape_error_total counter
solr_exporter_scrape_error_total 0.0
# HELP solr_exporter_duration_seconds Duration taken to record all metrics
# TYPE solr_exporter_duration_seconds histogram
solr_exporter_duration_seconds_bucket{le="0.005",} 0.0
solr_exporter_duration_seconds_bucket{le="0.01",} 0.0
solr_exporter_duration_seconds_bucket{le="0.025",} 1.0
solr_exporter_duration_seconds_bucket{le="0.05",} 2.0
solr_exporter_duration_seconds_bucket{le="0.075",} 2.0
solr_exporter_duration_seconds_bucket{le="0.1",} 2.0
solr_exporter_duration_seconds_bucket{le="0.25",} 3.0
solr_exporter_duration_seconds_bucket{le="0.5",} 3.0
solr_exporter_duration_seconds_bucket{le="0.75",} 3.0
solr_exporter_duration_seconds_bucket{le="1.0",} 3.0
solr_exporter_duration_seconds_bucket{le="2.5",} 3.0
solr_exporter_duration_seconds_bucket{le="5.0",} 3.0
solr_exporter_duration_seconds_bucket{le="7.5",} 3.0
solr_exporter_duration_seconds_bucket{le="10.0",} 3.0
solr_exporter_duration_seconds_bucket{le="+Inf",} 3.0
solr_exporter_duration_seconds_count 3.0
solr_exporter_duration_seconds_sum 0.219441417

Also, made below changes in the exporter file as it was point to .Values.port. ports:

Please let me know, if I have missed anything.

loginvarun commented 4 years ago

After creating Collection it started all level metrics.

phauge commented 2 years ago

After creating Collection it started all level metrics.

Thank you!