跳转至

Solr

·


Solr 采集器,用于采集 Solr Cache 和 Request Times 等的统计信息。

配置

前置条件

  • DataKit 使用 Solr Metrics API 采集指标数据,支持 Solr 7.0 及以上版本。
  • 也可用于 Solr 6.6,但指标数据不完整。

已测试的版本:

  • 8.11.2
  • 7.0.0

采集器配置

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

[[inputs.solr]]
  ##(optional) collect interval, default is 10 seconds
  interval = '10s'

  ## specify a list of one or more Solr servers
  servers = ["http://localhost:8983"]

  ## Optional HTTP Basic Auth Credentials
  # username = "username"
  # password = "pa$$word"

  ## Set true to enable election
  election = true

  # [inputs.solr.log]
  # files = []
  # #grok pipeline script path
  # pipeline = "solr.p"

  [inputs.solr.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"

配置好后,重启 DataKit 即可。

目前可以通过 ConfigMap 方式注入采集器配置来开启采集器。


如需采集 Solr 的日志,可在 solr.conf 中 将 files 打开,并写入 Solr 日志文件的绝对路径。比如:

[inputs.solr.log]
    # 填入绝对路径
    files = ["/path/to/demo.log"]

指标

以下所有数据采集,默认会追加全局选举 tag,也可以在配置中通过 [inputs.solr.tags] 指定其它标签:

 [inputs.solr.tags]
  # some_tag = "some_value"
  # more_tag = "some_other_value"
  # ...

solr_cache

Tags & Fields Description
category
(tag)
Solr metric category that owns the metric.
core
(tag)
Solr core that emitted the metric.
group
(tag)
Solr metric group that owns the metric.
host
(tag)
Hostname of the Solr node.
instance
(tag)
Instance name, generated based on server address.
name
(tag)
Name of the Solr cache.
cumulative_evictions Number of cache evictions across all caches since this node has been running.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
cumulative_hitratio Ratio of cache hits to lookups across all the caches since this node has been running.
Type: float | (gauge)
Unit: percent,percent
Tagged by: category, core, group, host, instance, name
cumulative_hits Number of cache hits across all the caches since this node has been running.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
cumulative_inserts Number of cache insertions across all the caches since this node has been running.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
cumulative_lookups Number of cache lookups across all the caches since this node has been running.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
evictions Number of cache evictions for the current index searcher.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
hitratio Ratio of cache hits to lookups for the current index searcher.
Type: float | (gauge)
Unit: percent,percent
Tagged by: category, core, group, host, instance, name
hits Number of hits for the current index searcher.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
inserts Number of inserts into the cache.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
lookups Number of lookups against the cache.
Type: int | (count)
Unit: count
Tagged by: category, core, group, host, instance, name
max_ram Maximum heap that should be used by the cache beyond which keys will be evicted.
Type: int | (gauge)
Unit: digital,MB
Tagged by: category, core, group, host, instance, name
ram_bytes_used Actual heap usage of the cache at that particular instance.
Type: int | (gauge)
Unit: digital,B
Tagged by: category, core, group, host, instance, name
size Number of entries in the cache at that particular instance.
Type: int | (gauge)
Unit: count
Tagged by: category, core, group, host, instance, name
warmup Warm-up time for the registered index searcher. This time is taken in account for the "auto-warming" of caches.
Type: int | (gauge)
Unit: time,ms
Tagged by: category, core, group, host, instance, name

solr_request_times

Tags & Fields Description
category
(tag)
Solr metric category that owns the metric.
core
(tag)
Solr core that emitted the metric.
group
(tag)
Solr metric group that owns the metric.
handler
(tag)
Solr request handler path or name.
host
(tag)
Hostname of the Solr node.
instance
(tag)
Instance name, generated based on server address.
count Total number of requests made since the Solr process was started.
Type: int | (count)
Unit: count
Tagged by: category, core, group, handler, host, instance
max Maximum request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
mean Mean request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
median Median request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
min Minimum request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
p75 75th percentile request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
p95 95th percentile request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
p99 99th percentile request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
p999 99.9th percentile request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance
rate_15min Requests per second received over the past 15 minutes.
Type: float | (gauge)
Unit: throughput,reqps
Tagged by: category, core, group, handler, host, instance
rate_1min Requests per second received over the past 1 minute.
Type: float | (gauge)
Unit: throughput,reqps
Tagged by: category, core, group, handler, host, instance
rate_5min Requests per second received over the past 5 minutes.
Type: float | (gauge)
Unit: throughput,reqps
Tagged by: category, core, group, handler, host, instance
rate_mean Average number of requests per second received.
Type: float | (gauge)
Unit: throughput,reqps
Tagged by: category, core, group, handler, host, instance
stddev Standard deviation of request processing time.
Type: float | (gauge)
Unit: time,ms
Tagged by: category, core, group, handler, host, instance

solr_searcher

Tags & Fields Description
category
(tag)
Solr metric category that owns the metric.
core
(tag)
Solr core that emitted the metric.
group
(tag)
Solr metric group that owns the metric.
host
(tag)
Hostname of the Solr node.
instance
(tag)
Instance name, generated based on server address.
deleted_docs The number of deleted documents.
Type: int | (gauge)
Unit: count
Tagged by: category, core, group, host, instance
max_docs The largest possible document number.
Type: int | (gauge)
Unit: count
Tagged by: category, core, group, host, instance
num_docs The total number of indexed documents.
Type: int | (gauge)
Unit: count
Tagged by: category, core, group, host, instance
warmup The time spent warming up.
Type: int | (gauge)
Unit: time,ms
Tagged by: category, core, group, host, instance

日志

切割日志示例:

2013-10-01 12:33:08.319 INFO (org.apache.solr.core.SolrCore) [collection1] webapp.reporter

切割后字段:

字段名 字段值
Reporter webapp.reporter
status INFO
thread org.apache.solr.core.SolrCore
time 1380630788319000000

文档评价

文档内容是否对您有帮助? ×