telegraf/plugins/inputs/kibana
Sebastian Spaink d67f75e557
docs: Remove warning not to remove go:embed (#11797)
Co-authored-by: Joshua Powers <powersj@fastmail.com>
2022-09-13 12:47:58 -05:00
..
test_environment Provide test environment for kibana input plugin (#8629) 2021-01-06 16:23:40 -06:00
README.md chore: Fix readme linter errors for input plugins E-L (#11214) 2022-06-07 15:37:08 -06:00
kibana.go docs: Remove warning not to remove go:embed (#11797) 2022-09-13 12:47:58 -05:00
kibana_test.go refactor: move from io/ioutil to io and os package (#9811) 2021-09-28 15:16:32 -06:00
sample.conf chore(inputs_a-l): migrate sample configs into separate files (#11132) 2022-05-18 11:31:52 -05:00
testdata_test6_3.go Add compatibility for Kibana 6.4 and later (#6923) 2020-01-23 12:08:16 -08:00
testdata_test6_5.go feat: add heap_size_limit field for input.kibana (#10243) 2021-12-14 13:25:45 -07:00

README.md

Kibana Input Plugin

The kibana plugin queries the Kibana API to obtain the service status.

  • Telegraf minimum version: 1.8
  • Kibana minimum tested version: 6.0

Configuration

# Read status information from one or more Kibana servers
[[inputs.kibana]]
  ## Specify a list of one or more Kibana servers
  servers = ["http://localhost:5601"]

  ## Timeout for HTTP requests
  timeout = "5s"

  ## HTTP Basic Auth credentials
  # username = "username"
  # password = "pa$$word"

  ## 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

Metrics

  • kibana
    • tags:
      • name (Kibana reported name)
      • source (Kibana server hostname or IP)
      • status (Kibana health: green, yellow, red)
      • version (Kibana version)
    • fields:
      • status_code (integer, green=1 yellow=2 red=3 unknown=0)
      • heap_total_bytes (integer)
      • heap_max_bytes (integer; deprecated in 1.13.3: use heap_total_bytes field)
      • heap_used_bytes (integer)
      • heap_size_limit (integer)
      • uptime_ms (integer)
      • response_time_avg_ms (float)
      • response_time_max_ms (integer)
      • concurrent_connections (integer)
      • requests_per_sec (float)

Example Output

kibana,host=myhost,name=my-kibana,source=localhost:5601,status=green,version=6.5.4 concurrent_connections=8i,heap_max_bytes=447778816i,heap_total_bytes=447778816i,heap_used_bytes=380603352i,requests_per_sec=1,response_time_avg_ms=57.6,response_time_max_ms=220i,status_code=1i,uptime_ms=6717489805i 1534864502000000000

Run example environment

Requires the following tools:

From the root of this project execute the following script: ./plugins/inputs/kibana/test_environment/run_test_env.sh

This will build the latest Telegraf and then start up Kibana and Elasticsearch, Telegraf will begin monitoring Kibana's status and write its results to the file /tmp/metrics.out in the Telegraf container.

Then you can attach to the telegraf container to inspect the file /tmp/metrics.out to see if the status is being reported.

The Visual Studio Code Remote - Containers extension provides an easy user interface to attach to the running container.