search
数据采集 采集源配置 Solr 指标采集

Solr 指标采集

简介

采集 Solr 指标上报到 DataFlux 中

前置条件

配置

进入 DataKit 安装目录下的 conf.d/db 目录,复制 solr.conf.sample 并命名为 solr.conf。示例如下:

[[inputs.solr]]
  ## specify a list of one or more Solr servers
  servers = ["http://localhost:8983"]
  ##
  ## specify a list of one or more Solr cores (default - all)
  # cores = ["main"]
  ##
  ## Optional HTTP Basic Auth Credentials
  # username = "username"
  # password = "pa$$word"

配置好后,重启 DataKit 即可生效

采集指标

指标 描述 类型 单位
core Core名称 string
handler handler名称 string
host 主机名 string
cumulative_evictions 清除的缓存总数 int
cumulative_lookups 查找的缓存总数 int
cumulative_inserts 插入的缓存总数 int
cumulative_hitratio hitratio的缓存总数 float
cumulative_hits 命中的缓存总数 int
evictions 清除的缓存数 int
lookups 查找的缓存数 int
inserts 插入的缓存数 int
hitratio hitratio的缓存数 float
hits 命中的缓存数 int
warmup_time int
deleted_docs 删除文档数 int
max_docs 最大文档数 int
num_docs 索引文档数 int
size int Byte
size_in_bytes int Byte

corehandlerhost指标为 tags,其他为 fields

示例输出

solr_cache,core=gettingstarted,handler=documentCache,host=ubt-server cumulative_hits=0i,inserts=0i,size=0i,cumulative_evictions=0i,evictions=0i,cumulative_hitratio=0,lookups=0i,cumulative_lookups=0i,warmup_time=0i,hitratio=0,cumulative_inserts=0i,hits=0i 1587885740000000000
solr_cache,core=gettingstarted,handler=filterCache,host=ubt-server cumulative_lookups=0i,warmup_time=0i,cumulative_hitratio=0,lookups=0i,inserts=0i,cumulative_inserts=0i,hitratio=0,cumulative_hits=0i,size=0i,evictions=0i,cumulative_evictions=0i,hits=0i 1587885740000000000
solr_cache,core=gettingstarted,handler=fieldValueCache,host=ubt-server evictions=0i,inserts=0i,lookups=0i,size=0i,cumulative_hits=0i,cumulative_evictions=0i,warmup_time=0i,cumulative_hitratio=0,hitratio=0,hits=0i,cumulative_inserts=0i,cumulative_lookups=0i 1587885740000000000
solr_cache,core=gettingstarted,handler=queryResultCache,host=ubt-server hits=0i,cumulative_inserts=0i,cumulative_lookups=0i,hitratio=0,warmup_time=0i,cumulative_hitratio=0,inserts=0i,evictions=0i,cumulative_evictions=0i,cumulative_hits=0i,size=0i,lookups=0i 1587885740000000000
solr_cache,core=gettingstarted,handler=perSegFilter,host=ubt-server cumulative_evictions=0i,evictions=0i,lookups=0i,size=0i,cumulative_inserts=0i,inserts=0i,warmup_time=0i,cumulative_hitratio=0,cumulative_hits=0i,hitratio=0,hits=0i,cumulative_lookups=0i 1587885740000000000
solr_core,core=gettingstarted,handler=core,host=ubt-server deleted_docs=0i,max_docs=0i,num_docs=0i 1587885740000000000
solr_core,core=gettingstarted,handler=searcher,host=ubt-server deleted_docs=0i,max_docs=0i,num_docs=0i 1587885740000000000
solr_admin,core=gettingstarted,host=ubt-server deleted_docs=0i,max_docs=0i,num_docs=0i,size_in_bytes=69i 1587885740000000000