search
数据采集 采集源配置 InfluxDB 监控指标采集

InfluxDB 监控指标采集

简介

本采集器用来采集给定 InfluxDB 服务器的指标数据。

内置视图

内置视图

视图Json文件内置视图

前置条件

  • 已安装 DataKit(DataKit 安装文档
  • InfluxDB 服务器
    • 运行 influxd version: InfluxDB v1.7.9 (git: 1.7 23bc63d43a8dc05f53afa46e3526ebb5578f3d88)

指标采集配置

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

[[inputs.influxdb]]

  ## Works with InfluxDB debug endpoints out of the box,
  ## but other services can use this format too.
  ## See the influxdb plugin's README for more details.

  ## Multiple URLs from which to read InfluxDB-formatted JSON
  ## Default is "http://localhost:8086/debug/vars".
  urls = [
    "http://localhost:8086/debug/vars"
  ]

  ## Username and password to send using HTTP Basic Authentication.
  # username = ""
  # password = ""

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

  ## http request & header timeout
  timeout = "5s"

配置好后,重启 DataKit 即可生效(DataKit 安装文档

日志采集配置

进入 DataKit 安装目录下的 conf.d/log 目录,复制 tailf.conf.sample 并命名为 tailf.conf。 末尾新添加一段tailf采集的input, 示例如下:

[[inputs.tailf]]
    logfiles = ["/Users/jiqiuxu/opt/zy/influxdb-1.8.3-1/influx.log"]
    source = "influxdb"
    pipeline_path = ""
    from_beginning = false

配置好后,重启 DataKit 即可生效(DataKit 安装文档

指标详解

  • 指标集:influxdb_database

    • bind
    • url
  • 指标集:influxdb_database

    • database
    • url
  • 指标集: influxdb_cq, influxdb_memstats, influxdb_queryExecutor, influxdb_runtime, influxdb_subscriber, influxdb_write

    • url
  • 指标集:influxdb_shard, influxdb_tsm1_cache, influxdb_tsm1_engine, influxdb_tsm1_filestore, influxdb_tsm1_wal

    • database
    • url
    • engine
    • indexType
    • path
    • retentionPolicy
    • walPath
  • 指标集:influxdb

    • n_shards
  • 指标集: influxdb_database

    • numMeasurements
    • numSeries
  • 指标集: influxdb_httpd

    • authFail
    • clientError
    • fluxQueryReq
    • fluxQueryReqDurationNs
    • pingReq
    • pointsWrittenDropped
    • pointsWrittenFail
    • pointsWrittenOK
    • promReadReq
    • promWriteReq
    • queryReq
    • queryReqDurationNs
    • queryRespBytes
    • recoveredPanics
    • req
    • reqActive
    • reqDurationNs
    • serverError
    • statusReq
    • writeReq
    • writeReqActive
    • writeReqBytes
    • writeReqDurationNs
  • 指标集: influxdb_cq

    • queryFail
    • queryOk
  • 指标集: influxdb_measurement

  • 指标集 : influxdb_memstats

    • alloc
    • buck_hash_sys
    • frees
    • gc_cpu_fraction
    • gc_sys
    • heap_alloc
    • heap_idle
    • heap_inuse
    • heap_objects
    • heap_released
    • heap_sys
    • last_gc
    • lookups
    • mallocs
    • mcache_inuse
    • mcache_sys
    • mspan_inuse
    • mspan_sys
    • next_gc
    • num_gc
    • other_sys
    • pause_ns
    • pause_total_ns
    • stack_inuse
    • stack_sys
    • sys
    • total_alloc
  • 指标集: influxdb_queryExecutor

    • queriesActive
    • queriesExecuted
    • queriesFinished
    • queryDurationNs
    • recoveredPanics
  • 指标集: influxdb_runtime

    • Alloc
    • Frees
    • HeapAlloc
    • HeapIdle
    • HeapInUse
    • HeapObjects
    • HeapReleased
    • HeapSys
    • Lookups
    • Mallocs
    • NumGC
    • NumGoroutine
    • PauseTotalNs
    • Sys
    • TotalAlloc
  • 指标集: influxdb_shard

    • diskBytes
    • fieldsCreate
    • seriesCreate
    • writeBytes
    • writePointsDropped
    • writePointsErr
    • writePointsOk
    • writeReq
    • writeReqErr
    • writeReqOk
  • 指标集: influxdb_subscriber

    • createFailures
    • pointsWritten
    • writeFailures
  • 指标集: influxdb_tsm1_cache

    • WALCompactionTimeMs
    • cacheAgeMs
    • cachedBytes
    • diskBytes
    • memBytes
    • snapshotCount
    • writeDropped
    • writeErr
    • writeOk
  • 指标集: influxdb_tsm1_engine

    • cacheCompactionDuration
    • cacheCompactionErr
    • cacheCompactions
    • cacheCompactionsActive
    • tsmFullCompactionDuration
    • tsmFullCompactionErr
    • tsmFullCompactionQueue
    • tsmFullCompactions
    • tsmFullCompactionsActive
    • tsmLevel1CompactionDuration
    • tsmLevel1CompactionErr
    • tsmLevel1CompactionQueue
    • tsmLevel1Compactions
    • tsmLevel1CompactionsActive
    • tsmLevel2CompactionDuration
    • tsmLevel2CompactionErr
    • tsmLevel2CompactionQueue
    • tsmLevel2Compactions
    • tsmLevel2CompactionsActive
    • tsmLevel3CompactionDuration
    • tsmLevel3CompactionErr
    • tsmLevel3CompactionErr
    • tsmLevel3Compactions
    • tsmLevel3CompactionsActive
    • tsmOptimizeCompactionDuration
    • tsmOptimizeCompactionErr
    • tsmOptimizeCompactionQueue
    • tsmOptimizeCompactions
    • tsmOptimizeCompactionsActive
  • 指标集: influxdb_tsm1_filestore

    • diskBytes
    • numFiles
  • 指标集: influxdb_tsm1_wal

    • currentSegmentDiskBytes
    • oldSegmentsDiskBytes
    • writeErr
    • writeOk
  • 指标集: influxdb_write

    • pointReq
    • pointReqLocal
    • req
    • subWriteDrop
    • subWriteOk
    • writeDrop
    • writeError
    • writeOk
    • writeTimeout