Remove 'zones' key from statuspoller

closes #20
This commit is contained in:
Blerim Sheqa 2018-04-05 11:54:15 +02:00
parent 16af7ffb5a
commit 8d605d18b8
9 changed files with 11 additions and 97 deletions

View File

@ -421,26 +421,6 @@
description: >
Number of not connected endpoints
- name: status.api.zones.demo.client_log_lag
type: integer
description: >
Lag of the replaylog
- name: status.api.zones.demo.connected
type: boolean
description: >
Zone connected
- name: status.api.zones.demo.endpoints
type: text
description: >
Endpoint names
- name: status.api.zones.demo.parent_zone
type: keyword
description: >
Parent zone
- name: status.avg_execution_time
type: integer
description: >

View File

@ -421,26 +421,6 @@
description: >
Number of not connected endpoints
- name: status.api.zones.demo.client_log_lag
type: integer
description: >
Lag of the replaylog
- name: status.api.zones.demo.connected
type: boolean
description: >
Zone connected
- name: status.api.zones.demo.endpoints
type: text
description: >
Endpoint names
- name: status.api.zones.demo.parent_zone
type: keyword
description: >
Parent zone
- name: status.avg_execution_time
type: integer
description: >

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,6 @@ import (
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
@ -32,7 +31,6 @@ func requestURL(bt *Icingabeat, method string, URL *url.URL) (*http.Response, er
skipSslVerify = true
}
fmt.Print(bt.config.SSL.CertificateAuthorities)
tlsConfig := &tls.Config{
InsecureSkipVerify: skipSslVerify,
RootCAs: certPool,

View File

@ -47,7 +47,6 @@ func (bt *Icingabeat) Run(b *beat.Beat) error {
go eventstream.Run()
}
fmt.Print(bt.config.Statuspoller.Interval)
if bt.config.Statuspoller.Interval > 0 {
var statuspoller *Statuspoller
statuspoller = NewStatuspoller(bt, bt.config)

View File

@ -56,6 +56,15 @@ func BuildStatusEvents(body []byte) []beat.Event {
switch statusvalue.(type) {
case map[string]interface{}:
if len(statusvalue.(map[string]interface{})) > 0 {
for key, value := range value.(map[string]interface{}) {
if key == "api" {
// "zones" can include a massive amount of data, depending
// on the number of connected agents and satellites
// since enough data is included in other keys, we're
// removing "zones" explicitly
delete(value.(map[string]interface{}), "zones")
}
}
event.Fields.Put(key, value)
}

View File

@ -877,38 +877,6 @@ type: integer
Number of not connected endpoints
[float]
=== `status.api.zones.demo.client_log_lag`
type: integer
Lag of the replaylog
[float]
=== `status.api.zones.demo.connected`
type: boolean
Zone connected
[float]
=== `status.api.zones.demo.endpoints`
type: text
Endpoint names
[float]
=== `status.api.zones.demo.parent_zone`
type: keyword
Parent zone
[float]
=== `status.avg_execution_time`

View File

@ -589,26 +589,6 @@
description: >
Number of not connected endpoints
- name: status.api.zones.demo.client_log_lag
type: integer
description: >
Lag of the replaylog
- name: status.api.zones.demo.connected
type: boolean
description: >
Zone connected
- name: status.api.zones.demo.endpoints
type: text
description: >
Endpoint names
- name: status.api.zones.demo.parent_zone
type: keyword
description: >
Parent zone
- name: status.avg_execution_time
type: integer
description: >