diff --git a/Makefile b/Makefile index ad458d9aa9f..3324b6ef9aa 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ LICENSE_FILE=licenses/APACHE-LICENSE-2.0.txt ELASTIC_LICENSE_FILE=licenses/ELASTIC-LICENSE.txt NOW=$(shell date -u '+%Y-%m-%dT%H:%M:%S') GOBUILD_FLAGS=-i -ldflags "-s -X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.buildTime=$(NOW) -X $(BEAT_PATH)/vendor/github.com/elastic/beats/libbeat/version.commit=$(COMMIT_ID)" +FIELDS_FILE_PATH=processor # Path to the libbeat Makefile -include $(ES_BEATS)/libbeat/scripts/Makefile @@ -24,7 +25,7 @@ GOBUILD_FLAGS=-i -ldflags "-s -X $(BEAT_PATH)/vendor/github.com/elastic/beats/li update-beats: rm -rf vendor/github.com/elastic/beats @govendor fetch github.com/elastic/beats/...@$(BEATS_VERSION) - @govendor fetch github.com/elastic/beats/libbeat/kibana@$(BEATS_VERSION) + @govendor fetch github.com/elastic/beats/libbeat/generator/fields@$(BEATS_VERSION) github.com/elastic/beats/libbeat/kibana@$(BEATS_VERSION) @BEATS_VERSION=$(BEATS_VERSION) script/update_beats.sh @$(MAKE) update @echo --- Use this commit message: Update beats framework to `cat vendor/vendor.json | python -c 'import sys, json; print([p["revision"] for p in json.load(sys.stdin)["package"] if p["path"] == "github.com/elastic/beats/libbeat/beat"][0][:7])'` @@ -39,18 +40,7 @@ before-build: # Collects all dependencies and then calls update .PHONY: collect -collect: imports fields go-generate create-docs notice - -# Generates imports for all modules and metricsets -.PHONY: imports -imports: - @mkdir -p include - @mkdir -p processor - -.PHONY: fields -fields: - @cat _meta/fields.common.yml > _meta/fields.generated.yml - @cat processor/*/_meta/fields.yml >> _meta/fields.generated.yml +collect: fields go-generate create-docs notice .PHONY: go-generate go-generate: diff --git a/NOTICE.txt b/NOTICE.txt index c2cc98faf9a..1cc6a3da9bb 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -211,7 +211,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/elastic/beats Version: master -Revision: c4593443ab5943ac5dd3465d88236b0cf417fab6 +Revision: 245b3e1b2ff12449007d6aa01dceee050d40ffa5 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/beats/LICENSE.txt: -------------------------------------------------------------------- diff --git a/_beats/dev-tools/cmd/dashboards/export_dashboards.go b/_beats/dev-tools/cmd/dashboards/export_dashboards.go index 4dfe8709f18..7d8121fc77d 100644 --- a/_beats/dev-tools/cmd/dashboards/export_dashboards.go +++ b/_beats/dev-tools/cmd/dashboards/export_dashboards.go @@ -13,6 +13,7 @@ import ( "strings" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/kibana" ) var exportAPI = "/api/kibana/dashboards/export" @@ -29,39 +30,6 @@ func makeURL(url, path string, params url.Values) string { return strings.Join([]string{url, path, "?", params.Encode()}, "") } -func ExtractIndexPattern(body []byte) ([]byte, error) { - var contents common.MapStr - - err := json.Unmarshal(body, &contents) - if err != nil { - return nil, err - } - - objects, ok := contents["objects"].([]interface{}) - if !ok { - return nil, fmt.Errorf("Key objects not found or wrong type") - } - - var result []interface{} - for _, obj := range objects { - _type, ok := obj.(map[string]interface{})["type"].(string) - if !ok { - return nil, fmt.Errorf("type key not found or not string") - } - if _type != "index-pattern" || indexPattern { - result = append(result, obj) - } - } - contents["objects"] = result - - newBody, err := json.MarshalIndent(contents, "", " ") - if err != nil { - return nil, fmt.Errorf("Error mashaling: %v", err) - } - - return newBody, nil -} - func Export(client *http.Client, conn string, dashboard string, out string) error { params := url.Values{} @@ -90,19 +58,42 @@ func Export(client *http.Client, conn string, dashboard string, out string) erro return fmt.Errorf("HTTP GET %s fails with %s, %s", fullURL, resp.Status, body) } - body, err = ExtractIndexPattern(body) + data, err := kibana.RemoveIndexPattern(body) if err != nil { return fmt.Errorf("fail to extract the index pattern: %v", err) } - err = ioutil.WriteFile(out, body, 0666) + objects := data["objects"].([]interface{}) + for _, obj := range objects { + o := obj.(common.MapStr) + + decodeValue(o, "attributes.uiStateJSON") + decodeValue(o, "attributes.visState") + decodeValue(o, "attributes.optionsJSON") + decodeValue(o, "attributes.panelsJSON") + decodeValue(o, "attributes.kibanaSavedObjectMeta.searchSourceJSON") + } + data["objects"] = objects + err = ioutil.WriteFile(out, []byte(data.StringToPrint()), 0666) if !quiet { fmt.Printf("The dashboard %s was exported under the %s file\n", dashboard, out) } return err } +func decodeValue(data common.MapStr, key string) { + v, err := data.GetValue(key) + if err != nil { + return + } + s := v.(string) + var d common.MapStr + json.Unmarshal([]byte(s), &d) + + data.Put(key, d) +} + func ReadManifest(file string) ([]map[string]string, error) { cfg, err := common.LoadFile(file) if err != nil { diff --git a/_beats/dev-tools/cmd/index_template/index_template.go b/_beats/dev-tools/cmd/index_template/index_template.go deleted file mode 100644 index 78d04daa204..00000000000 --- a/_beats/dev-tools/cmd/index_template/index_template.go +++ /dev/null @@ -1,60 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - - "github.com/elastic/beats/libbeat/template" - "github.com/elastic/beats/libbeat/version" -) - -// main generates index templates for the beats -func main() { - beatVersion := version.GetDefaultVersion() - index := flag.String("index", "", "Base index name. Normally {beat_name} (required)") - output := flag.String("output", "", "Required: Full path to the output file (required)") - version := flag.String("es.version", beatVersion, "Elasticsearch version") - file := flag.String("file", "", "Path to fields.yml file") - - flag.Parse() - - if len(*file) == 0 { - fmt.Fprintf(os.Stderr, "File path cannot be empty") - os.Exit(1) - } - - if *index == "" { - fmt.Fprintf(os.Stderr, "index is empty. It must be set.") - os.Exit(1) - } - - if _, err := os.Stat(*file); err != nil { - fmt.Fprintf(os.Stderr, "Error during loading -file %s with error: %s", *file, err) - os.Exit(1) - } - - // Make it compatible with the sem versioning - if *version == "2x" { - *version = "2.0.0" - } - - tmpl, err := template.New(beatVersion, *index, *version, template.TemplateConfig{}) - if err != nil { - fmt.Fprintf(os.Stderr, "Error generating template: %+v", err) - os.Exit(1) - } - - templateString, err := tmpl.Load(*file) - if err != nil { - fmt.Fprintf(os.Stderr, "Error generating template: %+v", err) - os.Exit(1) - } - - err = ioutil.WriteFile(*output, []byte(templateString.StringToPrint()), 0644) - if err != nil { - fmt.Fprintf(os.Stderr, "Error writing output: %s", err) - os.Exit(1) - } -} diff --git a/_beats/libbeat/Makefile b/_beats/libbeat/Makefile index 75633188f77..d63820feabc 100644 --- a/_beats/libbeat/Makefile +++ b/_beats/libbeat/Makefile @@ -1,15 +1,10 @@ BEAT_NAME=libbeat TEST_ENVIRONMENT?=true SYSTEM_TESTS=true +FIELDS_FILE_PATH=processors include scripts/Makefile -# Collects all fields from processors -.PHONY: fields -fields: - @cp _meta/fields.common.yml _meta/fields.generated.yml - @cat processors/*/_meta/fields.yml >> _meta/fields.generated.yml - # Collects all dependencies and then calls update .PHONY: collect -collect: fields +collect: libbeat_fields diff --git a/_beats/libbeat/scripts/Makefile b/_beats/libbeat/scripts/Makefile index a8197a46288..4c281b7dfae 100755 --- a/_beats/libbeat/scripts/Makefile +++ b/_beats/libbeat/scripts/Makefile @@ -304,9 +304,19 @@ coverage-report: test ! -s ${COVERAGE_DIR}/unit.cov || go tool cover -html=${COVERAGE_DIR}/unit.cov -o ${COVERAGE_DIR}/unit.html +.PHONY: fields +fields: + echo $(PWD) + @go run ${ES_BEATS}/libbeat/scripts/cmd/global_fields/main.go --es_beats_path $(ES_BEATS) --beat_path $(PWD) $(FIELDS_FILE_PATH) + + +.PHONY: libbeat_fields +libbeat_fields: + @$(MAKE) -C ${ES_BEATS}/libbeat fields + .PHONY: update update: ## @build Update expects the most recent version of libbeat in the GOPATH -update: python-env collect +update: python-env libbeat_fields collect @echo "Updating generated files for ${BEAT_NAME}" @# Update config files. @@ -324,15 +334,7 @@ ifeq ($(BEAT_REF_YAML),true) @chmod 0640 ${BEAT_NAME}.reference.yml endif - @# Update libbeat fields.generated.yml - @$(MAKE) -C ${ES_BEATS}/libbeat fields - - @# Update fields.yml - @test -s _meta/fields.generated.yml || cp _meta/fields.yml _meta/fields.generated.yml -ifeq ($(BEAT_NAME), libbeat) - @cp ${ES_BEATS}/libbeat/_meta/fields.generated.yml fields.yml -else - @cat ${ES_BEATS}/libbeat/_meta/fields.generated.yml _meta/fields.generated.yml > fields.yml +ifneq ($(BEAT_NAME), libbeat) mkdir -p include go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -pkg include fields.yml $(BEAT_NAME) > include/fields.go endif @@ -355,10 +357,6 @@ docs: ## @build Builds the documents for the beat docs-preview: ## @build Preview the documents for the beat in the browser PREVIEW=1 $(MAKE) docs -.PHONY: index-template -index-template: ## @build Generate index templates for the given $VERSION. This is for manual testing. - go run ${ES_BEATS}/dev-tools/cmd/index_template/index_template.go -index ${BEAT_INDEX_PREFIX} -output ${BEAT_GOPATH}/src/${BEAT_PATH}/${BEAT_NAME}.template-es${VERSION}.json -file ${BEAT_GOPATH}/src/${BEAT_PATH}/fields.yml -es.version=${VERSION} - ### KIBANA FILES HANDLING ### ES_URL?=http://localhost:9200 KIBANA_URL?=http://localhost:5601 diff --git a/_beats/libbeat/scripts/cmd/global_fields/main.go b/_beats/libbeat/scripts/cmd/global_fields/main.go new file mode 100644 index 00000000000..ccee1ffc87a --- /dev/null +++ b/_beats/libbeat/scripts/cmd/global_fields/main.go @@ -0,0 +1,56 @@ +package main + +import ( + "flag" + "fmt" + "os" + "path/filepath" + + "github.com/elastic/beats/libbeat/generator/fields" +) + +func main() { + esBeatsPath := flag.String("es_beats_path", "..", "Path to elastic/beats") + beatPath := flag.String("beat_path", ".", "Path to your Beat") + flag.Parse() + + beatFieldsPath := flag.Args() + name := filepath.Base(*beatPath) + + err := os.MkdirAll(filepath.Join(*beatPath, "_meta"), 0744) + if err != nil { + fmt.Printf("Cannot creata _meta dir for %s: %v\n", name, err) + os.Exit(1) + } + + if len(beatFieldsPath) == 0 { + fmt.Println("No field files to collect") + err = fields.AppendFromLibbeat(*esBeatsPath, *beatPath) + if err != nil { + fmt.Printf("Cannot generate global fields.yml for %s: %v\n", name, err) + os.Exit(2) + } + return + } + + if *beatPath == "" { + fmt.Println("beat_path cannot be empty") + os.Exit(1) + } + + pathToModules := filepath.Join(*beatPath, beatFieldsPath[0]) + fieldFiles, err := fields.CollectModuleFiles(pathToModules) + if err != nil { + fmt.Printf("Cannot collect fields.yml files: %v\n", err) + os.Exit(2) + + } + + err = fields.Generate(*esBeatsPath, *beatPath, fieldFiles) + if err != nil { + fmt.Printf("Cannot generate global fields.yml file for %s: %v\n", name, err) + os.Exit(3) + } + + fmt.Printf("Generated fields.yml for %s\n", name) +} diff --git a/_beats/libbeat/scripts/cmd/global_fields/main_test.go b/_beats/libbeat/scripts/cmd/global_fields/main_test.go new file mode 100644 index 00000000000..5957e26f82e --- /dev/null +++ b/_beats/libbeat/scripts/cmd/global_fields/main_test.go @@ -0,0 +1,792 @@ +package main + +import ( + "path/filepath" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/elastic/beats/libbeat/generator/fields" +) + +type testcase struct { + fieldsPath string + files []*fields.YmlFile +} + +var ( + beatsPath = filepath.Join("..", "..", "..", "..") + filebeatFiles = []*fields.YmlFile{ + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "apache2", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "apache2", "access", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "apache2", "error", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "auditd", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "auditd", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "icinga", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "icinga", "debug", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "icinga", "main", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "icinga", "startup", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "iis", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "iis", "access", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "iis", "error", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "kafka", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "kafka", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "logstash", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "logstash", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "logstash", "slowlog", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "mongodb", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "mongodb", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "mysql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "mysql", "error", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "mysql", "slowlog", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "nginx", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "nginx", "access", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "nginx", "error", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "osquery", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "osquery", "result", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "postgresql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "postgresql", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "redis", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "redis", "log", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "redis", "slowlog", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "system", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "system", "auth", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "system", "syslog", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "traefik", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "filebeat", "module", "traefik", "access", "_meta", "fields.yml"), + Indent: 8, + }, + } + heartbeatFiles = []*fields.YmlFile{ + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "heartbeat", "monitors", "active", "dialchain", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "heartbeat", "monitors", "active", "http", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "heartbeat", "monitors", "active", "icmp", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "heartbeat", "monitors", "active", "tcp", "_meta", "fields.yml"), + Indent: 0, + }, + } + libbeatFiles = []*fields.YmlFile{ + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "libbeat", "processors", "add_cloud_metadata", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "libbeat", "processors", "add_docker_metadata", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "libbeat", "processors", "add_host_metadata", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "libbeat", "processors", "add_kubernetes_metadata", "_meta", "fields.yml"), + Indent: 0, + }, + } + metricbeatFiles = []*fields.YmlFile{ + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "aerospike", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "aerospike", "namespace", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "apache", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "apache", "status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "cluster_disk", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "cluster_health", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "cluster_status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "monitor_health", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "osd_df", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "osd_tree", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "ceph", "pool_disk", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "couchbase", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "couchbase", "bucket", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "couchbase", "cluster", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "couchbase", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "container", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "cpu", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "diskio", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "healthcheck", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "image", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "info", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "memory", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "docker", "network", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "dropwizard", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "dropwizard", "collector", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "elasticsearch", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "elasticsearch", "index", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "elasticsearch", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "elasticsearch", "node_stats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "etcd", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "etcd", "leader", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "etcd", "self", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "etcd", "store", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "golang", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "golang", "expvar", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "golang", "heap", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "graphite", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "graphite", "server", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "haproxy", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "haproxy", "info", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "haproxy", "stat", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "http", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "http", "json", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "http", "server", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "jolokia", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "jolokia", "jmx", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kafka", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kafka", "consumergroup", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kafka", "partition", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kibana", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kibana", "status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "container", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "event", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "pod", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_container", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_deployment", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_pod", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_replicaset", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "state_statefulset", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "system", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kubernetes", "volume", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kvm", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "kvm", "dommemstat", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "logstash", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "logstash", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "logstash", "node_stats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "memcached", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "memcached", "stats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mongodb", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mongodb", "collstats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mongodb", "dbstats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mongodb", "status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "munin", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "munin", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mysql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "mysql", "status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "nginx", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "nginx", "stubstatus", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "php_fpm", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "php_fpm", "pool", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "postgresql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "postgresql", "activity", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "postgresql", "bgwriter", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "postgresql", "database", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "prometheus", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "prometheus", "collector", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "prometheus", "stats", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "rabbitmq", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "rabbitmq", "connection", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "rabbitmq", "node", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "rabbitmq", "queue", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "redis", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "redis", "info", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "redis", "keyspace", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "core", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "cpu", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "diskio", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "filesystem", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "fsstat", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "load", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "memory", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "network", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "process", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "process_summary", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "raid", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "socket", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "system", "uptime", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "uwsgi", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "uwsgi", "status", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "vsphere", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "vsphere", "datastore", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "vsphere", "host", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "vsphere", "virtualmachine", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "windows", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "windows", "perfmon", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "windows", "service", "_meta", "fields.yml"), + Indent: 8, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "zookeeper", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "metricbeat", "module", "zookeeper", "mntr", "_meta", "fields.yml"), + Indent: 8, + }, + } + packetbeatFiles = []*fields.YmlFile{ + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "amqp", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "cassandra", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "dns", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "http", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "icmp", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "memcache", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "mongodb", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "mysql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "nfs", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "pgsql", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "redis", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "thrift", "_meta", "fields.yml"), + Indent: 0, + }, + &fields.YmlFile{ + Path: filepath.Join(beatsPath, "packetbeat", "protos", "tls", "_meta", "fields.yml"), + Indent: 0, + }, + } +) + +// TestCollectModuleFiles validates if the required files are collected +func TestCollectModuleFiles(t *testing.T) { + cases := []testcase{ + testcase{ + fieldsPath: filepath.Join(beatsPath, "filebeat", "module"), + files: filebeatFiles, + }, + testcase{ + fieldsPath: filepath.Join(beatsPath, "heartbeat", "monitors", "active"), + files: heartbeatFiles, + }, + testcase{ + fieldsPath: filepath.Join(beatsPath, "libbeat", "processors"), + files: libbeatFiles, + }, + testcase{ + fieldsPath: filepath.Join(beatsPath, "metricbeat", "module"), + files: metricbeatFiles, + }, + testcase{ + fieldsPath: filepath.Join(beatsPath, "packetbeat", "protos"), + files: packetbeatFiles, + }, + } + + for _, c := range cases { + fieldFiles, err := fields.CollectModuleFiles(c.fieldsPath) + if err != nil { + t.Fatal(err) + } + assert.True(t, reflect.DeepEqual(fieldFiles, c.files)) + } +} diff --git a/_beats/libbeat/scripts/unpack_dashboards.py b/_beats/libbeat/scripts/unpack_dashboards.py new file mode 100644 index 00000000000..a9622797836 --- /dev/null +++ b/_beats/libbeat/scripts/unpack_dashboards.py @@ -0,0 +1,53 @@ +import json +import sys +import glob +import argparse + + +def transform_data(data, method): + for obj in data["objects"]: + if "uiStateJSON" in obj["attributes"]: + obj["attributes"]["uiStateJSON"] = method(obj["attributes"]["uiStateJSON"]) + + if "optionsJSON" in obj["attributes"]: + obj["attributes"]["optionsJSON"] = method(obj["attributes"]["optionsJSON"]) + + if "panelsJSON" in obj["attributes"]: + obj["attributes"]["panelsJSON"] = method(obj["attributes"]["panelsJSON"]) + + if "visState" in obj["attributes"]: + obj["attributes"]["visState"] = method(obj["attributes"]["visState"]) + + if "kibanaSavedObjectMeta" in obj["attributes"] and "searchSourceJSON" in obj["attributes"]["kibanaSavedObjectMeta"]: + obj["attributes"]["kibanaSavedObjectMeta"]["searchSourceJSON"] = method( + obj["attributes"]["kibanaSavedObjectMeta"]["searchSourceJSON"]) + + +def transform_file(path, method): + with open(path) as f: + data = json.load(f) + + transform_data(data, method) + return data + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser(description="Convert dashboards") + parser.add_argument("--transform", help="Decode or encode", default="encode") + parser.add_argument("--glob", help="Glob pattern") + + args = parser.parse_args() + + paths = glob.glob(args.glob) + + method = json.dumps + if args.transform == "decode": + method = json.loads + + for path in paths: + data = transform_file(path, method) + new_data = json.dumps(data, sort_keys=True, indent=4) + + with open(path, 'w') as f: + f.write(new_data) diff --git a/_beats/testing/environments/5x.yml b/_beats/testing/environments/5.x.yml similarity index 87% rename from _beats/testing/environments/5x.yml rename to _beats/testing/environments/5.x.yml index 31d4412b229..e0f92a1c6bb 100644 --- a/_beats/testing/environments/5x.yml +++ b/_beats/testing/environments/5.x.yml @@ -6,6 +6,8 @@ services: image: docker.elastic.co/elasticsearch/elasticsearch:5.6.9 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200"] + retries: 300 + interval: 1s environment: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - "network.host=" @@ -17,6 +19,8 @@ services: image: docker.elastic.co/logstash/logstash:5.6.9 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] + retries: 300 + interval: 1s volumes: - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro - ./docker/logstash/pki:/etc/pki:ro @@ -25,4 +29,5 @@ services: image: docker.elastic.co/kibana/kibana:5.6.9 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5601"] - retries: 6 + retries: 300 + interval: 1s diff --git a/_beats/testing/environments/6.0.yml b/_beats/testing/environments/6.0.yml new file mode 100644 index 00000000000..371d270b603 --- /dev/null +++ b/_beats/testing/environments/6.0.yml @@ -0,0 +1,34 @@ +# This is the latest 6.0 environment. + +version: '2.1' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch-platinum:6.0.1 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9200"] + retries: 300 + interval: 1s + environment: + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "network.host=" + - "transport.host=127.0.0.1" + - "http.host=0.0.0.0" + - "xpack.security.enabled=false" + + logstash: + image: docker.elastic.co/logstash/logstash:6.0.1 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] + retries: 300 + interval: 1s + volumes: + - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro + - ./docker/logstash/pki:/etc/pki:ro + + + kibana: + image: docker.elastic.co/kibana/kibana:6.0.1 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5601"] + retries: 300 + interval: 1s diff --git a/_beats/testing/environments/latest.yml b/_beats/testing/environments/latest.yml index 66ca8c05d16..180fa3b9165 100644 --- a/_beats/testing/environments/latest.yml +++ b/_beats/testing/environments/latest.yml @@ -7,6 +7,8 @@ services: image: docker.elastic.co/elasticsearch/elasticsearch-platinum:6.2.4 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200"] + retries: 300 + interval: 1s environment: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - "network.host=" @@ -18,6 +20,8 @@ services: image: docker.elastic.co/logstash/logstash:6.2.4 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] + retries: 300 + interval: 1s volumes: - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro - ./docker/logstash/pki:/etc/pki:ro @@ -26,4 +30,5 @@ services: image: docker.elastic.co/kibana/kibana:6.2.4 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5601"] - retries: 6 + retries: 300 + interval: 1s diff --git a/_beats/vendor/vendor.json b/_beats/vendor/vendor.json index 05271ff437b..24cd57e17db 100644 --- a/_beats/vendor/vendor.json +++ b/_beats/vendor/vendor.json @@ -369,12 +369,12 @@ "revisionTime": "2016-08-05T00:47:13Z" }, { - "checksumSHA1": "hAB/G2FIWYwg3Rujgpt6UPtHMis=", + "checksumSHA1": "qghOCT8VCZFNPvu8/LCmletBKd8=", "path": "github.com/elastic/go-libaudit", - "revision": "55225d06b15c74082f9a7af75aa4284dbe48d20a", - "revisionTime": "2018-05-03T13:36:58Z", - "version": "v0.2.1", - "versionExact": "v0.2.1" + "revision": "c18782ee4f957de48620718231d20ca12c8dc4e9", + "revisionTime": "2018-05-25T13:51:51Z", + "version": "v0.3.0", + "versionExact": "v0.3.0" }, { "checksumSHA1": "3V0tnqlCgmCXnbocuTqUKluynm8=", diff --git a/script/update_beats.sh b/script/update_beats.sh index 073e648e448..efc5dfa6a84 100755 --- a/script/update_beats.sh +++ b/script/update_beats.sh @@ -23,6 +23,7 @@ git clone https://github.com/elastic/beats.git ${GIT_CLONE} # sync rsync -crpv --delete \ --exclude=dev-tools/packer/readme.md.j2 \ + --exclude="dev-tools/packer/platforms/darwin/preference-pane/***" \ --include="dev-tools/***" \ --include="script/***" \ --include="testing/***" \ diff --git a/vendor/github.com/elastic/beats/NOTICE.txt b/vendor/github.com/elastic/beats/NOTICE.txt index a92cd504017..c4df601f505 100644 --- a/vendor/github.com/elastic/beats/NOTICE.txt +++ b/vendor/github.com/elastic/beats/NOTICE.txt @@ -373,8 +373,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/elastic/go-libaudit -Version: v0.2.1 -Revision: 55225d06b15c74082f9a7af75aa4284dbe48d20a +Version: v0.3.0 +Revision: c18782ee4f957de48620718231d20ca12c8dc4e9 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-libaudit/LICENSE.txt: -------------------------------------------------------------------- diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/autodiscover.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/autodiscover.go index 37f70160fb4..8c4888fe8db 100644 --- a/vendor/github.com/elastic/beats/libbeat/autodiscover/autodiscover.go +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/autodiscover.go @@ -1,17 +1,24 @@ package autodiscover import ( + "time" + + "github.com/pkg/errors" + "github.com/elastic/beats/libbeat/autodiscover/meta" "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/cfgfile" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/common/bus" "github.com/elastic/beats/libbeat/logp" - - "github.com/mitchellh/hashstructure" ) -const debugK = "autodiscover" +const ( + debugK = "autodiscover" + + // If a config reload fails after a new event, a new reload will be run after this period + retryPeriod = 10 * time.Second +) // TODO autodiscover providers config reload @@ -38,7 +45,8 @@ type Autodiscover struct { defaultPipeline beat.Pipeline adapter Adapter providers []Provider - runners *cfgfile.Registry + configs map[uint64]*cfgfile.ConfigWithMeta + runners *cfgfile.RunnerList meta *meta.Map listener bus.Listener @@ -54,7 +62,7 @@ func NewAutodiscover(name string, pipeline beat.Pipeline, adapter Adapter, confi for _, providerCfg := range config.Providers { provider, err := Registry.BuildProvider(bus, providerCfg) if err != nil { - return nil, err + return nil, errors.Wrap(err, "error in autodiscover provider settings") } logp.Debug(debugK, "Configured autodiscover provider: %s", provider) providers = append(providers, provider) @@ -64,7 +72,8 @@ func NewAutodiscover(name string, pipeline beat.Pipeline, adapter Adapter, confi bus: bus, defaultPipeline: pipeline, adapter: adapter, - runners: cfgfile.NewRegistry(), + configs: map[uint64]*cfgfile.ConfigWithMeta{}, + runners: cfgfile.NewRunnerList("autodiscover", adapter, pipeline), providers: providers, meta: meta.NewMap(), }, nil @@ -87,38 +96,59 @@ func (a *Autodiscover) Start() { } func (a *Autodiscover) worker() { - for event := range a.listener.Events() { - // This will happen on Stop: - if event == nil { - return + var updated, retry bool + + for { + select { + case event := <-a.listener.Events(): + // This will happen on Stop: + if event == nil { + return + } + + if _, ok := event["start"]; ok { + updated = a.handleStart(event) + } + if _, ok := event["stop"]; ok { + updated = a.handleStop(event) + } + + case <-time.After(retryPeriod): } - if _, ok := event["start"]; ok { - a.handleStart(event) - } - if _, ok := event["stop"]; ok { - a.handleStop(event) + if updated || retry { + if retry { + logp.Debug(debugK, "Reloading existing autodiscover configs after error") + } + + configs := make([]*cfgfile.ConfigWithMeta, 0, len(a.configs)) + for _, c := range a.configs { + configs = append(configs, c) + } + + err := a.runners.Reload(configs) + + // On error, make sure the next run also updates because some runners were not properly loaded + retry = err != nil + // reset updated status + updated = false } } } -func (a *Autodiscover) handleStart(event bus.Event) { +func (a *Autodiscover) handleStart(event bus.Event) bool { + var updated bool + configs, err := a.adapter.CreateConfig(event) if err != nil { logp.Debug(debugK, "Could not generate config from event %v: %v", event, err) - return + return false } logp.Debug(debugK, "Got a start event: %v, generated configs: %+v", event, configs) meta := getMeta(event) for _, config := range configs { - rawCfg := map[string]interface{}{} - if err := config.Unpack(rawCfg); err != nil { - logp.Debug(debugK, "Error unpacking config: %v", err) - continue - } - - hash, err := hashstructure.Hash(rawCfg, nil) + hash, err := cfgfile.HashConfig(config) if err != nil { logp.Debug(debugK, "Could not hash config %v: %v", config, err) continue @@ -138,34 +168,28 @@ func (a *Autodiscover) handleStart(event bus.Event) { continue } - runner, err := a.adapter.Create(a.defaultPipeline, config, &dynFields) - if err != nil { - logp.Debug(debugK, "Failed to create runner with config %v: %v", config, err) - continue + a.configs[hash] = &cfgfile.ConfigWithMeta{ + Config: config, + Meta: &dynFields, } - - logp.Info("Autodiscover starting runner: %s", runner) - a.runners.Add(hash, runner) - runner.Start() + updated = true } + + return updated } -func (a *Autodiscover) handleStop(event bus.Event) { +func (a *Autodiscover) handleStop(event bus.Event) bool { + var updated bool + configs, err := a.adapter.CreateConfig(event) if err != nil { logp.Debug(debugK, "Could not generate config from event %v: %v", event, err) - return + return false } logp.Debug(debugK, "Got a stop event: %v, generated configs: %+v", event, configs) for _, config := range configs { - rawCfg := map[string]interface{}{} - if err := config.Unpack(rawCfg); err != nil { - logp.Debug(debugK, "Error unpacking config: %v", err) - continue - } - - hash, err := hashstructure.Hash(rawCfg, nil) + hash, err := cfgfile.HashConfig(config) if err != nil { logp.Debug(debugK, "Could not hash config %v: %v", config, err) continue @@ -176,14 +200,15 @@ func (a *Autodiscover) handleStop(event bus.Event) { continue } - if runner := a.runners.Get(hash); runner != nil { - logp.Info("Autodiscover stopping runner: %s", runner) - runner.Stop() - a.runners.Remove(hash) + if a.runners.Has(hash) { + delete(a.configs, hash) + updated = true } else { logp.Debug(debugK, "Runner not found for stopping: %s", hash) } } + + return updated } func getMeta(event bus.Event) common.MapStr { @@ -216,9 +241,6 @@ func (a *Autodiscover) Stop() { } // Stop runners - for hash, runner := range a.runners.CopyList() { - runner.Stop() - a.meta.Remove(hash) - } + a.runners.Stop() logp.Info("Stopped autodiscover manager") } diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/config.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/config.go new file mode 100644 index 00000000000..2df5d7edf13 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/config.go @@ -0,0 +1,74 @@ +package jolokia + +import ( + "time" + + "github.com/elastic/beats/libbeat/autodiscover/template" + "github.com/elastic/beats/libbeat/common" +) + +var ( + defaultInterval = 10 * time.Second + defaultProbeTimeout = 1 * time.Second + defaultGracePeriod = 30 * time.Second +) + +// Config for Jolokia Discovery autodiscover provider +type Config struct { + // List of network interfaces to use for discovery probes + Interfaces []InterfaceConfig `config:"interfaces" validate:"nonzero"` + + Builders []*common.Config `config:"builders"` + Appenders []*common.Config `config:"appenders"` + Templates template.MapperSettings `config:"templates"` +} + +// InterfaceConfig is the configuration for a network interface used for probes +type InterfaceConfig struct { + // Name of the interface + Name string `config:"name" validate:"required"` + + // Time between discovery probes + Interval time.Duration `config:"interval" validate:"positive,nonzero"` + + // Time to wait till a response to a probe arrives + ProbeTimeout time.Duration `config:"probe_timeout" validate:"positive,nonzero"` + + // Time since an instance is last seen and is considered removed + GracePeriod time.Duration `config:"grace_period" validate:"positive,nonzero"` +} + +// Unpack implements the config unpacker for interface configs +func (c *InterfaceConfig) Unpack(from *common.Config) error { + // Overriding Unpack just to set defaults + // See https://github.com/elastic/go-ucfg/issues/104 + type tmpConfig InterfaceConfig + defaults := defaultInterfaceConfig() + tmp := tmpConfig(defaults) + + err := from.Unpack(&tmp) + if err != nil { + return err + } + + *c = InterfaceConfig(tmp) + return nil +} + +func defaultInterfaceConfig() InterfaceConfig { + return InterfaceConfig{ + Interval: defaultInterval, + ProbeTimeout: defaultProbeTimeout, + GracePeriod: defaultGracePeriod, + } +} + +func defaultConfig() Config { + anyInterface := defaultInterfaceConfig() + anyInterface.Name = "any" + return Config{ + Interfaces: []InterfaceConfig{ + anyInterface, + }, + } +} diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/discovery.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/discovery.go new file mode 100644 index 00000000000..8416cc41922 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/discovery.go @@ -0,0 +1,281 @@ +package jolokia + +import ( + "encoding/json" + "net" + "strings" + "sync" + "time" + + "github.com/pkg/errors" + + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/bus" + s "github.com/elastic/beats/libbeat/common/schema" + c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/libbeat/logp" +) + +// Jolokia Discovery query +// { +// "type": "query" +// } +// +// Example Jolokia Discovery response +// { +// "agent_version": "1.5.0", +// "agent_id": "172.18.0.2-7-1322ae88-servlet", +// "server_product": "tomcat", +// "type": "response", +// "server_vendor": "Apache", +// "server_version": "7.0.86", +// "secured": false, +// "url": "http://172.18.0.2:8778/jolokia" +// } +// +// Example discovery probe with socat +// +// echo '{"type":"query"}' | sudo socat STDIO UDP4-DATAGRAM:239.192.48.84:24884,interface=br0 | jq . +// + +// Message contains the information of a Jolokia Discovery message +var messageSchema = s.Schema{ + "agent": s.Object{ + "id": c.Str("agent_id"), + "version": c.Str("agent_version", s.Optional), + }, + "secured": c.Bool("secured", s.Optional), + "server": s.Object{ + "product": c.Str("server_product", s.Optional), + "vendor": c.Str("server_vendor", s.Optional), + "version": c.Str("server_version", s.Optional), + }, + "url": c.Str("url"), +} + +// Event is a Jolokia Discovery event +type Event struct { + Type string + Message common.MapStr +} + +// BusEvent converts a Jolokia Discovery event to a autodiscover bus event +func (e *Event) BusEvent() bus.Event { + event := bus.Event{ + e.Type: true, + "jolokia": e.Message, + "meta": common.MapStr{ + "jolokia": e.Message, + }, + } + return event +} + +// Instance is a discovered Jolokia instance, it keeps information of the +// last probe it replied +type Instance struct { + LastSeen time.Time + LastInterface *InterfaceConfig + Message common.MapStr +} + +// Discovery controls the Jolokia Discovery probes +type Discovery struct { + sync.Mutex + + Interfaces []InterfaceConfig + + instances map[string]*Instance + + events chan Event + stop chan struct{} +} + +// Start starts discovery probes +func (d *Discovery) Start() { + d.instances = make(map[string]*Instance) + d.events = make(chan Event) + d.stop = make(chan struct{}) + go d.run() +} + +// Stop stops discovery probes +func (d *Discovery) Stop() { + close(d.stop) + close(d.events) +} + +// Events returns a channel with the events of started and stopped Jolokia +// instances discovered +func (d *Discovery) Events() <-chan Event { + return d.events +} + +func (d *Discovery) run() { + for _, i := range d.Interfaces { + i := i + go func() { + for { + d.sendProbe(i) + d.checkStopped() + select { + case <-time.After(i.Interval): + case <-d.stop: + return + } + } + }() + } + <-d.stop +} + +func (d *Discovery) interfaces(name string) ([]net.Interface, error) { + interfaces, err := net.Interfaces() + if err != nil { + return nil, err + } + if name == "any" || name == "*" { + return interfaces, nil + } + + var matching []net.Interface + for _, i := range interfaces { + if matchInterfaceName(name, i.Name) { + matching = append(matching, i) + } + } + return matching, nil +} + +func matchInterfaceName(name, candidate string) bool { + if strings.HasSuffix(name, "*") { + return strings.HasPrefix(candidate, strings.TrimRight(name, "*")) + } + return name == candidate +} + +func getIPv4Addr(i net.Interface) (net.IP, error) { + addrs, err := i.Addrs() + if err != nil { + return nil, errors.Wrap(err, "failed to get addresses for "+i.Name) + } + for _, a := range addrs { + if ip, _, err := net.ParseCIDR(a.String()); err == nil && ip != nil { + if ipv4 := ip.To4(); ipv4 != nil { + return ipv4, nil + } + } + } + return nil, nil +} + +var discoveryAddress = net.UDPAddr{IP: net.IPv4(239, 192, 48, 84), Port: 24884} +var queryMessage = []byte(`{"type":"query"}`) + +func (d *Discovery) sendProbe(config InterfaceConfig) { + interfaces, err := d.interfaces(config.Name) + if err != nil { + logp.Err("failed to get interfaces: ", err) + return + } + + var wg sync.WaitGroup + for _, i := range interfaces { + ip, err := getIPv4Addr(i) + if err != nil { + logp.Err(err.Error()) + continue + } + if ip == nil { + continue + } + + wg.Add(1) + go func() { + defer wg.Done() + + conn, err := net.ListenPacket("udp4", net.JoinHostPort(ip.String(), "0")) + if err != nil { + logp.Err(err.Error()) + return + } + defer conn.Close() + + // Avoid having sockets open more time than needed + timeout := config.ProbeTimeout + if timeout > config.Interval { + timeout = config.Interval + } + conn.SetDeadline(time.Now().Add(timeout)) + + if _, err := conn.WriteTo(queryMessage, &discoveryAddress); err != nil { + logp.Err(err.Error()) + return + } + + b := make([]byte, 1500) + for { + n, _, err := conn.ReadFrom(b) + if err != nil { + if netErr, ok := err.(net.Error); !ok || !netErr.Timeout() { + logp.Err(err.Error()) + } + return + } + m := make(map[string]interface{}) + err = json.Unmarshal(b[:n], &m) + if err != nil { + logp.Err(err.Error()) + continue + } + message, _ := messageSchema.Apply(m) + d.update(config, message) + } + }() + } + wg.Wait() +} + +func (d *Discovery) update(config InterfaceConfig, message common.MapStr) { + v, err := message.GetValue("agent.id") + if err != nil { + logp.Err("failed to update agent without id: " + err.Error()) + return + } + agentID, ok := v.(string) + if len(agentID) == 0 || !ok { + logp.Err("incorrect or empty agent id in Jolokia Discovery response") + return + } + + url, err := message.GetValue("url") + if err != nil || url == nil { + // This can happen if Jolokia agent is initializing and it still + // doesn't know its URL + logp.Info("agent %s without url, ignoring by now", agentID) + return + } + + d.Lock() + defer d.Unlock() + i, found := d.instances[agentID] + if !found { + i = &Instance{Message: message} + d.instances[agentID] = i + d.events <- Event{"start", message} + } + i.LastSeen = time.Now() + i.LastInterface = &config +} + +func (d *Discovery) checkStopped() { + d.Lock() + defer d.Unlock() + + for id, i := range d.instances { + if time.Since(i.LastSeen) > i.LastInterface.GracePeriod { + d.events <- Event{"stop", i.Message} + delete(d.instances, id) + } + } +} diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/jolokia.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/jolokia.go new file mode 100644 index 00000000000..9e185464319 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/jolokia/jolokia.go @@ -0,0 +1,100 @@ +package jolokia + +import ( + "github.com/elastic/beats/libbeat/autodiscover" + "github.com/elastic/beats/libbeat/autodiscover/template" + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/libbeat/common/cfgwarn" +) + +func init() { + autodiscover.Registry.AddProvider("jolokia", AutodiscoverBuilder) +} + +// DiscoveryProber implements discovery probes +type DiscoveryProber interface { + Start() + Stop() + Events() <-chan Event +} + +// Provider is the Jolokia Discovery autodiscover provider +type Provider struct { + config *Config + bus bus.Bus + builders autodiscover.Builders + appenders autodiscover.Appenders + templates *template.Mapper + discovery DiscoveryProber +} + +// AutodiscoverBuilder builds a Jolokia Discovery autodiscover provider, it fails if +// there is some problem with the configuration +func AutodiscoverBuilder(bus bus.Bus, c *common.Config) (autodiscover.Provider, error) { + cfgwarn.Experimental("The Jolokia Discovery autodiscover is experimental") + + config := defaultConfig() + err := c.Unpack(&config) + if err != nil { + return nil, err + } + + discovery := &Discovery{ + Interfaces: config.Interfaces, + } + + mapper, err := template.NewConfigMapper(config.Templates) + if err != nil { + return nil, err + } + + builders, err := autodiscover.NewBuilders(config.Builders, false) + if err != nil { + return nil, err + } + + appenders, err := autodiscover.NewAppenders(config.Appenders) + if err != nil { + return nil, err + } + + return &Provider{ + bus: bus, + templates: mapper, + builders: builders, + appenders: appenders, + discovery: discovery, + }, nil +} + +// Start starts autodiscover provider +func (p *Provider) Start() { + p.discovery.Start() + go func() { + for event := range p.discovery.Events() { + p.publish(event.BusEvent()) + } + }() +} + +func (p *Provider) publish(event bus.Event) { + if config := p.templates.GetConfig(event); config != nil { + event["config"] = config + } else if config := p.builders.GetConfig(event); config != nil { + event["config"] = config + } + + p.appenders.Append(event) + p.bus.Publish(event) +} + +// Stop stops autodiscover provider +func (p *Provider) Stop() { + p.discovery.Stop() +} + +// String returns the name of the provider +func (p *Provider) String() string { + return "jolokia" +} diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/config.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/config.go index 7ec1b07b30d..038d16889b0 100644 --- a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/config.go +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/config.go @@ -16,11 +16,6 @@ type Config struct { SyncPeriod time.Duration `config:"sync_period"` CleanupTimeout time.Duration `config:"cleanup_timeout"` - IncludeLabels []string `config:"include_labels"` - ExcludeLabels []string `config:"exclude_labels"` - IncludeAnnotations []string `config:"include_annotations"` - IncludePodUID bool `config:"include_pod_uid"` - Prefix string `config:"prefix"` HintsEnabled bool `config:"hints.enabled"` Builders []*common.Config `config:"builders"` diff --git a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/kubernetes.go b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/kubernetes.go index dfb6c141cee..d3b3880ff57 100644 --- a/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/kubernetes.go +++ b/vendor/github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes/kubernetes.go @@ -43,7 +43,10 @@ func AutodiscoverBuilder(bus bus.Bus, c *common.Config) (autodiscover.Provider, return nil, err } - metagen := kubernetes.NewMetaGenerator(config.IncludeAnnotations, config.IncludeLabels, config.ExcludeLabels, config.IncludePodUID) + metagen, err := kubernetes.NewMetaGenerator(c) + if err != nil { + return nil, err + } config.Host = kubernetes.DiscoverKubernetesNode(config.Host, config.InCluster, client) @@ -84,13 +87,16 @@ func AutodiscoverBuilder(bus bus.Bus, c *common.Config) (autodiscover.Provider, watcher.AddEventHandler(kubernetes.ResourceEventHandlerFuncs{ AddFunc: func(obj kubernetes.Resource) { + logp.Debug("kubernetes", "Watcher Pod add: %+v", obj) p.emit(obj.(*kubernetes.Pod), "start") }, UpdateFunc: func(obj kubernetes.Resource) { + logp.Debug("kubernetes", "Watcher Pod update: %+v", obj) p.emit(obj.(*kubernetes.Pod), "stop") p.emit(obj.(*kubernetes.Pod), "start") }, DeleteFunc: func(obj kubernetes.Resource) { + logp.Debug("kubernetes", "Watcher Pod delete: %+v", obj) time.AfterFunc(config.CleanupTimeout, func() { p.emit(obj.(*kubernetes.Pod), "stop") }) }, }) @@ -117,6 +123,11 @@ func (p *Provider) emitEvents(pod *kubernetes.Pod, flag string, containers []kub containerstatuses []kubernetes.PodContainerStatus) { host := pod.Status.PodIP + // Do not emit events without host (container is still being configured) + if host == "" { + return + } + // Collect all container IDs and runtimes from status information. containerIDs := map[string]string{} runtimes := map[string]string{} diff --git a/vendor/github.com/elastic/beats/libbeat/cfgfile/list.go b/vendor/github.com/elastic/beats/libbeat/cfgfile/list.go new file mode 100644 index 00000000000..66af059ec98 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/cfgfile/list.go @@ -0,0 +1,150 @@ +package cfgfile + +import ( + "sync" + + "github.com/joeshaw/multierror" + "github.com/mitchellh/hashstructure" + "github.com/pkg/errors" + + "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/logp" +) + +// RunnerList implements a reloadable.List of Runners +type RunnerList struct { + runners map[uint64]Runner + mutex sync.RWMutex + factory RunnerFactory + pipeline beat.Pipeline + logger *logp.Logger +} + +// ConfigWithMeta holds a pair of common.Config and optional metadata for it +type ConfigWithMeta struct { + // Config to store + Config *common.Config + + // Meta data related to this config + Meta *common.MapStrPointer +} + +// NewRunnerList builds and returns a RunnerList +func NewRunnerList(name string, factory RunnerFactory, pipeline beat.Pipeline) *RunnerList { + return &RunnerList{ + runners: map[uint64]Runner{}, + factory: factory, + pipeline: pipeline, + logger: logp.NewLogger(name), + } +} + +// Reload the list of runners to match the given state +func (r *RunnerList) Reload(configs []*ConfigWithMeta) error { + r.mutex.Lock() + defer r.mutex.Unlock() + + var errs multierror.Errors + + startList := map[uint64]*ConfigWithMeta{} + stopList := r.copyRunnerList() + + r.logger.Debugf("Starting reload procedure, current runners: %d", len(stopList)) + + // diff current & desired state, create action lists + for _, config := range configs { + hash, err := HashConfig(config.Config) + if err != nil { + r.logger.Errorf("Unable to hash given config: %s", err) + errs = append(errs, errors.Wrap(err, "Unable to hash given config")) + continue + } + + if _, ok := stopList[hash]; ok { + delete(stopList, hash) + } else { + startList[hash] = config + } + } + + r.logger.Debugf("Start list: %d, Stop list: %d", len(startList), len(stopList)) + + // Stop removed runners + for hash, runner := range stopList { + r.logger.Debugf("Stopping runner: %s", runner) + delete(r.runners, hash) + go runner.Stop() + } + + // Start new runners + for hash, config := range startList { + // Pass a copy of the config to the factory, this way if the factory modifies it, + // that doesn't affect the hash of the original one. + c, _ := common.NewConfigFrom(config.Config) + runner, err := r.factory.Create(r.pipeline, c, config.Meta) + if err != nil { + r.logger.Errorf("Error creating runner from config: %s", err) + errs = append(errs, errors.Wrap(err, "Error creating runner from config")) + continue + } + + r.logger.Debugf("Starting runner: %s", runner) + r.runners[hash] = runner + runner.Start() + } + + return errs.Err() +} + +// Stop all runners +func (r *RunnerList) Stop() { + r.mutex.Lock() + defer r.mutex.Unlock() + + if len(r.runners) == 0 { + return + } + + r.logger.Infof("Stopping %v runners ...", len(r.runners)) + + wg := sync.WaitGroup{} + for hash, runner := range r.copyRunnerList() { + wg.Add(1) + + delete(r.runners, hash) + + // Stop modules in parallel + go func(h uint64, run Runner) { + defer wg.Done() + r.logger.Debugf("Stopping runner: %s", run) + run.Stop() + r.logger.Debugf("Stopped runner: %s", run) + }(hash, runner) + } + + wg.Wait() +} + +// Has returns true if a runner with the given hash is running +func (r *RunnerList) Has(hash uint64) bool { + r.mutex.RLock() + defer r.mutex.RUnlock() + _, ok := r.runners[hash] + return ok +} + +// HashConfig hashes a given common.Config +func HashConfig(c *common.Config) (uint64, error) { + var config map[string]interface{} + c.Unpack(&config) + return hashstructure.Hash(config, nil) +} + +func (r *RunnerList) copyRunnerList() map[uint64]Runner { + list := make(map[uint64]Runner, len(r.runners)) + for k, v := range r.runners { + list[k] = v + } + return list +} diff --git a/vendor/github.com/elastic/beats/libbeat/cfgfile/registry.go b/vendor/github.com/elastic/beats/libbeat/cfgfile/registry.go deleted file mode 100644 index 237136dc630..00000000000 --- a/vendor/github.com/elastic/beats/libbeat/cfgfile/registry.go +++ /dev/null @@ -1,60 +0,0 @@ -package cfgfile - -import "sync" - -// Registry holds a list of Runners mapped by their unique hashes -type Registry struct { - sync.RWMutex - List map[uint64]Runner -} - -// NewRegistry returns a new empty Registry -func NewRegistry() *Registry { - return &Registry{ - List: map[uint64]Runner{}, - } -} - -// Add the given Runner to the list, indexed by a hash -func (r *Registry) Add(hash uint64, m Runner) { - r.Lock() - defer r.Unlock() - r.List[hash] = m -} - -// Remove the Runner with the given hash from the list -func (r *Registry) Remove(hash uint64) { - r.Lock() - defer r.Unlock() - delete(r.List, hash) -} - -// Has returns true if there is a Runner with the given hash -func (r *Registry) Has(hash uint64) bool { - r.RLock() - defer r.RUnlock() - - _, ok := r.List[hash] - return ok -} - -// Get returns the Runner with the given hash, or nil if it doesn't exist -func (r *Registry) Get(hash uint64) Runner { - r.RLock() - defer r.RUnlock() - - return r.List[hash] -} - -// CopyList returns a static copy of the Runners map -func (r *Registry) CopyList() map[uint64]Runner { - r.RLock() - defer r.RUnlock() - - // Create a copy of the list - list := map[uint64]Runner{} - for k, v := range r.List { - list[k] = v - } - return list -} diff --git a/vendor/github.com/elastic/beats/libbeat/cfgfile/reload.go b/vendor/github.com/elastic/beats/libbeat/cfgfile/reload.go index 9b549e402bd..228b4b42cdc 100644 --- a/vendor/github.com/elastic/beats/libbeat/cfgfile/reload.go +++ b/vendor/github.com/elastic/beats/libbeat/cfgfile/reload.go @@ -6,7 +6,6 @@ import ( "time" "github.com/joeshaw/multierror" - "github.com/mitchellh/hashstructure" "github.com/pkg/errors" "github.com/elastic/beats/libbeat/beat" @@ -56,12 +55,12 @@ type Runner interface { // Reloader is used to register and reload modules type Reloader struct { - pipeline beat.Pipeline - registry *Registry - config DynamicConfig - path string - done chan struct{} - wg sync.WaitGroup + pipeline beat.Pipeline + runnerFactory RunnerFactory + config DynamicConfig + path string + done chan struct{} + wg sync.WaitGroup } // NewReloader creates new Reloader instance for the given config @@ -76,7 +75,6 @@ func NewReloader(pipeline beat.Pipeline, cfg *common.Config) *Reloader { return &Reloader{ pipeline: pipeline, - registry: NewRegistry(), config: config, path: path, done: make(chan struct{}), @@ -109,10 +107,10 @@ func (rl *Reloader) Check(runnerFactory RunnerFactory) error { // Initialize modules for _, c := range configs { // Only add configs to startList which are enabled - if !c.Enabled() { + if !c.Config.Enabled() { continue } - _, err := runnerFactory.Create(rl.pipeline, c, nil) + _, err := runnerFactory.Create(rl.pipeline, c.Config, c.Meta) if err != nil { return err } @@ -124,11 +122,13 @@ func (rl *Reloader) Check(runnerFactory RunnerFactory) error { func (rl *Reloader) Run(runnerFactory RunnerFactory) { logp.Info("Config reloader started") + list := NewRunnerList("reload", runnerFactory, rl.pipeline) + rl.wg.Add(1) defer rl.wg.Done() // Stop all running modules when method finishes - defer rl.stopRunners(rl.registry.CopyList()) + defer list.Stop() gw := NewGlobWatcher(rl.path) @@ -144,8 +144,8 @@ func (rl *Reloader) Run(runnerFactory RunnerFactory) { case <-rl.done: logp.Info("Dynamic config reloader stopped") return - case <-time.After(rl.config.Reload.Period): + case <-time.After(rl.config.Reload.Period): debugf("Scan for new config files") configReloads.Add(1) @@ -167,49 +167,10 @@ func (rl *Reloader) Run(runnerFactory RunnerFactory) { debugf("Number of module configs found: %v", len(configs)) - startList := map[uint64]Runner{} - stopList := rl.registry.CopyList() - - for _, c := range configs { - - // Only add configs to startList which are enabled - if !c.Enabled() { - continue - } - - rawCfg := map[string]interface{}{} - err := c.Unpack(rawCfg) - - if err != nil { - logp.Err("Unable to unpack config file due to error: %v", err) - continue - } - - hash, err := hashstructure.Hash(rawCfg, nil) - if err != nil { - // Make sure the next run also updates because some runners were not properly loaded - overwriteUpdate = true - debugf("Unable to generate hash for config file %v due to error: %v", c, err) - continue - } - - debugf("Remove module from stoplist: %v", hash) - delete(stopList, hash) - - // As module already exist, it must be removed from the stop list and not started - if !rl.registry.Has(hash) { - debugf("Add module to startlist: %v", hash) - runner, err := runnerFactory.Create(rl.pipeline, c, nil) - if err != nil { - logp.Err("Unable to create runner due to error: %v", err) - continue - } - startList[hash] = runner - } + if err := list.Reload(configs); err != nil { + // Make sure the next run also updates because some runners were not properly loaded + overwriteUpdate = true } - - rl.stopRunners(stopList) - rl.startRunners(startList) } // Path loading is enabled but not reloading. Loads files only once and then stops. @@ -224,22 +185,24 @@ func (rl *Reloader) Run(runnerFactory RunnerFactory) { } } -func (rl *Reloader) loadConfigs(files []string) ([]*common.Config, error) { +func (rl *Reloader) loadConfigs(files []string) ([]*ConfigWithMeta, error) { // Load all config objects - configs := []*common.Config{} + result := []*ConfigWithMeta{} var errs multierror.Errors for _, file := range files { - c, err := LoadList(file) + configs, err := LoadList(file) if err != nil { errs = append(errs, err) logp.Err("Error loading config: %s", err) continue } - configs = append(configs, c...) + for _, c := range configs { + result = append(result, &ConfigWithMeta{Config: c}) + } } - return configs, errs.Err() + return result, errs.Err() } // Stop stops the reloader and waits for all modules to properly stop @@ -247,47 +210,3 @@ func (rl *Reloader) Stop() { close(rl.done) rl.wg.Wait() } - -func (rl *Reloader) startRunners(list map[uint64]Runner) { - if len(list) == 0 { - return - } - - logp.Info("Starting %v runners ...", len(list)) - for id, runner := range list { - runner.Start() - rl.registry.Add(id, runner) - - moduleStarts.Add(1) - moduleRunning.Add(1) - debugf("New runner started: %v", id) - } -} - -func (rl *Reloader) stopRunners(list map[uint64]Runner) { - if len(list) == 0 { - return - } - - logp.Info("Stopping %v runners ...", len(list)) - - wg := sync.WaitGroup{} - for hash, runner := range list { - wg.Add(1) - - // Stop modules in parallel - go func(h uint64, run Runner) { - defer func() { - moduleStops.Add(1) - moduleRunning.Add(-1) - debugf("Runner stopped: %v", h) - wg.Done() - }() - - run.Stop() - rl.registry.Remove(h) - }(hash, runner) - } - - wg.Wait() -} diff --git a/vendor/github.com/elastic/beats/libbeat/cmd/export.go b/vendor/github.com/elastic/beats/libbeat/cmd/export.go index 6f33e8ad641..b4c62741e07 100644 --- a/vendor/github.com/elastic/beats/libbeat/cmd/export.go +++ b/vendor/github.com/elastic/beats/libbeat/cmd/export.go @@ -14,6 +14,7 @@ func genExportCmd(name, idxPrefix, beatVersion string) *cobra.Command { exportCmd.AddCommand(export.GenExportConfigCmd(name, idxPrefix, beatVersion)) exportCmd.AddCommand(export.GenTemplateConfigCmd(name, idxPrefix, beatVersion)) + exportCmd.AddCommand(export.GenDashboardCmd(name, idxPrefix, beatVersion)) return exportCmd } diff --git a/vendor/github.com/elastic/beats/libbeat/cmd/export/dashboard.go b/vendor/github.com/elastic/beats/libbeat/cmd/export/dashboard.go new file mode 100644 index 00000000000..d9905117b4b --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/cmd/export/dashboard.go @@ -0,0 +1,56 @@ +package export + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" + + "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/kibana" +) + +// GenDashboardCmd is the command used to export a dashboard. +func GenDashboardCmd(name, idxPrefix, beatVersion string) *cobra.Command { + genTemplateConfigCmd := &cobra.Command{ + Use: "dashboard", + Short: "Export defined dashboard to stdout", + Run: func(cmd *cobra.Command, args []string) { + dashboard, _ := cmd.Flags().GetString("id") + + b, err := instance.NewBeat(name, idxPrefix, beatVersion) + if err != nil { + fmt.Fprintf(os.Stderr, "Error creating beat: %s\n", err) + os.Exit(1) + } + err = b.Init() + if err != nil { + fmt.Fprintf(os.Stderr, "Error initializing beat: %s\n", err) + os.Exit(1) + } + + // Use empty config to use default configs if not set + if b.Config.Kibana == nil { + b.Config.Kibana = common.NewConfig() + } + + client, err := kibana.NewKibanaClient(b.Config.Kibana) + if err != nil { + fmt.Fprintf(os.Stderr, "Error creating Kibana client: %+v\n", err) + os.Exit(1) + } + + result, err := client.GetDashboard(dashboard) + if err != nil { + fmt.Fprintf(os.Stderr, "Error getting dashboard: %+v\n", err) + os.Exit(1) + } + fmt.Println(result.StringToPrint()) + }, + } + + genTemplateConfigCmd.Flags().String("id", "", "Dashboard id") + + return genTemplateConfigCmd +} diff --git a/vendor/github.com/elastic/beats/libbeat/cmd/instance/beat.go b/vendor/github.com/elastic/beats/libbeat/cmd/instance/beat.go index 1f5b4deb9d0..f2c97dfddce 100644 --- a/vendor/github.com/elastic/beats/libbeat/cmd/instance/beat.go +++ b/vendor/github.com/elastic/beats/libbeat/cmd/instance/beat.go @@ -54,9 +54,11 @@ import ( _ "github.com/elastic/beats/libbeat/processors/add_host_metadata" _ "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata" _ "github.com/elastic/beats/libbeat/processors/add_locale" + _ "github.com/elastic/beats/libbeat/processors/dissect" // Register autodiscover providers _ "github.com/elastic/beats/libbeat/autodiscover/providers/docker" + _ "github.com/elastic/beats/libbeat/autodiscover/providers/jolokia" _ "github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes" // Register default monitoring reporting diff --git a/vendor/github.com/elastic/beats/libbeat/common/docker/client.go b/vendor/github.com/elastic/beats/libbeat/common/docker/client.go new file mode 100644 index 00000000000..965fbb442c3 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/common/docker/client.go @@ -0,0 +1,44 @@ +package docker + +import ( + "net/http" + + "github.com/elastic/beats/libbeat/logp" + + "github.com/docker/docker/api" + "github.com/docker/docker/api/types/versions" + "github.com/docker/docker/client" + "golang.org/x/net/context" +) + +// Select Docker API version +const dockerAPIVersion = api.DefaultVersion + +// NewClient builds and returns a new Docker client +// It uses version 1.26 by default, and negotiates it with the server so it is downgraded if 1.26 is too high +func NewClient(host string, httpClient *http.Client, httpHeaders map[string]string) (*client.Client, error) { + c, err := client.NewClient(host, dockerAPIVersion, httpClient, nil) + if err != nil { + return c, err + } + + logp.Debug("docker", "Negotiating client version") + ping, err := c.Ping(context.Background()) + if err != nil { + logp.Debug("docker", "Failed to perform ping: %s", err) + } + + // try the latest version before versioning headers existed + if ping.APIVersion == "" { + ping.APIVersion = "1.24" + } + + // if server version is lower than the client version, downgrade + if versions.LessThan(ping.APIVersion, dockerAPIVersion) { + c.UpdateClientVersion(ping.APIVersion) + } + + logp.Debug("docker", "Client version set to %s", c.ClientVersion()) + + return c, nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/common/docker/watcher.go b/vendor/github.com/elastic/beats/libbeat/common/docker/watcher.go index 02c4a0cb11c..5c2e03fea4c 100644 --- a/vendor/github.com/elastic/beats/libbeat/common/docker/watcher.go +++ b/vendor/github.com/elastic/beats/libbeat/common/docker/watcher.go @@ -9,7 +9,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/client" "github.com/docker/go-connections/tlsconfig" "golang.org/x/net/context" @@ -19,8 +18,7 @@ import ( // Select Docker API version const ( - dockerAPIVersion = "1.22" - shortIDLen = 12 + shortIDLen = 12 ) // Watcher reads docker events and keeps a list of known containers @@ -106,7 +104,7 @@ func NewWatcher(host string, tls *TLSConfig, storeShortID bool) (Watcher, error) } } - client, err := client.NewClient(host, dockerAPIVersion, httpClient, nil) + client, err := NewClient(host, httpClient, nil) if err != nil { return nil, err } diff --git a/vendor/github.com/elastic/beats/libbeat/common/endpoint.go b/vendor/github.com/elastic/beats/libbeat/common/endpoint.go index 2c93be7278e..8150b84de4b 100644 --- a/vendor/github.com/elastic/beats/libbeat/common/endpoint.go +++ b/vendor/github.com/elastic/beats/libbeat/common/endpoint.go @@ -8,3 +8,21 @@ type Endpoint struct { Cmdline string Proc string } + +// MakeEndpointPair returns source and destination endpoints from a TCP or IP tuple +// and a command-line tuple. +func MakeEndpointPair(tuple BaseTuple, cmdlineTuple *CmdlineTuple) (src Endpoint, dst Endpoint) { + src = Endpoint{ + IP: tuple.SrcIP.String(), + Port: tuple.SrcPort, + Proc: string(cmdlineTuple.Src), + Cmdline: string(cmdlineTuple.SrcCommand), + } + dst = Endpoint{ + IP: tuple.DstIP.String(), + Port: tuple.DstPort, + Proc: string(cmdlineTuple.Dst), + Cmdline: string(cmdlineTuple.DstCommand), + } + return src, dst +} diff --git a/vendor/github.com/elastic/beats/libbeat/common/kubernetes/metadata.go b/vendor/github.com/elastic/beats/libbeat/common/kubernetes/metadata.go index 01334b89294..2879b7ab2db 100644 --- a/vendor/github.com/elastic/beats/libbeat/common/kubernetes/metadata.go +++ b/vendor/github.com/elastic/beats/libbeat/common/kubernetes/metadata.go @@ -1,6 +1,8 @@ package kubernetes import ( + "strings" + "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/common/safemapstr" ) @@ -15,39 +17,41 @@ type MetaGenerator interface { } type metaGenerator struct { - annotations []string - labels []string - labelsExclude []string - poduid bool + IncludeLabels []string `config:"include_labels"` + ExcludeLabels []string `config:"exclude_labels"` + IncludeAnnotations []string `config:"include_annotations"` + IncludePodUID bool `config:"include_pod_uid"` + IncludeCreatorMetadata bool `config:"include_creator_metadata"` } // NewMetaGenerator initializes and returns a new kubernetes metadata generator -func NewMetaGenerator(annotations, labels, labelsExclude []string, includePodUID bool) MetaGenerator { - return &metaGenerator{ - annotations: annotations, - labels: labels, - labelsExclude: labelsExclude, - poduid: includePodUID, +func NewMetaGenerator(cfg *common.Config) (MetaGenerator, error) { + // default settings: + generator := metaGenerator{ + IncludeCreatorMetadata: true, } + + err := cfg.Unpack(&generator) + return &generator, err } // PodMetadata generates metadata for the given pod taking to account certain filters func (g *metaGenerator) PodMetadata(pod *Pod) common.MapStr { labelMap := common.MapStr{} - if len(g.labels) == 0 { + if len(g.IncludeLabels) == 0 { for k, v := range pod.Metadata.Labels { safemapstr.Put(labelMap, k, v) } } else { - labelMap = generateMapSubset(pod.Metadata.Labels, g.labels) + labelMap = generateMapSubset(pod.Metadata.Labels, g.IncludeLabels) } // Exclude any labels that are present in the exclude_labels config - for _, label := range g.labelsExclude { + for _, label := range g.ExcludeLabels { delete(labelMap, label) } - annotationsMap := generateMapSubset(pod.Metadata.Annotations, g.annotations) + annotationsMap := generateMapSubset(pod.Metadata.Annotations, g.IncludeAnnotations) meta := common.MapStr{ "pod": common.MapStr{ "name": pod.Metadata.Name, @@ -59,10 +63,25 @@ func (g *metaGenerator) PodMetadata(pod *Pod) common.MapStr { } // Add Pod UID metadata if enabled - if g.poduid { + if g.IncludePodUID { safemapstr.Put(meta, "pod.uid", pod.Metadata.UID) } + // Add controller metadata if present + if g.IncludeCreatorMetadata { + for _, ref := range pod.Metadata.OwnerReferences { + if ref.Controller { + switch ref.Kind { + // TODO grow this list as we keep adding more `state_*` metricsets + case "Deployment", + "ReplicaSet", + "StatefulSet": + safemapstr.Put(meta, strings.ToLower(ref.Kind)+".name", ref.Name) + } + } + } + } + if len(labelMap) != 0 { meta["labels"] = labelMap } diff --git a/vendor/github.com/elastic/beats/libbeat/common/tuples.go b/vendor/github.com/elastic/beats/libbeat/common/tuples.go index a094a57e9b2..506bf3254d4 100644 --- a/vendor/github.com/elastic/beats/libbeat/common/tuples.go +++ b/vendor/github.com/elastic/beats/libbeat/common/tuples.go @@ -15,10 +15,15 @@ const MaxIPPortTupleRawSize = 16 + 16 + 2 + 2 type HashableIPPortTuple [MaxIPPortTupleRawSize]byte -type IPPortTuple struct { - IPLength int +type BaseTuple struct { SrcIP, DstIP net.IP SrcPort, DstPort uint16 +} + +type IPPortTuple struct { + BaseTuple + + IPLength int raw HashableIPPortTuple // Src_ip:Src_port:Dst_ip:Dst_port revRaw HashableIPPortTuple // Dst_ip:Dst_port:Src_ip:Src_port @@ -29,10 +34,12 @@ func NewIPPortTuple(ipLength int, srcIP net.IP, srcPort uint16, tuple := IPPortTuple{ IPLength: ipLength, - SrcIP: srcIP, - DstIP: dstIP, - SrcPort: srcPort, - DstPort: dstPort, + BaseTuple: BaseTuple{ + SrcIP: srcIP, + DstIP: dstIP, + SrcPort: srcPort, + DstPort: dstPort, + }, } tuple.ComputeHashebles() @@ -76,10 +83,10 @@ const MaxTCPTupleRawSize = 16 + 16 + 2 + 2 + 4 type HashableTCPTuple [MaxTCPTupleRawSize]byte type TCPTuple struct { - IPLength int - SrcIP, DstIP net.IP - SrcPort, DstPort uint16 - StreamID uint32 + BaseTuple + IPLength int + + StreamID uint32 raw HashableTCPTuple // Src_ip:Src_port:Dst_ip:Dst_port:stream_id } @@ -87,10 +94,12 @@ type TCPTuple struct { func TCPTupleFromIPPort(t *IPPortTuple, streamID uint32) TCPTuple { tuple := TCPTuple{ IPLength: t.IPLength, - SrcIP: t.SrcIP, - DstIP: t.DstIP, - SrcPort: t.SrcPort, - DstPort: t.DstPort, + BaseTuple: BaseTuple{ + SrcIP: t.SrcIP, + DstIP: t.DstIP, + SrcPort: t.SrcPort, + DstPort: t.DstPort, + }, StreamID: streamID, } tuple.ComputeHashebles() @@ -129,7 +138,22 @@ func (t *TCPTuple) Hashable() HashableTCPTuple { return t.raw } -// Source and destination process names, as found by the proc module. +// CmdlineTuple contains the source and destination process names, as found by +// the proc module. type CmdlineTuple struct { + // Source and destination processes names as specified in packetbeat.procs.monitored Src, Dst []byte + // Source and destination full command lines + SrcCommand, DstCommand []byte +} + +// Reverse returns a copy of the receiver with the source and destination fields +// swapped. +func (c *CmdlineTuple) Reverse() CmdlineTuple { + return CmdlineTuple{ + Src: c.Dst, + Dst: c.Src, + SrcCommand: c.DstCommand, + DstCommand: c.SrcCommand, + } } diff --git a/vendor/github.com/elastic/beats/libbeat/dashboards/kibana_loader.go b/vendor/github.com/elastic/beats/libbeat/dashboards/kibana_loader.go index d4922b9488b..0218c653f2d 100644 --- a/vendor/github.com/elastic/beats/libbeat/dashboards/kibana_loader.go +++ b/vendor/github.com/elastic/beats/libbeat/dashboards/kibana_loader.go @@ -9,8 +9,8 @@ import ( "time" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/kibana" "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/setup/kibana" ) var importAPI = "/api/kibana/dashboards/import" diff --git a/vendor/github.com/elastic/beats/libbeat/generator/fields/fields.go b/vendor/github.com/elastic/beats/libbeat/generator/fields/fields.go new file mode 100644 index 00000000000..af432ff19b3 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/generator/fields/fields.go @@ -0,0 +1,149 @@ +package fields + +import ( + "bufio" + "fmt" + "io/ioutil" + "os" + "path" + "path/filepath" + "strings" +) + +var ( + generatedFieldsYml = filepath.Join("_meta", "fields.generated.yml") +) + +// YmlFile holds the info on files and how to write them into the global fields.yml +type YmlFile struct { + Path string + Indent int +} + +func collectBeatFiles(beatPath string, fieldFiles []*YmlFile) ([]*YmlFile, error) { + commonFields := filepath.Join(beatPath, "_meta", "fields.common.yml") + _, err := os.Stat(commonFields) + if os.IsNotExist(err) { + return fieldFiles, nil + } else if err != nil { + return nil, err + } + + files := []*YmlFile{ + &YmlFile{ + Path: commonFields, + Indent: 0, + }, + } + + return append(files, fieldFiles...), nil +} + +func writeGeneratedFieldsYml(beatsPath string, fieldFiles []*YmlFile) error { + outPath := path.Join(beatsPath, generatedFieldsYml) + f, err := os.Create(outPath) + if err != nil { + return err + } + defer f.Close() + + fw := bufio.NewWriter(f) + for _, p := range fieldFiles { + ff, err := os.Open(p.Path) + if err != nil { + return err + } + defer ff.Close() + + fs := bufio.NewScanner(ff) + for fs.Scan() { + err = writeIndentedLine(fw, fs.Text()+"\n", p.Indent) + if err != nil { + return err + } + + } + if err := fs.Err(); err != nil { + return err + } + } + return nil +} + +func writeIndentedLine(fw *bufio.Writer, l string, indent int) error { + ll := strings.Repeat(" ", indent) + l + fmt.Fprint(fw, ll) + return fw.Flush() +} + +// Generate collects fields.yml files and concatenates them into one global file. +func Generate(esBeatsPath, beatPath string, files []*YmlFile) error { + files, err := collectBeatFiles(beatPath, files) + if err != nil { + return err + } + + err = writeGeneratedFieldsYml(beatPath, files) + if err != nil { + return err + } + + return AppendFromLibbeat(esBeatsPath, beatPath) +} + +// AppendFromLibbeat appends fields.yml of libbeat to the fields.yml +func AppendFromLibbeat(esBeatsPath, beatPath string) error { + fieldsMetaPath := path.Join(beatPath, "_meta", "fields.yml") + generatedPath := path.Join(beatPath, generatedFieldsYml) + + err := createIfNotExists(fieldsMetaPath, generatedPath) + if err != nil { + return err + } + + if isLibbeat(beatPath) { + out := filepath.Join(esBeatsPath, "libbeat", "fields.yml") + return copyFileWithFlag(generatedPath, out, os.O_RDWR|os.O_CREATE|os.O_TRUNC) + } + + libbeatPath := filepath.Join(esBeatsPath, "libbeat", generatedFieldsYml) + out := filepath.Join(beatPath, "fields.yml") + err = copyFileWithFlag(libbeatPath, out, os.O_RDWR|os.O_CREATE|os.O_TRUNC) + if err != nil { + return err + } + return copyFileWithFlag(generatedPath, out, os.O_WRONLY|os.O_APPEND) +} + +func isLibbeat(beatPath string) bool { + return filepath.Base(beatPath) == "libbeat" +} + +func createIfNotExists(inPath, outPath string) error { + _, err := os.Stat(outPath) + if os.IsNotExist(err) { + err := copyFileWithFlag(inPath, outPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC) + if err != nil { + fmt.Println("Cannot find _meta/fields.yml") + } + return nil + } + return err +} + +func copyFileWithFlag(in, out string, flag int) error { + input, err := ioutil.ReadFile(in) + if err != nil { + return err + } + + output, err := os.OpenFile(out, flag, 0644) + if err != nil { + return err + } + defer output.Close() + + _, err = output.Write(input) + return err + +} diff --git a/vendor/github.com/elastic/beats/libbeat/generator/fields/module_fields_collector.go b/vendor/github.com/elastic/beats/libbeat/generator/fields/module_fields_collector.go new file mode 100644 index 00000000000..5725678610a --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/generator/fields/module_fields_collector.go @@ -0,0 +1,74 @@ +package fields + +import ( + "io/ioutil" + "os" + "path/filepath" +) + +var indentByModule = map[string]int{ + "processors": 0, + "module": 8, + "active": 8, + "protos": 8, +} + +// CollectModuleFiles looks for fields.yml files under the +// specified root directory +func CollectModuleFiles(root string) ([]*YmlFile, error) { + modules, err := ioutil.ReadDir(root) + if err != nil { + return nil, err + } + + var files []*YmlFile + for _, m := range modules { + f, err := collectFiles(m, root) + if err != nil { + return nil, err + } + files = append(files, f...) + } + + return files, nil +} + +func collectFiles(module os.FileInfo, modulesPath string) ([]*YmlFile, error) { + if !module.IsDir() { + return nil, nil + } + + var files []*YmlFile + fieldsYmlPath := filepath.Join(modulesPath, module.Name(), "_meta", "fields.yml") + if _, err := os.Stat(fieldsYmlPath); !os.IsNotExist(err) { + files = append(files, &YmlFile{ + Path: fieldsYmlPath, + Indent: 0, + }) + } else if !os.IsNotExist(err) && err != nil { + return nil, err + } + + modulesRoot := filepath.Base(modulesPath) + sets, err := ioutil.ReadDir(filepath.Join(modulesPath, module.Name())) + if err != nil { + return nil, err + } + + for _, s := range sets { + if !s.IsDir() { + continue + } + + fieldsYmlPath = filepath.Join(modulesPath, module.Name(), s.Name(), "_meta", "fields.yml") + if _, err = os.Stat(fieldsYmlPath); !os.IsNotExist(err) { + files = append(files, &YmlFile{ + Path: fieldsYmlPath, + Indent: indentByModule[modulesRoot], + }) + } else if !os.IsNotExist(err) && err != nil { + return nil, err + } + } + return files, nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/setup/kibana/client.go b/vendor/github.com/elastic/beats/libbeat/kibana/client.go similarity index 83% rename from vendor/github.com/elastic/beats/libbeat/setup/kibana/client.go rename to vendor/github.com/elastic/beats/libbeat/kibana/client.go index 493eb6d89a1..2ed12ce39b5 100644 --- a/vendor/github.com/elastic/beats/libbeat/setup/kibana/client.go +++ b/vendor/github.com/elastic/beats/libbeat/kibana/client.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" "github.com/elastic/beats/libbeat/outputs/transport" ) @@ -59,12 +59,18 @@ func extractError(result []byte) error { return nil } +// NewKibanaClient builds and returns a new Kibana client func NewKibanaClient(cfg *common.Config) (*Client, error) { - config := defaultKibanaConfig + config := defaultClientConfig if err := cfg.Unpack(&config); err != nil { return nil, err } + return NewClientWithConfig(&config) +} + +// NewClientWithConfig creates and returns a kibana client using the given config +func NewClientWithConfig(config *ClientConfig) (*Client, error) { kibanaURL, err := common.MakeURL(config.Protocol, config.Path, config.Host, 5601) if err != nil { return nil, fmt.Errorf("invalid Kibana host: %v", err) @@ -91,7 +97,7 @@ func NewKibanaClient(cfg *common.Config) (*Client, error) { var dialer, tlsDialer transport.Dialer - tlsConfig, err := outputs.LoadTLSConfig(config.TLS) + tlsConfig, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return nil, fmt.Errorf("fail to load the TLS config: %v", err) } @@ -125,7 +131,7 @@ func NewKibanaClient(cfg *common.Config) (*Client, error) { } func (conn *Connection) Request(method, extraPath string, - params url.Values, body io.Reader) (int, []byte, error) { + params url.Values, headers http.Header, body io.Reader) (int, []byte, error) { reqURL := addToURL(conn.URL, extraPath, params) @@ -141,6 +147,12 @@ func (conn *Connection) Request(method, extraPath string, req.Header.Set("Content-Type", "application/json") req.Header.Add("Accept", "application/json") + for header, values := range headers { + for _, value := range values { + req.Header.Add(header, value) + } + } + if method != "GET" { req.Header.Set("kbn-version", conn.version) } @@ -179,7 +191,7 @@ func (client *Client) SetVersion() error { Version string `json:"version"` } - code, result, err := client.Connection.Request("GET", "/api/status", nil, nil) + code, result, err := client.Connection.Request("GET", "/api/status", nil, nil, nil) if err != nil || code >= 400 { return fmt.Errorf("HTTP GET request to /api/status fails: %v. Response: %s.", err, truncateString(result)) @@ -222,7 +234,7 @@ func (client *Client) ImportJSON(url string, params url.Values, jsonBody map[str return fmt.Errorf("fail to marshal the json content: %v", err) } - statusCode, response, err := client.Connection.Request("POST", url, params, bytes.NewBuffer(body)) + statusCode, response, err := client.Connection.Request("POST", url, params, nil, bytes.NewBuffer(body)) if err != nil { return fmt.Errorf("%v. Response: %s", err, truncateString(response)) } @@ -234,6 +246,22 @@ func (client *Client) ImportJSON(url string, params url.Values, jsonBody map[str func (client *Client) Close() error { return nil } +// GetDashboard returns the dashboard with the given id with the index pattern removed +func (client *Client) GetDashboard(id string) (common.MapStr, error) { + params := url.Values{} + params.Add("dashboard", id) + _, response, err := client.Request("GET", "/api/kibana/dashboards/export", params, nil, nil) + if err != nil { + return nil, fmt.Errorf("error exporting dashboard: %+v", err) + } + + result, err := RemoveIndexPattern(response) + if err != nil { + return nil, fmt.Errorf("error removing index pattern: %+v", err) + } + return result, nil +} + // truncateString returns a truncated string if the length is greater than 250 // runes. If the string is truncated "... (truncated)" is appended. Newlines are // replaced by spaces in the returned string. diff --git a/vendor/github.com/elastic/beats/libbeat/kibana/client_config.go b/vendor/github.com/elastic/beats/libbeat/kibana/client_config.go new file mode 100644 index 00000000000..c908a8e17da --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/kibana/client_config.go @@ -0,0 +1,30 @@ +package kibana + +import ( + "time" + + "github.com/elastic/beats/libbeat/common/transport/tlscommon" +) + +// ClientConfig to connect to Kibana +type ClientConfig struct { + Protocol string `config:"protocol"` + Host string `config:"host"` + Path string `config:"path"` + Username string `config:"username"` + Password string `config:"password"` + TLS *tlscommon.Config `config:"ssl"` + Timeout time.Duration `config:"timeout"` +} + +var ( + defaultClientConfig = ClientConfig{ + Protocol: "http", + Host: "localhost:5601", + Path: "", + Username: "", + Password: "", + Timeout: 90 * time.Second, + TLS: nil, + } +) diff --git a/vendor/github.com/elastic/beats/libbeat/kibana/dashboard.go b/vendor/github.com/elastic/beats/libbeat/kibana/dashboard.go new file mode 100644 index 00000000000..47ba251a72a --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/kibana/dashboard.go @@ -0,0 +1,47 @@ +package kibana + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/beats/libbeat/common" +) + +// RemoveIndexPattern removes the index pattern entry from a given dashboard export +func RemoveIndexPattern(data []byte) (common.MapStr, error) { + + var kbResult struct { + // Has to be defined as interface instead of Type directly as it has to be assigned again + // and otherwise would not contain the full content. + Objects []common.MapStr + } + + var result common.MapStr + // Full struct need to not loose any data + err := json.Unmarshal(data, &result) + if err != nil { + return nil, err + } + + // For easier handling, unmarshal into predefined struct + err = json.Unmarshal(data, &kbResult) + if err != nil { + return nil, err + } + + var objs []interface{} + + for _, obj := range kbResult.Objects { + v, err := obj.GetValue("type") + if err != nil { + return nil, fmt.Errorf("type key not found or not string") + } + if v != "index-pattern" { + objs = append(objs, obj) + } + } + + result["objects"] = objs + + return result, nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/config.go b/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/config.go index 497b8acdd46..073a5c7ee9c 100644 --- a/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/config.go +++ b/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/config.go @@ -3,7 +3,7 @@ package elasticsearch import ( "time" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" ) // config is subset of libbeat/outputs/elasticsearch config tailored @@ -11,19 +11,19 @@ import ( type config struct { Hosts []string Protocol string - Params map[string]string `config:"parameters"` - Headers map[string]string `config:"headers"` - Username string `config:"username"` - Password string `config:"password"` - ProxyURL string `config:"proxy_url"` - CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` - TLS *outputs.TLSConfig `config:"ssl"` - MaxRetries int `config:"max_retries"` - Timeout time.Duration `config:"timeout"` - Period time.Duration `config:"period"` - BulkMaxSize int `config:"bulk_max_size" validate:"min=0"` - BufferSize int `config:"buffer_size"` - Tags []string `config:"tags"` + Params map[string]string `config:"parameters"` + Headers map[string]string `config:"headers"` + Username string `config:"username"` + Password string `config:"password"` + ProxyURL string `config:"proxy_url"` + CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` + TLS *tlscommon.Config `config:"ssl"` + MaxRetries int `config:"max_retries"` + Timeout time.Duration `config:"timeout"` + Period time.Duration `config:"period"` + BulkMaxSize int `config:"bulk_max_size" validate:"min=0"` + BufferSize int `config:"buffer_size"` + Tags []string `config:"tags"` } var defaultConfig = config{ diff --git a/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/elasticsearch.go b/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/elasticsearch.go index a78513b8573..eccedd9e73e 100644 --- a/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/elasticsearch.go +++ b/vendor/github.com/elastic/beats/libbeat/monitoring/report/elasticsearch/elasticsearch.go @@ -10,6 +10,7 @@ import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/monitoring" "github.com/elastic/beats/libbeat/monitoring/report" @@ -72,7 +73,7 @@ func makeReporter(beat beat.Info, cfg *common.Config) (report.Reporter, error) { if proxyURL != nil { logp.Info("Using proxy URL: %s", proxyURL) } - tlsConfig, err := outputs.LoadTLSConfig(config.TLS) + tlsConfig, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return nil, err } diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/config.go b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/config.go index 5e07ec1cb9d..e3e16f6f50b 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/config.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/config.go @@ -3,24 +3,24 @@ package elasticsearch import ( "time" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" ) type elasticsearchConfig struct { - Protocol string `config:"protocol"` - Path string `config:"path"` - Params map[string]string `config:"parameters"` - Headers map[string]string `config:"headers"` - Username string `config:"username"` - Password string `config:"password"` - ProxyURL string `config:"proxy_url"` - LoadBalance bool `config:"loadbalance"` - CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` - TLS *outputs.TLSConfig `config:"ssl"` - BulkMaxSize int `config:"bulk_max_size"` - MaxRetries int `config:"max_retries"` - Timeout time.Duration `config:"timeout"` - Backoff Backoff `config:"backoff"` + Protocol string `config:"protocol"` + Path string `config:"path"` + Params map[string]string `config:"parameters"` + Headers map[string]string `config:"headers"` + Username string `config:"username"` + Password string `config:"password"` + ProxyURL string `config:"proxy_url"` + LoadBalance bool `config:"loadbalance"` + CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` + TLS *tlscommon.Config `config:"ssl"` + BulkMaxSize int `config:"bulk_max_size"` + MaxRetries int `config:"max_retries"` + Timeout time.Duration `config:"timeout"` + Backoff Backoff `config:"backoff"` } type Backoff struct { diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/elasticsearch.go b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/elasticsearch.go index 69f2d012512..163b79b8400 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/elasticsearch.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/elasticsearch.go @@ -7,6 +7,7 @@ import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/outputs" "github.com/elastic/beats/libbeat/outputs/outil" @@ -81,7 +82,7 @@ func makeES( return outputs.Fail(err) } - tlsConfig, err := outputs.LoadTLSConfig(config.TLS) + tlsConfig, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return outputs.Fail(err) } @@ -188,7 +189,7 @@ func NewElasticsearchClients(cfg *common.Config) ([]Client, error) { return nil, err } - tlsConfig, err := outputs.LoadTLSConfig(config.TLS) + tlsConfig, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return nil, err } diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/kafka/config.go b/vendor/github.com/elastic/beats/libbeat/outputs/kafka/config.go index 1755c808ff7..4dc4552fe07 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/kafka/config.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/kafka/config.go @@ -10,6 +10,7 @@ import ( "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/common/fmtstr" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/monitoring" "github.com/elastic/beats/libbeat/monitoring/adapter" @@ -19,7 +20,7 @@ import ( type kafkaConfig struct { Hosts []string `config:"hosts" validate:"required"` - TLS *outputs.TLSConfig `config:"ssl"` + TLS *tlscommon.Config `config:"ssl"` Timeout time.Duration `config:"timeout" validate:"min=1"` Metadata metaConfig `config:"metadata"` Key *fmtstr.EventFormatString `config:"key"` diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/config.go b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/config.go index fef7eff8e4b..fb95f73778f 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/config.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/config.go @@ -3,7 +3,7 @@ package logstash import ( "time" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/outputs/transport" ) @@ -18,7 +18,7 @@ type Config struct { Pipelining int `config:"pipelining" validate:"min=0"` CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` MaxRetries int `config:"max_retries" validate:"min=-1"` - TLS *outputs.TLSConfig `config:"ssl"` + TLS *tlscommon.Config `config:"ssl"` Proxy transport.ProxyConfig `config:",inline"` Backoff Backoff `config:"backoff"` } diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go index 8591129a6c3..72165ace653 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go @@ -3,6 +3,7 @@ package logstash import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/outputs" "github.com/elastic/beats/libbeat/outputs/transport" @@ -38,7 +39,7 @@ func makeLogstash( return outputs.Fail(err) } - tls, err := outputs.LoadTLSConfig(config.TLS) + tls, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return outputs.Fail(err) } diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/redis/config.go b/vendor/github.com/elastic/beats/libbeat/outputs/redis/config.go index 1a5124115da..a419eb0aeed 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/redis/config.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/redis/config.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" "github.com/elastic/beats/libbeat/outputs/codec" "github.com/elastic/beats/libbeat/outputs/transport" ) @@ -20,7 +20,7 @@ type redisConfig struct { Timeout time.Duration `config:"timeout"` BulkMaxSize int `config:"bulk_max_size"` MaxRetries int `config:"max_retries"` - TLS *outputs.TLSConfig `config:"ssl"` + TLS *tlscommon.Config `config:"ssl"` Proxy transport.ProxyConfig `config:",inline"` Codec codec.Config `config:"codec"` Db int `config:"db"` diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/redis/redis.go b/vendor/github.com/elastic/beats/libbeat/outputs/redis/redis.go index bc58e4c351a..9fd502ea276 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/redis/redis.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/redis/redis.go @@ -6,6 +6,7 @@ import ( "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/transport/tlscommon" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/outputs" "github.com/elastic/beats/libbeat/outputs/codec" @@ -80,7 +81,7 @@ func makeRedis( return outputs.Fail(err) } - tls, err := outputs.LoadTLSConfig(config.TLS) + tls, err := tlscommon.LoadTLSConfig(config.TLS) if err != nil { return outputs.Fail(err) } diff --git a/vendor/github.com/elastic/beats/libbeat/processors/actions/extract_field.go b/vendor/github.com/elastic/beats/libbeat/processors/actions/extract_field.go index 95af9ae49ae..68ee10f3b1a 100644 --- a/vendor/github.com/elastic/beats/libbeat/processors/actions/extract_field.go +++ b/vendor/github.com/elastic/beats/libbeat/processors/actions/extract_field.go @@ -58,18 +58,18 @@ func NewExtractField(c *common.Config) (processors.Processor, error) { func (f *extract_field) Run(event *beat.Event) (*beat.Event, error) { fieldValue, err := event.GetValue(f.Field) if err != nil { - return nil, fmt.Errorf("error getting field '%s' from event", f.Field) + return event, fmt.Errorf("error getting field '%s' from event", f.Field) } value, ok := fieldValue.(string) if !ok { - return nil, fmt.Errorf("could not get a string from field '%s'", f.Field) + return event, fmt.Errorf("could not get a string from field '%s'", f.Field) } parts := strings.Split(value, f.Separator) parts = deleteEmpty(parts) if len(parts) < f.Index+1 { - return nil, fmt.Errorf("index is out of range for field '%s'", f.Field) + return event, fmt.Errorf("index is out of range for field '%s'", f.Field) } event.PutValue(f.Target, parts[f.Index]) diff --git a/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/config.go b/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/config.go index 4cebf0da81e..ce805f96f86 100644 --- a/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/config.go +++ b/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/config.go @@ -14,15 +14,11 @@ type kubeAnnotatorConfig struct { SyncPeriod time.Duration `config:"sync_period"` // Annotations are kept after pod is removed, until they haven't been accessed // for a full `cleanup_timeout`: - CleanupTimeout time.Duration `config:"cleanup_timeout"` - Indexers PluginConfig `config:"indexers"` - Matchers PluginConfig `config:"matchers"` - DefaultMatchers Enabled `config:"default_matchers"` - DefaultIndexers Enabled `config:"default_indexers"` - IncludeLabels []string `config:"include_labels"` - ExcludeLabels []string `config:"exclude_labels"` - IncludeAnnotations []string `config:"include_annotations"` - IncludePodUID bool `config:"include_pod_uid"` + CleanupTimeout time.Duration `config:"cleanup_timeout"` + Indexers PluginConfig `config:"indexers"` + Matchers PluginConfig `config:"matchers"` + DefaultMatchers Enabled `config:"default_matchers"` + DefaultIndexers Enabled `config:"default_indexers"` } type Enabled struct { diff --git a/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go b/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go index 309ca631e33..a14a53447e7 100644 --- a/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go +++ b/vendor/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go @@ -66,7 +66,11 @@ func newKubernetesAnnotator(cfg *common.Config) (processors.Processor, error) { Indexing.RUnlock() } - metaGen := kubernetes.NewMetaGenerator(config.IncludeAnnotations, config.IncludeLabels, config.ExcludeLabels, config.IncludePodUID) + metaGen, err := kubernetes.NewMetaGenerator(cfg) + if err != nil { + return nil, err + } + indexers := NewIndexers(config.Indexers, metaGen) matchers := NewMatchers(config.Matchers) diff --git a/vendor/github.com/elastic/beats/libbeat/processors/condition.go b/vendor/github.com/elastic/beats/libbeat/processors/condition.go index 7e8bfd9454e..0a8c943419c 100644 --- a/vendor/github.com/elastic/beats/libbeat/processors/condition.go +++ b/vendor/github.com/elastic/beats/libbeat/processors/condition.go @@ -68,7 +68,7 @@ func NewCondition(config *ConditionConfig) (*Condition, error) { if config == nil { // empty condition - return nil, nil + return nil, errors.New("missing condition config") } var err error diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/config.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/config.go new file mode 100644 index 00000000000..1a61fbc4e2e --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/config.go @@ -0,0 +1,25 @@ +package dissect + +type config struct { + Tokenizer *tokenizer `config:"tokenizer"` + Field string `config:"field"` + TargetPrefix string `config:"target_prefix"` +} + +var defaultConfig = config{ + Field: "message", + TargetPrefix: "dissect", +} + +// tokenizer add validation at the unpack level for this specific field. +type tokenizer = Dissector + +// Unpack a tokenizer into a dissector this will trigger the normal validation of the dissector. +func (t *tokenizer) Unpack(v string) error { + d, err := New(v) + if err != nil { + return err + } + *t = *d + return nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/const.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/const.go new file mode 100644 index 00000000000..079aa16560e --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/const.go @@ -0,0 +1,32 @@ +package dissect + +import ( + "errors" + "regexp" +) + +var ( + // delimiterRE tokenizes the following string into walkable with extracted delimiter + key. + // string: + // ` %{key}, %{key/2}` + // into: + // [["", "key" ], [", ", "key/2"]] + delimiterRE = regexp.MustCompile("(?s)(.*?)%\\{([^}]*?)}") + suffixRE = regexp.MustCompile("(.+?)(/(\\d{1,2}))?(->)?$") + + skipFieldPrefix = "?" + appendFieldPrefix = "+" + indirectFieldPrefix = "&" + appendIndirectPrefix = "+&" + indirectAppendPrefix = "&+" + greedySuffix = "->" + + defaultJoinString = " " + + errParsingFailure = errors.New("parsing failure") + errInvalidTokenizer = errors.New("invalid dissect tokenizer") + errEmpty = errors.New("empty string provided") + errMixedPrefixIndirectAppend = errors.New("mixed prefix `&+`") + errMixedPrefixAppendIndirect = errors.New("mixed prefix `&+`") + errEmptyKey = errors.New("empty key") +) diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/delimiter.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/delimiter.go new file mode 100644 index 00000000000..b60978fb971 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/delimiter.go @@ -0,0 +1,125 @@ +package dissect + +import ( + "fmt" + "strings" +) + +//delimiter represents a text section after or before a key, it keeps track of the needle and allows +// to retrieve the position where it starts from a haystack. +type delimiter interface { + // IndexOf receives the haystack and a offset position and will return the absolute position where + // the needle is found. + IndexOf(haystack string, offset int) int + + // Len returns the length of the needle used to calculate boundaries. + Len() int + + // String displays debugging information. + String() string + + // Delimiter returns the actual delimiter string. + Delimiter() string + + // IsGreedy return true if the next key should be greedy (end of string) or when explicitely + // configured. + IsGreedy() bool + + // MarkGreedy marks this delimiter as greedy. + MarkGreedy() + + // Next returns the next delimiter in the chain. + Next() delimiter + + //SetNext sets the next delimiter or nil if current delimiter is the last. + SetNext(d delimiter) +} + +// zeroByte represents a zero string delimiter its usually start of the line. +type zeroByte struct { + needle string + greedy bool + next delimiter +} + +func (z *zeroByte) IndexOf(haystack string, offset int) int { + return offset +} + +func (z *zeroByte) Len() int { + return 0 +} + +func (z *zeroByte) String() string { + return "delimiter: zerobyte" +} + +func (z *zeroByte) Delimiter() string { + return z.needle +} + +func (z *zeroByte) IsGreedy() bool { + return z.greedy +} + +func (z *zeroByte) MarkGreedy() { + z.greedy = true +} + +func (z *zeroByte) Next() delimiter { + return z.next +} + +func (z *zeroByte) SetNext(d delimiter) { + z.next = d +} + +// multiByte represents a delimiter with at least one byte. +type multiByte struct { + needle string + greedy bool + next delimiter +} + +func (m *multiByte) IndexOf(haystack string, offset int) int { + i := strings.Index(haystack[offset:], m.needle) + if i != -1 { + return i + offset + } + return -1 +} + +func (m *multiByte) Len() int { + return len(m.needle) +} + +func (m *multiByte) IsGreedy() bool { + return m.greedy +} + +func (m *multiByte) MarkGreedy() { + m.greedy = true +} + +func (m *multiByte) String() string { + return fmt.Sprintf("delimiter: multibyte (match: '%s', len: %d)", string(m.needle), m.Len()) +} + +func (m *multiByte) Delimiter() string { + return m.needle +} + +func (m *multiByte) Next() delimiter { + return m.next +} + +func (m *multiByte) SetNext(d delimiter) { + m.next = d +} + +func newDelimiter(needle string) delimiter { + if len(needle) == 0 { + return &zeroByte{} + } + return &multiByte{needle: needle} +} diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/dissect.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/dissect.go new file mode 100644 index 00000000000..74e096bb4b8 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/dissect.go @@ -0,0 +1,131 @@ +package dissect + +import "fmt" + +// Map represents the keys and their values extracted with the defined tokenizer. +type Map = map[string]string + +// positions represents the start and end position of the keys found in the string. +type positions []position + +type position struct { + start int + end int +} + +// Dissector is a tokenizer based on the Dissect syntax as defined at: +// https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html +type Dissector struct { + raw string + parser *parser +} + +// Dissect takes the raw string and will use the defined tokenizer to return a map with the +// extracted keys and their values. +// +// Dissect uses a 3 steps process: +// - Find the key positions +// - Extract and resolve the keys (append / indirect) +// - Ignore namedSkipField +func (d *Dissector) Dissect(s string) (Map, error) { + if len(s) == 0 { + return nil, errEmpty + } + + positions, err := d.extract(s) + if err != nil { + return nil, err + } + + if len(positions) == 0 { + return nil, errParsingFailure + } + + return d.resolve(s, positions), nil +} + +// Raw returns the raw tokenizer used to generate the actual parser. +func (d *Dissector) Raw() string { + return d.raw +} + +// extract will navigate through the delimiters and will save the ending and starting position +// of the keys. After we will resolve the positions with the required fields and do the reordering. +func (d *Dissector) extract(s string) (positions, error) { + positions := make([]position, len(d.parser.fields)) + var i, start, lookahead, end int + + // Position on the first delimiter, we assume a hard match on the first delimiter. + // Previous version of dissect was doing a lookahead in the string until it can find the delimiter, + // LS and Beats now have the same behavior and this is consistent with the principle of least + // surprise. + dl := d.parser.delimiters[0] + offset := dl.IndexOf(s, 0) + if offset == -1 || offset != 0 { + return nil, fmt.Errorf( + "could not find beginning delimiter: `%s` in remaining: `%s`, (offset: %d)", + dl.Delimiter(), s, 0, + ) + } + offset += dl.Len() + + // move through all the other delimiters, until we have consumed all of them. + for dl.Next() != nil { + start = offset + end = dl.Next().IndexOf(s, offset) + if end == -1 { + return nil, fmt.Errorf( + "could not find delimiter: `%s` in remaining: `%s`, (offset: %d)", + dl.Delimiter(), s[offset:], offset, + ) + } + + offset = end + + // Greedy consumes keys defined with padding. + // Keys are defined with `->` suffix. + if dl.IsGreedy() { + for { + lookahead = dl.Next().IndexOf(s, offset+1) + if lookahead != offset+1 { + break + } else { + offset = lookahead + } + } + } + + positions[i] = position{start: start, end: end} + offset += dl.Next().Len() + i++ + dl = dl.Next() + } + + if offset < len(s) { + positions[i] = position{start: offset, end: len(s)} + } + return positions, nil +} + +// resolve takes the raw string and the extracted positions and apply fields syntax. +func (d *Dissector) resolve(s string, p positions) Map { + m := make(Map, len(p)) + for _, f := range d.parser.fields { + pos := p[f.ID()] + f.Apply(s[pos.start:pos.end], m) + } + + for _, f := range d.parser.skipFields { + delete(m, f.Key()) + } + return m +} + +// New creates a new Dissector from a tokenized string. +func New(tokenizer string) (*Dissector, error) { + p, err := newParser(tokenizer) + if err != nil { + return nil, err + } + return &Dissector{parser: p, raw: tokenizer}, nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/field.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/field.go new file mode 100644 index 00000000000..06b428688a7 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/field.go @@ -0,0 +1,242 @@ +package dissect + +import ( + "fmt" + "strconv" + "strings" +) + +type field interface { + MarkGreedy() + IsGreedy() bool + Ordinal() int + Key() string + ID() int + Apply(b string, m Map) + String() string + IsSaveable() bool +} + +type baseField struct { + id int + key string + ordinal int + greedy bool +} + +func (f baseField) IsGreedy() bool { + return f.greedy +} + +func (f baseField) MarkGreedy() { + f.greedy = true +} + +func (f baseField) Ordinal() int { + return f.ordinal +} + +func (f baseField) Key() string { + return f.key +} + +func (f baseField) ID() int { + return f.id +} + +func (f baseField) IsSaveable() bool { + return true +} + +func (f baseField) String() string { + return fmt.Sprintf("field: %s, ordinal: %d, greedy: %v", f.key, f.ordinal, f.IsGreedy()) +} + +// normalField is a simple key reference like this: `%{key}` +// +// dissect: %{key} +// message: hello +// result: +// key: hello +type normalField struct { + baseField +} + +func (f normalField) Apply(b string, m Map) { + m[f.Key()] = b +} + +// skipField is an skip field without a name like this: `%{}`, this is often used to +// skip uninteresting parts of a string. +// +// dissect: %{} %{key} +// message: hello world +// result: +// key: world +type skipField struct { + baseField +} + +func (f skipField) Apply(b string, m Map) { +} + +func (f skipField) IsSaveable() bool { + return false +} + +// namedSkipFields is a named skip field with the following syntax: `%{?key}`, this is used +// in conjunction of the indirect field to create a custom `key => value` pair. +// +// dissect: %{?key} %{&key} +// message: hello world +// result: +// hello: world +type namedSkipField struct { + baseField +} + +func (f namedSkipField) Apply(b string, m Map) { + m[f.Key()] = b +} + +func (f namedSkipField) IsSaveable() bool { + return false +} + +// IndirectField is a value that will be extracted and saved in a previously defined namedSkipField. +// the field is defined with the following syntax: `%{&key}`. +// +// dissect: %{?key} %{&key} +// message: hello world +// result: +// hello: world +type indirectField struct { + baseField +} + +func (f indirectField) Apply(b string, m Map) { + v, ok := m[f.Key()] + if ok { + m[v] = b + return + } +} + +// appendField allow an extracted field to be append to a previously extracted values. +// the field is defined with the following syntax: `%{+key} %{+key}`. +// +// dissect: %{+key} %{+key} +// message: hello world +// result: +// key: hello world +// +// dissect: %{+key/2} %{+key/1} +// message: hello world +// result: +// key: world hello +type appendField struct { + baseField + previous delimiter +} + +func (f appendField) Apply(b string, m Map) { + v, ok := m[f.Key()] + if ok { + m[f.Key()] = v + f.JoinString() + b + return + } + m[f.Key()] = b +} + +func (f appendField) JoinString() string { + if f.previous == nil || f.previous.Len() == 0 { + return defaultJoinString + } + return f.previous.Delimiter() +} + +func newField(id int, rawKey string, previous delimiter) (field, error) { + if len(rawKey) == 0 { + return newSkipField(id), nil + } + + key, ordinal, greedy := extractKeyParts(rawKey) + + // Conflicting prefix used. + if strings.HasPrefix(key, appendIndirectPrefix) { + return nil, errMixedPrefixIndirectAppend + } + + if strings.HasPrefix(key, indirectAppendPrefix) { + return nil, errMixedPrefixAppendIndirect + } + + if strings.HasPrefix(key, skipFieldPrefix) { + return newNamedSkipField(id, key[1:]), nil + } + + if strings.HasPrefix(key, appendFieldPrefix) { + return newAppendField(id, key[1:], ordinal, greedy, previous), nil + } + + if strings.HasPrefix(key, indirectFieldPrefix) { + return newIndirectField(id, key[1:]), nil + } + + return newNormalField(id, key, ordinal, greedy), nil +} + +func newSkipField(id int) skipField { + return skipField{baseField{id: id}} +} + +func newNamedSkipField(id int, key string) namedSkipField { + return namedSkipField{ + baseField{id: id, key: key}, + } +} + +func newAppendField(id int, key string, ordinal int, greedy bool, previous delimiter) appendField { + return appendField{ + baseField: baseField{ + id: id, + key: key, + ordinal: ordinal, + greedy: greedy, + }, + previous: previous, + } +} + +func newIndirectField(id int, key string) indirectField { + return indirectField{ + baseField{ + id: id, + key: key, + }, + } +} + +func newNormalField(id int, key string, ordinal int, greedy bool) normalField { + return normalField{ + baseField{ + id: id, + key: key, + ordinal: ordinal, + greedy: greedy, + }, + } +} + +func extractKeyParts(rawKey string) (key string, ordinal int, greedy bool) { + m := suffixRE.FindAllStringSubmatch(rawKey, -1) + + if m[0][3] != "" { + ordinal, _ = strconv.Atoi(m[0][3]) + } + + if strings.EqualFold(greedySuffix, m[0][4]) { + greedy = true + } + return m[0][1], ordinal, greedy +} diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/parser.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/parser.go new file mode 100644 index 00000000000..40237e42860 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/parser.go @@ -0,0 +1,72 @@ +package dissect + +import ( + "sort" +) + +// parser extracts the useful information from the raw tokenizer string, fields, delimiters and +// skip fields. +type parser struct { + delimiters []delimiter + fields []field + skipFields []field +} + +func newParser(tokenizer string) (*parser, error) { + // returns pair of delimiter + key + matches := delimiterRE.FindAllStringSubmatchIndex(tokenizer, -1) + if len(matches) == 0 { + return nil, errInvalidTokenizer + } + + var delimiters []delimiter + var fields []field + + pos := 0 + for id, m := range matches { + d := newDelimiter(tokenizer[m[2]:m[3]]) + key := tokenizer[m[4]:m[5]] + field, err := newField(id, key, d) + if err != nil { + return nil, err + } + if field.IsGreedy() { + d.MarkGreedy() + } + fields = append(fields, field) + delimiters = append(delimiters, d) + pos = m[5] + 1 + } + + if pos < len(tokenizer) { + d := newDelimiter(tokenizer[pos:]) + delimiters = append(delimiters, d) + } + + // Chain delimiters between them to make it easier to match them with the string. + // Some delimiters also need information about their surrounding for decision. + for i := 0; i < len(delimiters); i++ { + if i+1 < len(delimiters) { + delimiters[i].SetNext(delimiters[i+1]) + } + } + + // group and order append field at the end so the string join is from left to right. + sort.Slice(fields, func(i, j int) bool { + return fields[i].Ordinal() < fields[j].Ordinal() + }) + + // List of fields needed for indirection but don't need to appear in the final event. + var skipFields []field + for _, f := range fields { + if !f.IsSaveable() { + skipFields = append(skipFields, f) + } + } + + return &parser{ + delimiters: delimiters, + fields: fields, + skipFields: skipFields, + }, nil +} diff --git a/vendor/github.com/elastic/beats/libbeat/processors/dissect/processor.go b/vendor/github.com/elastic/beats/libbeat/processors/dissect/processor.go new file mode 100644 index 00000000000..e408296840a --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/processors/dissect/processor.go @@ -0,0 +1,94 @@ +package dissect + +import ( + "fmt" + + "github.com/pkg/errors" + + "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/processors" +) + +type processor struct { + config config +} + +func init() { + processors.RegisterPlugin("dissect", newProcessor) +} + +func newProcessor(c *common.Config) (processors.Processor, error) { + config := defaultConfig + err := c.Unpack(&config) + if err != nil { + return nil, err + } + p := &processor{config: config} + + return p, nil +} + +// Run takes the event and will apply the tokenizer on the configured field. +func (p *processor) Run(event *beat.Event) (*beat.Event, error) { + v, err := event.GetValue(p.config.Field) + if err != nil { + return event, err + } + + s, ok := v.(string) + if !ok { + return event, fmt.Errorf("field is not a string, value: `%v`, field: `%s`", v, p.config.Field) + } + + m, err := p.config.Tokenizer.Dissect(s) + if err != nil { + return event, err + } + + event, err = p.mapper(event, mapToMapStr(m)) + if err != nil { + return event, err + } + + return event, nil +} + +func (p *processor) mapper(event *beat.Event, m common.MapStr) (*beat.Event, error) { + copy := event.Fields.Clone() + + prefix := "" + if p.config.TargetPrefix != "" { + prefix = p.config.TargetPrefix + "." + } + var prefixKey string + for k, v := range m { + prefixKey = prefix + k + if _, err := event.GetValue(prefixKey); err == common.ErrKeyNotFound { + event.PutValue(prefixKey, v) + } else { + event.Fields = copy + // When the target key exists but is a string instead of a map. + if err != nil { + return event, errors.Wrapf(err, "cannot override existing key with `%s`", prefixKey) + } + return event, fmt.Errorf("cannot override existing key with `%s`", prefixKey) + } + } + + return event, nil +} + +func (p *processor) String() string { + return "dissect=" + p.config.Tokenizer.Raw() + + ",field=" + p.config.Field + + ",target_prefix=" + p.config.TargetPrefix +} + +func mapToMapStr(m Map) common.MapStr { + newMap := make(common.MapStr, len(m)) + for k, v := range m { + newMap[k] = v + } + return newMap +} diff --git a/vendor/github.com/elastic/beats/libbeat/publisher/queue/spool/spool.go b/vendor/github.com/elastic/beats/libbeat/publisher/queue/spool/spool.go index 26fecff27fb..222b9034143 100644 --- a/vendor/github.com/elastic/beats/libbeat/publisher/queue/spool/spool.go +++ b/vendor/github.com/elastic/beats/libbeat/publisher/queue/spool/spool.go @@ -6,6 +6,8 @@ import ( "sync" "time" + "github.com/pkg/errors" + "github.com/elastic/beats/libbeat/common/atomic" "github.com/elastic/beats/libbeat/publisher/queue" "github.com/elastic/go-txfile" @@ -86,7 +88,7 @@ func NewSpool(logger logger, path string, settings Settings) (*Spool, error) { f, err := txfile.Open(path, mode, settings.File) if err != nil { - return nil, err + return nil, errors.Wrapf(err, "spool queue: failed to open file at path '%s'", path) } defer ifNotOK(&ok, ignoreErr(f.Close)) diff --git a/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go b/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go deleted file mode 100644 index e18f561d4ae..00000000000 --- a/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go +++ /dev/null @@ -1,29 +0,0 @@ -package kibana - -import ( - "time" - - "github.com/elastic/beats/libbeat/outputs" -) - -type kibanaConfig struct { - Protocol string `config:"protocol"` - Host string `config:"host"` - Path string `config:"path"` - Username string `config:"username"` - Password string `config:"password"` - TLS *outputs.TLSConfig `config:"ssl"` - Timeout time.Duration `config:"timeout"` -} - -var ( - defaultKibanaConfig = kibanaConfig{ - Protocol: "http", - Host: "localhost:5601", - Path: "", - Username: "", - Password: "", - Timeout: 90 * time.Second, - TLS: nil, - } -) diff --git a/vendor/github.com/elastic/beats/libbeat/template/config.go b/vendor/github.com/elastic/beats/libbeat/template/config.go index 8c9e98fd76f..ab5834121d3 100644 --- a/vendor/github.com/elastic/beats/libbeat/template/config.go +++ b/vendor/github.com/elastic/beats/libbeat/template/config.go @@ -3,10 +3,15 @@ package template import "github.com/elastic/beats/libbeat/common" type TemplateConfig struct { - Enabled bool `config:"enabled"` - Name string `config:"name"` - Pattern string `config:"pattern"` - Fields string `config:"fields"` + Enabled bool `config:"enabled"` + Name string `config:"name"` + Pattern string `config:"pattern"` + Fields string `config:"fields"` + JSON struct { + Enabled bool `config:"enabled"` + Path string `config:"path"` + Name string `config:"name"` + } `config:"json"` AppendFields common.Fields `config:"append_fields"` Overwrite bool `config:"overwrite"` Settings TemplateSettings `config:"settings"` diff --git a/vendor/github.com/elastic/beats/libbeat/template/load.go b/vendor/github.com/elastic/beats/libbeat/template/load.go index 213995ba2aa..baa91bdcaf0 100644 --- a/vendor/github.com/elastic/beats/libbeat/template/load.go +++ b/vendor/github.com/elastic/beats/libbeat/template/load.go @@ -1,7 +1,10 @@ package template import ( + "encoding/json" "fmt" + "io/ioutil" + "os" "github.com/elastic/beats/libbeat/beat" "github.com/elastic/beats/libbeat/common" @@ -51,40 +54,60 @@ func (l *Loader) Load() error { return fmt.Errorf("error creating template instance: %v", err) } + templateName := tmpl.GetName() + if l.config.JSON.Enabled { + templateName = l.config.JSON.Name + } // Check if template already exist or should be overwritten - exists := l.CheckTemplate(tmpl.GetName()) + exists := l.CheckTemplate(templateName) if !exists || l.config.Overwrite { logp.Info("Loading template for Elasticsearch version: %s", l.client.GetVersion()) - if l.config.Overwrite { logp.Info("Existing template will be overwritten, as overwrite is enabled.") } - var output common.MapStr + var template map[string]interface{} + if l.config.JSON.Enabled { + jsonPath := paths.Resolve(paths.Config, l.config.JSON.Path) + if _, err := os.Stat(jsonPath); err != nil { + return fmt.Errorf("error checking for json template: %s", err) + } + + logp.Info("Loading json template from file %s", jsonPath) + + content, err := ioutil.ReadFile(jsonPath) + if err != nil { + return fmt.Errorf("error reading file. Path: %s, Error: %s", jsonPath, err) - // Load fields from path - if l.config.Fields != "" { + } + err = json.Unmarshal(content, &template) + if err != nil { + return fmt.Errorf("could not unmarshal json template: %s", err) + } + // Load fields from path + } else if l.config.Fields != "" { logp.Debug("template", "Load fields.yml from file: %s", l.config.Fields) fieldsPath := paths.Resolve(paths.Config, l.config.Fields) - output, err = tmpl.LoadFile(fieldsPath) + template, err = tmpl.LoadFile(fieldsPath) if err != nil { return fmt.Errorf("error creating template from file %s: %v", fieldsPath, err) } } else { logp.Debug("template", "Load default fields.yml") - output, err = tmpl.LoadBytes(l.fields) + template, err = tmpl.LoadBytes(l.fields) if err != nil { return fmt.Errorf("error creating template: %v", err) } } - err = l.LoadTemplate(tmpl.GetName(), output) + err = l.LoadTemplate(templateName, template) if err != nil { - return fmt.Errorf("could not load template. Elasticsearh returned: %v. Template is: %s", err, output) + return fmt.Errorf("could not load template. Elasticsearh returned: %v. Template is: %s", err, template) } + } else { logp.Info("Template already exists and will not be overwritten.") } diff --git a/vendor/github.com/elastic/beats/libbeat/template/processor.go b/vendor/github.com/elastic/beats/libbeat/template/processor.go index 178f7d71da2..91c4b2bc4db 100644 --- a/vendor/github.com/elastic/beats/libbeat/template/processor.go +++ b/vendor/github.com/elastic/beats/libbeat/template/processor.go @@ -157,6 +157,13 @@ func (p *Processor) keyword(f *common.Field) common.MapStr { property["ignore_above"] = 1024 property["index"] = "not_analyzed" } + + if len(f.MultiFields) > 0 { + fields := common.MapStr{} + p.Process(f.MultiFields, "", fields) + property["fields"] = fields + } + return property } diff --git a/vendor/vendor.json b/vendor/vendor.json index 0922aa0e2db..e04d31dc148 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -6,22 +6,22 @@ "checksumSHA1": "AzjRkOQtVBTwIw4RJLTygFhJs3s=", "origin": "github.com/elastic/beats/vendor/github.com/Microsoft/go-winio", "path": "github.com/Microsoft/go-winio", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "bFZjImadCCzrjKSGjlg/HZpMqT4=", "origin": "github.com/elastic/beats/vendor/github.com/Shopify/sarama", "path": "github.com/Shopify/sarama", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "DYv6Q1+VfnUVxMwvk5IshAClLvw=", "origin": "github.com/elastic/beats/vendor/github.com/Sirupsen/logrus", "path": "github.com/Sirupsen/logrus", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "qtjd74+bErubh+qyv3s+lWmn9wc=", @@ -33,197 +33,197 @@ "checksumSHA1": "dvabztWVQX8f6oMLRyv4dLH+TGY=", "origin": "github.com/elastic/beats/vendor/github.com/davecgh/go-spew/spew", "path": "github.com/davecgh/go-spew/spew", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "Gj+xR1VgFKKmFXYOJMnAczC3Znk=", "origin": "github.com/elastic/beats/vendor/github.com/docker/distribution/digestset", "path": "github.com/docker/distribution/digestset", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "2Fe4D6PGaVE2he4fUeenLmhC1lE=", "origin": "github.com/elastic/beats/vendor/github.com/docker/distribution/reference", "path": "github.com/docker/distribution/reference", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "UL2NF1EGiSsQoEfvycnuZIcUbZY=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api", "path": "github.com/docker/docker/api", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "KMFpbV3mlrbc41d2DYnq05QYpSc=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types", "path": "github.com/docker/docker/api/types", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "jVJDbe0IcyjoKc2xbohwzQr+FF0=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/blkiodev", "path": "github.com/docker/docker/api/types/blkiodev", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "AeSC0BOu1uapkGqfSXtfVSpwJzs=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/container", "path": "github.com/docker/docker/api/types/container", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "4XuWn5+wgYwUsw604jvYMklq4Hc=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/events", "path": "github.com/docker/docker/api/types/events", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "J2OKngfI3vgswudr9PZVUFcRRu0=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/filters", "path": "github.com/docker/docker/api/types/filters", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "yeB781yxPhnN6OXQ9/qSsyih3ek=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/image", "path": "github.com/docker/docker/api/types/image", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "UK+VdM648oWzyqE4OqttgmPqjoA=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/mount", "path": "github.com/docker/docker/api/types/mount", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "Gskp+nvbVe8Gk1xPLHylZvNmqTg=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/network", "path": "github.com/docker/docker/api/types/network", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "r2vWq7Uc3ExKzMqYgH0b4AKjLKY=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/registry", "path": "github.com/docker/docker/api/types/registry", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "VTxWyFud/RedrpllGdQonVtGM/A=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/strslice", "path": "github.com/docker/docker/api/types/strslice", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ZaizCpJ3eBcfR9ywpLaJd4AhM9k=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/swarm", "path": "github.com/docker/docker/api/types/swarm", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "B7ZwKzrv3t3Vlox6/bYMHhMjsM8=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/time", "path": "github.com/docker/docker/api/types/time", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "uDPQ3nHsrvGQc9tg/J9OSC4N5dQ=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/versions", "path": "github.com/docker/docker/api/types/versions", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "IBJy2zPEnYmcFJ3lM1eiRWnCxTA=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/api/types/volume", "path": "github.com/docker/docker/api/types/volume", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "c6OyeEvpQDvVLhrJSxgjEZv1tF8=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/client", "path": "github.com/docker/docker/client", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "jmo/t2zXAxirEPoFucNPXA/1SEc=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/pkg/ioutils", "path": "github.com/docker/docker/pkg/ioutils", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ndnAFCfsGC3upNQ6jAEwzxcurww=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/pkg/longpath", "path": "github.com/docker/docker/pkg/longpath", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "kr46EAa+FsUcWxOq6edyX6BUzE4=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system", "path": "github.com/docker/docker/pkg/system", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "8I0Ez+aUYGpsDEVZ8wN/Ztf6Zqs=", "origin": "github.com/elastic/beats/vendor/github.com/docker/docker/pkg/tlsconfig", "path": "github.com/docker/docker/pkg/tlsconfig", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "JbiWTzH699Sqz25XmDlsARpMN9w=", "origin": "github.com/elastic/beats/vendor/github.com/docker/go-connections/nat", "path": "github.com/docker/go-connections/nat", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "jUfDG3VQsA2UZHvvIXncgiddpYA=", "origin": "github.com/elastic/beats/vendor/github.com/docker/go-connections/sockets", "path": "github.com/docker/go-connections/sockets", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "tuSzlS1UQ03+5Fvtqr5hI5sLLhA=", "origin": "github.com/elastic/beats/vendor/github.com/docker/go-connections/tlsconfig", "path": "github.com/docker/go-connections/tlsconfig", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ambe8F4AofPxChCJssXXwWphQQ8=", "origin": "github.com/elastic/beats/vendor/github.com/docker/go-units", "path": "github.com/docker/go-units", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "sNAU9ojYVUhO6dVXey6T3JhRQpw=", "origin": "github.com/elastic/beats/vendor/github.com/docker/libtrust", "path": "github.com/docker/libtrust", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "tJd2T/eyW6ejAev7WzGxTeUVOPQ=", @@ -235,324 +235,340 @@ "checksumSHA1": "y2Kh4iPlgCPXSGTCcFpzePYdzzg=", "origin": "github.com/elastic/beats/vendor/github.com/eapache/go-resiliency/breaker", "path": "github.com/eapache/go-resiliency/breaker", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "WHl96RVZlOOdF4Lb1OOadMpw8ls=", "origin": "github.com/elastic/beats/vendor/github.com/eapache/go-xerial-snappy", "path": "github.com/eapache/go-xerial-snappy", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "oCCs6kDanizatplM5e/hX76busE=", "origin": "github.com/elastic/beats/vendor/github.com/eapache/queue", "path": "github.com/eapache/queue", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "1ehnSD4NWvAj66S6kqtSiFENecM=", "path": "github.com/elastic/beats/libbeat/api", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "IfZBCp1ci/ZlKhcgiByt+cOBIYw=", "path": "github.com/elastic/beats/libbeat/asset", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "FEQk83iU/exTxkzb3kaCkcEI36w=", + "checksumSHA1": "BQEsA6lOb32HlEzCqOW/A67YNB4=", "path": "github.com/elastic/beats/libbeat/autodiscover", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "1kB/tsDeGhaOVKcmci2aAC6sN+w=", "path": "github.com/elastic/beats/libbeat/autodiscover/builder", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "mvMbWi8jMCS5ZDCiWv+GkUzsmEw=", "path": "github.com/elastic/beats/libbeat/autodiscover/meta", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "W+FPNgqITXjGiLYWhnETTzbrfM8=", "path": "github.com/elastic/beats/libbeat/autodiscover/providers/docker", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "/pmmZD7WatF6T02xuUHnqGHQmEQ=", + "checksumSHA1": "/TIhDClhghdkP6iRwKPs7S9vjkA=", + "path": "github.com/elastic/beats/libbeat/autodiscover/providers/jolokia", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", + "version": "master", + "versionExact": "master" + }, + { + "checksumSHA1": "+RhByAKx2iEmJT1UqqfFd41ywiQ=", "path": "github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "1jESfeLQBUHMWV7Ue6+bKINWnhM=", "path": "github.com/elastic/beats/libbeat/autodiscover/template", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "cKB02Mx38M6uo+gUN/NMWgV29Uc=", "path": "github.com/elastic/beats/libbeat/beat", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "muagLYojdINq+pPe+q/6cjjtj9I=", + "checksumSHA1": "2ArJRZ7LhxbekMlTwifjlk6nGhM=", "path": "github.com/elastic/beats/libbeat/cfgfile", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "kcJBPeHVyLhstApfy7Smi6fcxrg=", "path": "github.com/elastic/beats/libbeat/cloudid", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "C188tgHii0rC9jfvfNw/Njfs3c4=", + "checksumSHA1": "a4kK1r6MDb2pLkTnf6V9E4N73kI=", "path": "github.com/elastic/beats/libbeat/cmd", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "VGO4qTeDaq/cECQjHqIKGWJNpZ0=", + "checksumSHA1": "MJhGFC6zQ8gDg4BE6ZHhBXcL32s=", "path": "github.com/elastic/beats/libbeat/cmd/export", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "XfxYp4wuCbVMKTRmt04u8+Y1kns=", + "checksumSHA1": "XSe9/0b2rTtCmdLflWGMHKAVx4U=", "path": "github.com/elastic/beats/libbeat/cmd/instance", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "hnrALZ/owH5lcue6u3G9p0/K4ag=", "path": "github.com/elastic/beats/libbeat/cmd/test", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "3wdKnenEWhJ2chGWy9ejd3qYSyI=", + "checksumSHA1": "7FD4p/f/HsTlBqEeemfm59ZKj8E=", "path": "github.com/elastic/beats/libbeat/common", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "/d9OH1zlHQck1QRHUyrl28xl2fM=", "path": "github.com/elastic/beats/libbeat/common/atomic", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "I5ABLC2bPeiBbL2fKqLsQNe4DSQ=", "path": "github.com/elastic/beats/libbeat/common/bus", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "FhJSOKSTJHrfTMOxwWNjT2BFcgc=", "path": "github.com/elastic/beats/libbeat/common/cfgtype", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "5Y5WqKnrBD4VBRXCRn2JgFDvMV8=", "path": "github.com/elastic/beats/libbeat/common/cfgwarn", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "OSXtQFu0+JoGUcWYpcFkXuvhRO4=", "path": "github.com/elastic/beats/libbeat/common/cli", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "89XnmNzW2SzjHjvy7nKGqvC5izk=", + "checksumSHA1": "6VSpBdjb2UYME3Rv6LlxTWKzjZw=", "path": "github.com/elastic/beats/libbeat/common/docker", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "7bGcM14M5R8BuQLqKdWfbbQaKEM=", "path": "github.com/elastic/beats/libbeat/common/dtfmt", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "GUO/I9H/meC4CKx6GADL4b82Ngg=", "path": "github.com/elastic/beats/libbeat/common/file", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "7WSOY58klc0crUF/5UZx/pLFIR0=", "path": "github.com/elastic/beats/libbeat/common/fmtstr", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "pdFJ+DF0STunSGRopAMwn9n9ZlY=", "path": "github.com/elastic/beats/libbeat/common/jsontransform", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "gr85suNr2sLvTqVZ1kY8EarvGG0=", + "checksumSHA1": "pOEHIgr+TBLt2M86VrN0f5WtTX0=", "path": "github.com/elastic/beats/libbeat/common/kubernetes", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "43jcD3PFE0qBsP40iA4kb/g94MU=", "path": "github.com/elastic/beats/libbeat/common/match", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "ZVSXt7kvNZA3mVDwoGFv/8IDDys=", "path": "github.com/elastic/beats/libbeat/common/safemapstr", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "XFFI1jhD1bXSJGNOq3Ef48sGP/0=", "path": "github.com/elastic/beats/libbeat/common/schema", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "U9kadFhZbCKziYV/Yx9GsX5WzoI=", "path": "github.com/elastic/beats/libbeat/common/schema/mapstriface", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "NDPOrg8lg+DbBC29rP3Cca/B6iQ=", "path": "github.com/elastic/beats/libbeat/common/seccomp", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "zi4xMJ43/IzPCPNXs8iBc0WI2sE=", "path": "github.com/elastic/beats/libbeat/common/streambuf", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "1k581NuOkCx0xoGSrGV0vD6i+PA=", "path": "github.com/elastic/beats/libbeat/common/terminal", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "IojMdy09gnr36zzi5jlf5Ih96rw=", "path": "github.com/elastic/beats/libbeat/common/transport/tlscommon", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "cVN1okMXjcVjFyBUW1czfpjuoTc=", + "checksumSHA1": "1BGkz3Aqil38Jcihq2IA3hnZmVU=", "path": "github.com/elastic/beats/libbeat/dashboards", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", + "version": "master", + "versionExact": "master" + }, + { + "checksumSHA1": "eOCIv34+OqkdqUtXaEyPahZzJ3I=", + "path": "github.com/elastic/beats/libbeat/generator/fields", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "Ie2zbuch+Jx2IrpjstO1jJeiV8o=", "path": "github.com/elastic/beats/libbeat/keystore", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "z8VztKgyYSA7eyVuhNocdpav6zA=", + "checksumSHA1": "73+NMas6ZSjhO07Ys9oC1+RGHFA=", "path": "github.com/elastic/beats/libbeat/kibana", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, @@ -567,304 +583,312 @@ { "checksumSHA1": "o43GjmYyneJqJaevwdy6tBX4vLA=", "path": "github.com/elastic/beats/libbeat/logp", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "/fSZH8iFO9jqRiSSxzM593zMS4Y=", "path": "github.com/elastic/beats/libbeat/logp/configure", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "3rCxbiMynIdSdQe7h95cuTKEXbY=", "path": "github.com/elastic/beats/libbeat/metric/system/cpu", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "z7V8OR3yB8TYRVYkckzIl17wuYQ=", "path": "github.com/elastic/beats/libbeat/metric/system/memory", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "B0sjyYQEXlhHRQQ0/lqWBY4sKCQ=", "path": "github.com/elastic/beats/libbeat/metric/system/process", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "GDmMpZFytzRj1weDwkMBrBUATZ4=", "path": "github.com/elastic/beats/libbeat/monitoring", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "tRfILb+3nS9S5xf1GTqyGVbvGnU=", "path": "github.com/elastic/beats/libbeat/monitoring/adapter", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "9OgsegLCw7fQSbzm92h5SSLJSqo=", "path": "github.com/elastic/beats/libbeat/monitoring/report", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "oXzJ+dK5IkLXphcT+DRKldFHQKc=", + "checksumSHA1": "11EpRZ+eNJac2X1nbyM0vUO3rs4=", "path": "github.com/elastic/beats/libbeat/monitoring/report/elasticsearch", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "O0mqYi92UChneQIZItpvDf+egYM=", "path": "github.com/elastic/beats/libbeat/monitoring/report/log", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "pi+bW2uHkZ0IH9fDcCWNt8dzyqQ=", "path": "github.com/elastic/beats/libbeat/outputs", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "lRSwiGVO2pp69QtoR2Fa8CP3O8I=", "path": "github.com/elastic/beats/libbeat/outputs/codec", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "vjVLDyWbKmCR6e2OayNshujneSI=", "path": "github.com/elastic/beats/libbeat/outputs/codec/format", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "Fsj11NCCIR55lFMYxRDbEbRfd3k=", "path": "github.com/elastic/beats/libbeat/outputs/codec/json", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "JGP5bMcL1KyJRJCR1kW11gZhPhk=", "path": "github.com/elastic/beats/libbeat/outputs/console", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "Zza7ZIc1UYgxgEiNoLPB0jks/xo=", + "checksumSHA1": "NyKADYkpW7O19K9QjQsPBmd7kYk=", "path": "github.com/elastic/beats/libbeat/outputs/elasticsearch", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "S1nJaQZExaATn2Xpin4eY7Oyr34=", "path": "github.com/elastic/beats/libbeat/outputs/fileout", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "yqW+WO2zw6XtqPO9qfPdIMemue0=", + "checksumSHA1": "aD50ZHjy8VMfE+DOlx52vWHDh/E=", "path": "github.com/elastic/beats/libbeat/outputs/kafka", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "Wpvv92+QT4zveD+nlAx91aKq5OE=", + "checksumSHA1": "os15BbOJ2JvB4isIRr4Lkrje7/8=", "path": "github.com/elastic/beats/libbeat/outputs/logstash", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "UEGH5mAXdKBysIjODuTxHKlzqsY=", "path": "github.com/elastic/beats/libbeat/outputs/outil", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "j11eTg831Fs7uxEz2dRA/DJmKoU=", + "checksumSHA1": "pibHALL2/V+rGu0aTT2Dq9i7vgM=", "path": "github.com/elastic/beats/libbeat/outputs/redis", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "eOzCBcDGbJflX4wkqW2fNTGaV+M=", "path": "github.com/elastic/beats/libbeat/outputs/transport", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "d5b9Ra0zcwznwemxEJmyW28FZJ0=", "path": "github.com/elastic/beats/libbeat/paths", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "H+5T9ru9pqZxsXX739UwIH561nc=", "path": "github.com/elastic/beats/libbeat/plugin", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "lVYS7/dQ1o0UzcIwPq5LcCTbm4k=", + "checksumSHA1": "3jjj6+V4ge9NzgAookjiC8yuTUg=", "path": "github.com/elastic/beats/libbeat/processors", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "xZsQwtDUvf81CVLGkbdWbffF4wE=", + "checksumSHA1": "VOCx+tRwUAAkIFUbWPmik8MyKlI=", "path": "github.com/elastic/beats/libbeat/processors/actions", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "rI+RcxALfhqftyApiHM1AgSjQ8U=", "path": "github.com/elastic/beats/libbeat/processors/add_cloud_metadata", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "bJALxMP7ohe+6RcLkChwweME0jQ=", "path": "github.com/elastic/beats/libbeat/processors/add_docker_metadata", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "/mCbjskMrPfIPg0lH0cD2lk/PlM=", "path": "github.com/elastic/beats/libbeat/processors/add_host_metadata", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "0N+AmGLjt/t1glu3mrebpyazWf0=", + "checksumSHA1": "QtczFavHgk0uKduSMTfhKc74rmQ=", "path": "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "UCfWJFoOVRzY1nQ+mAHT+mpGYv4=", "path": "github.com/elastic/beats/libbeat/processors/add_locale", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", + "version": "master", + "versionExact": "master" + }, + { + "checksumSHA1": "bFOdAL7Pve6+vCQzQHvy/BAGeL4=", + "path": "github.com/elastic/beats/libbeat/processors/dissect", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "3kyV9PwlSwcLnK9SWKX97Gh7c00=", "path": "github.com/elastic/beats/libbeat/publisher", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "1o8H8N6gEznJwpTwmtlgDu9o+/A=", "path": "github.com/elastic/beats/libbeat/publisher/includes", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "R7t+F4ptdZLZsOgq9dT/8bANNxE=", "path": "github.com/elastic/beats/libbeat/publisher/pipeline", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "k/1pxNUislJBfsjb/yZVG7+YP28=", "path": "github.com/elastic/beats/libbeat/publisher/queue", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "dWDK9p/Axnnr9A/kM4qhsh2arhQ=", "path": "github.com/elastic/beats/libbeat/publisher/queue/memqueue", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "EeLGk7/g4PCYzEHh6IPkBdbT5aA=", + "checksumSHA1": "WBGat3DLazDLWWhh+kkbl+HXId8=", "path": "github.com/elastic/beats/libbeat/publisher/queue/spool", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "AQpIjVClosTUbCL9bFO0onlxr9Y=", "path": "github.com/elastic/beats/libbeat/service", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, @@ -877,26 +901,26 @@ "versionExact": "master" }, { - "checksumSHA1": "jiZzg/v9nLMEvTKlXDzomSkVa/A=", + "checksumSHA1": "tax7h8Bk2Ea1rMzVbVHueO08+dQ=", "path": "github.com/elastic/beats/libbeat/template", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "p+um0Jv/tT4q7+rCQS7dxq50Ws0=", "path": "github.com/elastic/beats/libbeat/testing", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "70PCkIykADgatq8ExOSFudQ2U90=", "path": "github.com/elastic/beats/libbeat/version", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z", + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z", "version": "master", "versionExact": "master" }, @@ -904,29 +928,29 @@ "checksumSHA1": "3jizmlZPCyo6FAZY8Trk9jA8NH4=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-lumber/client/v2", "path": "github.com/elastic/go-lumber/client/v2", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "m6HLKpDAZlkTTQMqabf3aT6TQ/s=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-lumber/protocol/v2", "path": "github.com/elastic/go-lumber/protocol/v2", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "TatpgVf9fhQp1GtNwSyNw5cgVKM=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-seccomp-bpf", "path": "github.com/elastic/go-seccomp-bpf", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "qTs7QT+GC2Dr4aFoLFHCkAOoVeU=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-seccomp-bpf/arch", "path": "github.com/elastic/go-seccomp-bpf/arch", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "AaEPt+KMknLXze11YOnBGKzP3aA=", @@ -1052,43 +1076,43 @@ "checksumSHA1": "61XUpyQ3zWnJ7Tlj0xLsHtnzwJY=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg", "path": "github.com/elastic/go-ucfg", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "8cr5YhslUMgpvF2JebYvKC+Ezr4=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/cfgutil", "path": "github.com/elastic/go-ucfg/cfgutil", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "Q2qrc/nI9d1tNzWTmfrkWvBNqsc=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/flag", "path": "github.com/elastic/go-ucfg/flag", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "uOrhvj7stlb0foxGZ5vbC1XJeto=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse", "path": "github.com/elastic/go-ucfg/internal/parse", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "sMBM95+VYBPhwtNVHqqN1yrvk1o=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/json", "path": "github.com/elastic/go-ucfg/json", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "qvzj0KzxrWvYhHIbo+FwBxUNDFw=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/yaml", "path": "github.com/elastic/go-ucfg/yaml", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "yu/X+qHftvfQlAnjPdYLwrDn2nI=", @@ -1100,267 +1124,218 @@ "checksumSHA1": "RPOLNUpw00QUUaA/U4YbPVf6WlA=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/gosigar", "path": "github.com/elastic/gosigar", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "TX9y4oPL5YmT4Gb/OU4GIPTdQB4=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/gosigar/cgroup", "path": "github.com/elastic/gosigar/cgroup", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "hPqGM3DENaGfipEODoyZ4mKogTQ=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/gosigar/sys", "path": "github.com/elastic/gosigar/sys", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "mLq5lOyD0ZU39ysXuf1ETOLJ+f0=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/gosigar/sys/linux", "path": "github.com/elastic/gosigar/sys/linux", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "qDsgp2kAeI9nhj565HUScaUyjU4=", "origin": "github.com/elastic/beats/vendor/github.com/elastic/gosigar/sys/windows", "path": "github.com/elastic/gosigar/sys/windows", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "hTxFrbA619JCHysWjXHa9U6bfto=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s", "path": "github.com/ericchiang/k8s", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" - }, - { - "checksumSHA1": "uQuMoUlS7hAWsB+Mwr/1B7+35BU=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/api/resource", - "path": "github.com/ericchiang/k8s/api/resource", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" - }, - { - "checksumSHA1": "XN1tbPrI03O0ishnZyfkWtTnrcQ=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/api/unversioned", - "path": "github.com/ericchiang/k8s/api/unversioned", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" - }, - { - "checksumSHA1": "yfTg3/Qn7KiizNJ39JmPBFi9YDQ=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/api/v1", - "path": "github.com/ericchiang/k8s/api/v1", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "y8fNiBLSoGojnUsGDsdLlsJYyqQ=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/apiextensions/v1beta1", "path": "github.com/ericchiang/k8s/apis/apiextensions/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" - }, - { - "checksumSHA1": "uw/3eB6WiVCSrQZS9ZZs/1kyu1I=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/apps/v1alpha1", - "path": "github.com/ericchiang/k8s/apis/apps/v1alpha1", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "JxQ/zEWQSrncYNKifCuMctq+Tsw=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/apps/v1beta1", "path": "github.com/ericchiang/k8s/apis/apps/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "bjklGt/pc6kWOZewAw87Hchw5oY=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/authentication/v1", "path": "github.com/ericchiang/k8s/apis/authentication/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "LExhnM9Vn0LQoLQWszQ7aIxDxb4=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/authentication/v1beta1", "path": "github.com/ericchiang/k8s/apis/authentication/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "GM+PzOiBoq3cxx4h5RKVUb3UH60=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/authorization/v1", "path": "github.com/ericchiang/k8s/apis/authorization/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "zfr5oUVjbWRfvXi2LJiGMfFeDQY=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/authorization/v1beta1", "path": "github.com/ericchiang/k8s/apis/authorization/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "izkXNDp5a5WP45jU0hSfTrwyfvM=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/autoscaling/v1", "path": "github.com/ericchiang/k8s/apis/autoscaling/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" - }, - { - "checksumSHA1": "kUXiQQA99K7zquvG9es3yauVjYw=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/autoscaling/v2alpha1", - "path": "github.com/ericchiang/k8s/apis/autoscaling/v2alpha1", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "FryZuAxWn4Ig8zc913w9BdfYzvs=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/batch/v1", "path": "github.com/ericchiang/k8s/apis/batch/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ylo7Z8wyJD+tmICB7wsOVIBpO+U=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/batch/v2alpha1", "path": "github.com/ericchiang/k8s/apis/batch/v2alpha1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" - }, - { - "checksumSHA1": "9GRVPI+Tf4RrlX2aveUGEUHKIrM=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/certificates/v1alpha1", - "path": "github.com/ericchiang/k8s/apis/certificates/v1alpha1", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "+d8+mSdkdcPWQIpczXDZZW0lrjg=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/certificates/v1beta1", "path": "github.com/ericchiang/k8s/apis/certificates/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "S7AvxmCe/+WoFP/v9lZr0Mv66qg=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/core/v1", "path": "github.com/ericchiang/k8s/apis/core/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "cWPoP6XZN7WMnEVMPcgPgg3Aw9Q=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/extensions/v1beta1", "path": "github.com/ericchiang/k8s/apis/extensions/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "vaNrBPcGWeDd1rXl8+uN08uxWhE=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/imagepolicy/v1alpha1", "path": "github.com/ericchiang/k8s/apis/imagepolicy/v1alpha1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "UNTTH+Ppu4vImnF+bPkG3/NR3gg=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/meta/v1", "path": "github.com/ericchiang/k8s/apis/meta/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" - }, - { - "checksumSHA1": "wYSNb+W2L5gJlGO8n6mGOGft8R8=", - "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/policy/v1alpha1", - "path": "github.com/ericchiang/k8s/apis/policy/v1alpha1", - "revision": "deec4eac0f57b8687dd9d7f81dfaf9978129c961", - "revisionTime": "2018-01-25T21:54:18Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "Mmyg9Wh+FCVR6fV8MGEKRxvqZ2k=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/policy/v1beta1", "path": "github.com/ericchiang/k8s/apis/policy/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "bvwYS/wrBkyAfvCjzMbi/vKamrQ=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/rbac/v1alpha1", "path": "github.com/ericchiang/k8s/apis/rbac/v1alpha1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "m1Tde18NwewnvJoOYL3uykNcBuM=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/rbac/v1beta1", "path": "github.com/ericchiang/k8s/apis/rbac/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "JirJkoeIkWJRNrbprsQvqwisxds=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/resource", "path": "github.com/ericchiang/k8s/apis/resource", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "rQZ69PjEClQQ+PGEHRKzkGVVQyw=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/settings/v1alpha1", "path": "github.com/ericchiang/k8s/apis/settings/v1alpha1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "pp0AetmPoKy7Rz0zNhBwUpExkbc=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/storage/v1", "path": "github.com/ericchiang/k8s/apis/storage/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "WeACcIrS4EkeBm8TTftwuVniaWk=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/storage/v1beta1", "path": "github.com/ericchiang/k8s/apis/storage/v1beta1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "Su6wSR8V8HL2QZsF8icJ0R9AFq8=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/runtime", "path": "github.com/ericchiang/k8s/runtime", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "8ETrRvIaXPfD21N7fa8kdbumL00=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/runtime/schema", "path": "github.com/ericchiang/k8s/runtime/schema", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "cMk3HE8/81ExHuEs0F5sZCclOFs=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/util/intstr", "path": "github.com/ericchiang/k8s/util/intstr", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "fobEKiMk5D7IGvCSwh4HdG1o98c=", "origin": "github.com/elastic/beats/vendor/github.com/ericchiang/k8s/watch/versioned", "path": "github.com/ericchiang/k8s/watch/versioned", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "AANTVr9CVVyzsgviODY6Wi2thuM=", @@ -1378,22 +1353,22 @@ "checksumSHA1": "2UmMbNHc8FBr98mJFN1k8ISOIHk=", "origin": "github.com/elastic/beats/vendor/github.com/garyburd/redigo/internal", "path": "github.com/garyburd/redigo/internal", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "507OiSqTxfGCje7xDT5eq9CCaNQ=", "origin": "github.com/elastic/beats/vendor/github.com/garyburd/redigo/redis", "path": "github.com/garyburd/redigo/redis", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ImX1uv6O09ggFeBPUJJ2nu7MPSA=", "origin": "github.com/elastic/beats/vendor/github.com/ghodss/yaml", "path": "github.com/ghodss/yaml", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "gxV/cPPLkByTdY8y172t7v4qcZA=", @@ -1423,15 +1398,15 @@ "checksumSHA1": "kBeNcaKk56FguvPSUCEaH6AxpRc=", "origin": "github.com/elastic/beats/vendor/github.com/golang/protobuf/proto", "path": "github.com/golang/protobuf/proto", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "p/8vSviYF91gFflhrt5vkyksroo=", "origin": "github.com/elastic/beats/vendor/github.com/golang/snappy", "path": "github.com/golang/snappy", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "d9PxF1XQGLMJZRct2R8qVM/eYlE=", @@ -1455,8 +1430,8 @@ "checksumSHA1": "l9wW52CYGbmO/NGwYZ/Op2QTmaA=", "origin": "github.com/elastic/beats/vendor/github.com/joeshaw/multierror", "path": "github.com/joeshaw/multierror", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "pa+ZwMzIv+u+BlL8Q2xgL9cQtJg=", @@ -1468,29 +1443,29 @@ "checksumSHA1": "KKxbAKrKrfd33YPpkNsDmTN3S+M=", "origin": "github.com/elastic/beats/vendor/github.com/klauspost/compress/flate", "path": "github.com/klauspost/compress/flate", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "+azPXaZpPF14YHRghNAer13ThQU=", "origin": "github.com/elastic/beats/vendor/github.com/klauspost/compress/zlib", "path": "github.com/klauspost/compress/zlib", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "R6zKqn31GjJH1G8W/api7fAW0RU=", "origin": "github.com/elastic/beats/vendor/github.com/klauspost/cpuid", "path": "github.com/klauspost/cpuid", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "BM6ZlNJmtKy3GBoWwg2X55gnZ4A=", "origin": "github.com/elastic/beats/vendor/github.com/klauspost/crc32", "path": "github.com/klauspost/crc32", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "bfGiF5iraNvFHCCK3KVvITsPCok=", @@ -1508,29 +1483,29 @@ "checksumSHA1": "sWdAYPKyaT4SW8hNQNpRS0sU4lU=", "origin": "github.com/elastic/beats/vendor/github.com/mitchellh/hashstructure", "path": "github.com/mitchellh/hashstructure", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "2AyUkWjutec6p+470tgio8mYOxI=", "origin": "github.com/elastic/beats/vendor/github.com/opencontainers/go-digest", "path": "github.com/opencontainers/go-digest", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "eOMCORUm8KxiGSy0hBuQsMsxauo=", "origin": "github.com/elastic/beats/vendor/github.com/opencontainers/image-spec/specs-go", "path": "github.com/opencontainers/image-spec/specs-go", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "9YujSsJjiLGkQMzwWycsjqR340k=", "origin": "github.com/elastic/beats/vendor/github.com/opencontainers/image-spec/specs-go/v1", "path": "github.com/opencontainers/image-spec/specs-go/v1", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "JVGDxPn66bpe6xEiexs1r+y6jF0=", @@ -1542,22 +1517,22 @@ "checksumSHA1": "WmrPO1ovmQ7t7hs9yZGbr2SAoM4=", "origin": "github.com/elastic/beats/vendor/github.com/pierrec/lz4", "path": "github.com/pierrec/lz4", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "IT4sX58d+e8osXHV5U6YCSdB/uE=", "origin": "github.com/elastic/beats/vendor/github.com/pierrec/xxHash/xxHash32", "path": "github.com/pierrec/xxHash/xxHash32", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "PdQm3s8DoVJ17Vk8n7o5iPa7PK0=", "origin": "github.com/elastic/beats/vendor/github.com/pkg/errors", "path": "github.com/pkg/errors", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "LuFv4/jlrmFNnDb/5SCSEPAM9vU=", @@ -1595,8 +1570,8 @@ "checksumSHA1": "KAzbLjI9MzW2tjfcAsK75lVRp6I=", "origin": "github.com/elastic/beats/vendor/github.com/rcrowley/go-metrics", "path": "github.com/rcrowley/go-metrics", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "6JP37UqrI0H80Gpk0Y2P+KXgn5M=", @@ -1626,8 +1601,8 @@ "checksumSHA1": "zmC8/3V4ls53DJlNTKDZwPSC/dA=", "origin": "github.com/elastic/beats/vendor/github.com/satori/go.uuid", "path": "github.com/satori/go.uuid", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "v7C+aJ1D/z3MEeCte6bxvpoGjM4=", @@ -1762,29 +1737,29 @@ "checksumSHA1": "dr5+PfIRzXeN+l1VG+s0lea9qz8=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/context", "path": "golang.org/x/net/context", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "WHc3uByvGaMcnSoI21fhzYgbOgg=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/context/ctxhttp", "path": "golang.org/x/net/context/ctxhttp", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "TWcqN2+KUWtdqnu18rruwn14UEQ=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/http2", "path": "golang.org/x/net/http2", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ezWhc7n/FtqkLDQKeU2JbW+80tE=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/http2/hpack", "path": "golang.org/x/net/http2/hpack", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "RcrB7tgYS/GMW4QrwVdMOTNqIU8=", @@ -1796,8 +1771,8 @@ "checksumSHA1": "3xyuaSNmClqG4YWC7g0isQIbUTc=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/lex/httplex", "path": "golang.org/x/net/lex/httplex", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "whCSspa9pYarl527EuhPz91cbUE=", @@ -1809,22 +1784,22 @@ "checksumSHA1": "QEm/dePZ0lOnyOs+m22KjXfJ/IU=", "origin": "github.com/elastic/beats/vendor/golang.org/x/net/proxy", "path": "golang.org/x/net/proxy", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "CNHEeGnucEUlTHJrLS2kHtfNbws=", "origin": "github.com/elastic/beats/vendor/golang.org/x/sys/unix", "path": "golang.org/x/sys/unix", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "eQq+ZoTWPjyizS9XalhZwfGjQao=", "origin": "github.com/elastic/beats/vendor/golang.org/x/sys/windows", "path": "golang.org/x/sys/windows", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "ZdFZFaXmCgEEaEhVPkyXrnhKhsg=", @@ -1836,15 +1811,15 @@ "checksumSHA1": "VNlkHemg81Ba7ElHfKKUU1h+U1U=", "origin": "github.com/elastic/beats/vendor/golang.org/x/sys/windows/svc", "path": "golang.org/x/sys/windows/svc", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "lZi+t2ilFyYSpqL1ThwNf8ot3WQ=", "origin": "github.com/elastic/beats/vendor/golang.org/x/sys/windows/svc/debug", "path": "golang.org/x/sys/windows/svc/debug", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "uVlUSSKplihZG7N+QJ6fzDZ4Kh8=", @@ -1886,8 +1861,8 @@ "checksumSHA1": "fALlQNY1fM99NesfLJ50KguWsio=", "origin": "github.com/elastic/beats/vendor/gopkg.in/yaml.v2", "path": "gopkg.in/yaml.v2", - "revision": "c4593443ab5943ac5dd3465d88236b0cf417fab6", - "revisionTime": "2018-05-22T10:47:09Z" + "revision": "245b3e1b2ff12449007d6aa01dceee050d40ffa5", + "revisionTime": "2018-06-04T16:14:08Z" }, { "checksumSHA1": "tFDvoOebIC12z/m4GKPqrE7BrUM=",