feat: add heap_size_limit field for input.kibana (#10243)
This commit is contained in:
parent
a2302c93fa
commit
c1550a7303
|
|
@ -42,6 +42,7 @@ The `kibana` plugin queries the [Kibana][] API to obtain the service status.
|
||||||
- heap_total_bytes (integer)
|
- heap_total_bytes (integer)
|
||||||
- heap_max_bytes (integer; deprecated in 1.13.3: use `heap_total_bytes` field)
|
- heap_max_bytes (integer; deprecated in 1.13.3: use `heap_total_bytes` field)
|
||||||
- heap_used_bytes (integer)
|
- heap_used_bytes (integer)
|
||||||
|
- heap_size_limit (integer)
|
||||||
- uptime_ms (integer)
|
- uptime_ms (integer)
|
||||||
- response_time_avg_ms (float)
|
- response_time_avg_ms (float)
|
||||||
- response_time_max_ms (integer)
|
- response_time_max_ms (integer)
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ type memory struct {
|
||||||
type heap struct {
|
type heap struct {
|
||||||
TotalInBytes int64 `json:"total_in_bytes"`
|
TotalInBytes int64 `json:"total_in_bytes"`
|
||||||
UsedInBytes int64 `json:"used_in_bytes"`
|
UsedInBytes int64 `json:"used_in_bytes"`
|
||||||
|
SizeLimit int64 `json:"size_limit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const sampleConfig = `
|
const sampleConfig = `
|
||||||
|
|
@ -222,6 +223,7 @@ func (k *Kibana) gatherKibanaStatus(baseURL string, acc telegraf.Accumulator) er
|
||||||
fields["heap_max_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.TotalInBytes
|
fields["heap_max_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.TotalInBytes
|
||||||
fields["heap_total_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.TotalInBytes
|
fields["heap_total_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.TotalInBytes
|
||||||
fields["heap_used_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.UsedInBytes
|
fields["heap_used_bytes"] = kibanaStatus.Metrics.Process.Memory.Heap.UsedInBytes
|
||||||
|
fields["heap_size_limit"] = kibanaStatus.Metrics.Process.Memory.Heap.SizeLimit
|
||||||
} else {
|
} else {
|
||||||
fields["uptime_ms"] = int64(kibanaStatus.Metrics.UptimeInMillis)
|
fields["uptime_ms"] = int64(kibanaStatus.Metrics.UptimeInMillis)
|
||||||
fields["heap_max_bytes"] = kibanaStatus.Metrics.Process.Mem.HeapMaxInBytes
|
fields["heap_max_bytes"] = kibanaStatus.Metrics.Process.Mem.HeapMaxInBytes
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,7 @@ var kibanaStatusExpected6_5 = map[string]interface{}{
|
||||||
"heap_total_bytes": int64(149954560),
|
"heap_total_bytes": int64(149954560),
|
||||||
"heap_max_bytes": int64(149954560),
|
"heap_max_bytes": int64(149954560),
|
||||||
"heap_used_bytes": int64(126274392),
|
"heap_used_bytes": int64(126274392),
|
||||||
|
"heap_size_limit": int64(1501560832),
|
||||||
"uptime_ms": int64(2173595337),
|
"uptime_ms": int64(2173595337),
|
||||||
"response_time_avg_ms": float64(12.5),
|
"response_time_avg_ms": float64(12.5),
|
||||||
"response_time_max_ms": int64(123),
|
"response_time_max_ms": int64(123),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue