【问题标题】:使用 prometheus 和 Grafana 监控 Solr
【发布时间】:2020-09-08 07:11:00
【问题描述】:

我想我在这里遗漏了一些东西。

我安装了 prometheus[2.18 Darwin]、Grafana[7.0]。我启动了 solr exporter,它是 solr[8.1] 的一部分。它开始了,没有抛出任何错误。

然后在grafana中添加prometheus作为数据源。我在抓取部分添加了作业名称和 solr url。

scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries   
scraped from this config.
- job_name: 'solr'

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

static_configs:
- targets: ['localhost:9854']

当我看到 localhost:9854/graph 时,它会给我指标。它是普罗米修斯网址。我试图将 contrib/prometheus-exporter/conf 中的 JSON 加载到 Grafana。

显示cannot read property 'result' of undefined

如何链接所有这三个?我关注了solr reference guide 和一些 GitHub 链接。但是我对prometheus和Grafana了解不多。我想查看 solr 指标。

我在 grafana 日志中看到了这个。

t=2020-05-21T19:16:28+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/1/api/v1/query status=502 remote_addr=[::1] time_ms=59134 size=0 referer=http://localhost:3000/datasources/edit/1/ t=2020-05-21T21:15:46+0530 lvl=eror msg="Data proxy error" logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy/1/api/v1/query_range remote_addr=[::1] referer="http://localhost:3000/d/NuzWo3gMk/solr-dashboard?orgId=1&refresh=1m" error="http: proxy error: read tcp [::1]:62395->[::1]:9854: read: connection reset by peer" t=2020-05-21T21:15:46+0530 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/1/api/v1/query_range status=502 remote_addr=[::1] time_ms=3 size=0 referer="http://localhost:3000/d/NuzWo3gMk/solr-dashboard?orgId=1&refresh=1m"

我用./bin/solr-exporter -p 9854 -b http://localhost:8983/solr -f ./conf/solr-exporter-config.xml & 开始Solr-exporter

【问题讨论】:

    标签: solr prometheus grafana


    【解决方案1】:

    尝试在 prometheus yml 配置中将 metrics-path 添加为“/”

     - job_name: 'Solr'
        metrics_path: '/'
        static_configs:
          - targets: ['localhost:9854']
          - labels :
              group: core
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 2019-12-30
      • 2020-07-03
      • 2018-05-25
      • 1970-01-01
      • 2022-01-13
      相关资源
      最近更新 更多