diff --git a/Makefile b/Makefile index 16320071dfa..6e54d241358 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ PREFIX?=. BEATS_VERSION?=master NOTICE_FILE=NOTICE.txt LICENSE_FILE=LICENSE.txt +NOW=$(shell date -u '+%Y-%m-%dT%H:%M:%S') +GOBUILD_FLAGS=-i -ldflags "-s -X $(BEAT_PATH)/version.buildTime=$(NOW) -X $(BEAT_PATH)/version.commit=$(COMMIT_ID)" # Path to the libbeat Makefile -include $(ES_BEATS)/libbeat/scripts/Makefile diff --git a/NOTICE.txt b/NOTICE.txt index 46a71be5d5e..99aebd399bd 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -182,7 +182,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/elastic/beats Version: master -Revision: d9011ec66e774da31ce70a89901143b013926736 +Revision: aea09e2cda3db5fcaeeeede23f0d1eb8862cb950 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/beats/LICENSE.txt: -------------------------------------------------------------------- diff --git a/_beats/libbeat/scripts/Makefile b/_beats/libbeat/scripts/Makefile index c27bb257e63..24707ed8bd2 100755 --- a/_beats/libbeat/scripts/Makefile +++ b/_beats/libbeat/scripts/Makefile @@ -12,7 +12,7 @@ BEAT_LICENSE?=ASL 2.0 ## @packaging Software license of the application BEAT_VENDOR?=Elastic ## @packaging Name of the vendor of the application BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH})) ES_BEATS?=..## @community_beat Must be set to ./vendor/github.com/elastic/beats. It must always be a relative path. -GOPACKAGES?=$(shell go list ${BEAT_PATH}/... | grep -v /vendor/) +GOPACKAGES?=$(shell go list ${BEAT_PATH}/... | grep -v /vendor/ | grep -v /scripts/cmd/ ) PACKER_TEMPLATES_DIR?=${ES_BEATS}/dev-tools/packer ## @Building Directory of templates that are used by "make package" NOTICE_FILE?=../NOTICE.txt LICENSE_FILE?=../LICENSE.txt @@ -26,6 +26,7 @@ export PATH := ./bin:$(PATH) GOFILES = $(shell find . -type f -name '*.go') GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "*/vendor/*") GOFILES_ALL = $(GOFILES) $(shell find $(ES_BEATS) -type f -name '*.go') +GOPACKAGES_STRESSTESTS=$(shell find . -name '*.go' | xargs awk 'FNR>1 {nextfile} /\+build.*stresstest/ {print FILENAME; nextfile}' | xargs dirname | uniq) SHELL=bash ES_HOST?="elasticsearch" PWD=$(shell pwd) @@ -35,6 +36,7 @@ COVERAGE_TOOL?=${BEAT_GOPATH}/bin/gotestcover COVERAGE_TOOL_REPO?=github.com/elastic/beats/vendor/github.com/pierrre/gotestcover TESTIFY_TOOL_REPO?=github.com/elastic/beats/vendor/github.com/stretchr/testify LIBCOMPOSE_TOOL_REPO?=github.com/docker/libcompose +GOBUILD_FLAGS?=-i GOIMPORTS=goimports GOIMPORTS_REPO?=golang.org/x/tools/cmd/goimports GOIMPORTS_LOCAL_PREFIX?=github.com/elastic @@ -48,6 +50,7 @@ TIMEOUT?= 90 NOSETESTS_OPTIONS?=--process-timeout=$(TIMEOUT) --with-timer -v --with-xunit --xunit-file=${BUILD_DIR}/TEST-system.xml ## @testing the options to pass when calling nosetests TEST_ENVIRONMENT?=false ## @testing if true, "make testsuite" runs integration tests and system tests in a dockerized test environment SYSTEM_TESTS?=false ## @testing if true, "make test" and "make testsuite" run unit tests and system tests +STRESS_TESTS?=false ## @testing if true, "make test" and "make testsuite" run also run the stress tests GOX_OS?=linux darwin windows solaris freebsd netbsd openbsd ## @Building List of all OS to be supported by "make crosscompile". GOX_OSARCH?=!darwin/arm !darwin/arm64 !darwin/386 ## @building Space separated list of GOOS/GOARCH pairs to build by "make crosscompile". GOX_FLAGS?= ## @building Additional flags to append to the gox command used by "make crosscompile". @@ -89,7 +92,7 @@ endif ${BEAT_NAME}: $(GOFILES_ALL) ## @build build the beat application - go build -i + go build $(GOBUILD_FLAGS) # Create test coverage binary ${BEAT_NAME}.test: $(GOFILES_ALL) @@ -113,6 +116,7 @@ check: python-env ## @build Checks project and source code if everything is acco .PHONY: fmt fmt: python-env ## @build Runs `goimports -l -w` and `autopep8`on the project's source code, modifying any files that do not match its style. + @go get $(GOIMPORTS_REPO) @goimports -local ${GOIMPORTS_LOCAL_PREFIX} -l -w ${GOFILES_NOVENDOR} @${FIND} -name *.py -exec ${PYTHON_ENV}/bin/autopep8 --in-place --max-line-length 120 {} \; @@ -193,6 +197,14 @@ fast-system-tests: ## @testing Runs system tests without coverage reports and in fast-system-tests: ${BEAT_NAME}.test python-env . ${PYTHON_ENV}/bin/activate; nosetests -w tests/system ${NOSETESTS_OPTIONS} +# Runs the go based stress tests +.PHONY: stress-tests +stress-tests: ## @testing Runs the stress tests with race detector enabled +stress-tests: + if [ -n '${GOPACKAGES_STRESSTESTS}' ]; then \ + go test -race --tags=stresstest -v ${GOPACKAGES_STRESSTESTS}; \ + fi + # Run benchmark tests .PHONY: benchmark-tests benchmark-tests: ## @testing Runs benchmarks (NOT YET IMPLEMENTED) @@ -219,6 +231,10 @@ python-env: ${ES_BEATS}/libbeat/tests/system/requirements.txt .PHONY: test test: ## @testing Runs unit and system tests without coverage reports test: unit + if [ $(STRESS_TESTS) = true ]; then \ + $(MAKE) stress-tests; \ + fi + if [ $(SYSTEM_TESTS) = true ]; then \ $(MAKE) fast-system-tests; \ fi @@ -228,6 +244,10 @@ testsuite: ## @testing Runs all tests and generates the coverage reports testsuite: clean update $(MAKE) unit-tests + if [ $(STRESS_TESTS) = true ]; then \ + $(MAKE) stress-tests; \ + fi + # Setups environment if TEST_ENVIRONMENT is set to true # Only runs integration tests with test environment if [ $(TEST_ENVIRONMENT) = true ]; then \ diff --git a/_beats/libbeat/scripts/cmd/stress_pipeline/main.go b/_beats/libbeat/scripts/cmd/stress_pipeline/main.go new file mode 100644 index 00000000000..d87df3138d6 --- /dev/null +++ b/_beats/libbeat/scripts/cmd/stress_pipeline/main.go @@ -0,0 +1,89 @@ +// +build !windows + +package main + +import ( + "flag" + "log" + "net/http" + _ "net/http/pprof" + "time" + + "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/libbeat/publisher/pipeline/stress" + "github.com/elastic/beats/libbeat/service" + + // import queue types + _ "github.com/elastic/beats/libbeat/publisher/queue/memqueue" + + // import outputs + _ "github.com/elastic/beats/libbeat/outputs/console" + _ "github.com/elastic/beats/libbeat/outputs/elasticsearch" + _ "github.com/elastic/beats/libbeat/outputs/fileout" + _ "github.com/elastic/beats/libbeat/outputs/logstash" +) + +var ( + duration time.Duration // -duration + overwrites = common.SettingFlag(nil, "E", "Configuration overwrite") +) + +type config struct { + Path paths.Path + Logging logp.Logging +} + +func main() { + if err := run(); err != nil { + log.Fatal(err) + } +} + +func run() error { + info := beat.Info{ + Beat: "stresser", + Version: "0", + Name: "stresser.test", + Hostname: "stresser.test", + } + + flag.DurationVar(&duration, "duration", 0, "Test duration (default 0)") + flag.Parse() + + files := flag.Args() + cfg, err := common.LoadFiles(files...) + if err != nil { + return err + } + + service.BeforeRun() + defer service.Cleanup() + + if err := cfg.Merge(overwrites); err != nil { + return err + } + + config := config{} + if err := cfg.Unpack(&config); err != nil { + return err + } + + if err := paths.InitPaths(&config.Path); err != nil { + return err + } + if err = logp.Init("test", time.Now(), &config.Logging); err != nil { + return err + } + logp.SetStderr() + + return stress.RunTests(info, duration, cfg, nil) +} + +func startHTTP(bind string) { + go func() { + http.ListenAndServe(bind, nil) + }() +} diff --git a/_beats/libbeat/tests/system/beat/beat.py b/_beats/libbeat/tests/system/beat/beat.py index f8ba217e45d..067989f80e3 100644 --- a/_beats/libbeat/tests/system/beat/beat.py +++ b/_beats/libbeat/tests/system/beat/beat.py @@ -207,7 +207,10 @@ def render_config_template(self, template_name=None, kargs["beat"] = self output_str = template.render(**kargs) - with open(os.path.join(self.working_dir, output), "wb") as f: + + output_path = os.path.join(self.working_dir, output) + with open(output_path, "wb") as f: + os.chmod(output_path, 0600) f.write(output_str.encode('utf8')) # Returns output as JSON object with flattened fields (. notation) diff --git a/_beats/script/generate_imports.py b/_beats/script/generate_imports.py index 43a6940f57f..092bb7935ac 100644 --- a/_beats/script/generate_imports.py +++ b/_beats/script/generate_imports.py @@ -1,6 +1,6 @@ import sys from os import listdir, getcwd -from os.path import abspath, isdir, join +from os.path import abspath, isdir, join, dirname, basename from argparse import ArgumentParser sys.path.append(abspath("scripts")) @@ -8,11 +8,10 @@ import_line_format = "\t_ \"{beat_path}/{module}/{name}\"" -include_list_path = "include/list.go" import_template = """/* {comment} */ -package include +package {package} import ( \t// This list is automatically generated by `make imports` @@ -21,17 +20,21 @@ """ -def generate_and_write_to_file(go_beat_path): +def generate_and_write_to_file(outfile, go_beat_path): imported_beat_lines = get_importable_lines(go_beat_path, import_line_format) imported_lines = "\n".join(imported_beat_lines) - list_go = import_template.format(imports=imported_lines, comment=comment) - with open(include_list_path, "w") as output: + package = basename(dirname(outfile)) + list_go = import_template.format(package=package, + comment=comment, + imports=imported_lines) + with open(outfile, "w") as output: output.write(list_go) if __name__ == "__main__": parser = ArgumentParser(description="Generate imports for Beats packages") + parser.add_argument("--out", default="include/list.go") parser.add_argument("beats_path") args = parser.parse_args() - generate_and_write_to_file(args.beats_path) + generate_and_write_to_file(args.out, args.beats_path) diff --git a/_beats/testing/environments/args.yml b/_beats/testing/environments/args.yml index d2355804bf9..e03279e87bf 100644 --- a/_beats/testing/environments/args.yml +++ b/_beats/testing/environments/args.yml @@ -7,4 +7,4 @@ services: args: DOWNLOAD_URL: https://snapshots.elastic.co/downloads ELASTIC_VERSION: 7.0.0-alpha1-SNAPSHOT - CACHE_BUST: 20171108 + CACHE_BUST: 20171201 diff --git a/cmd/root.go b/cmd/root.go index 4e74f9bb4b2..4a904bbd524 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,11 +1,14 @@ package cmd import ( + "fmt" + "github.com/spf13/pflag" "github.com/elastic/apm-server/beater" - - cmd "github.com/elastic/beats/libbeat/cmd" + "github.com/elastic/apm-server/version" + "github.com/elastic/beats/libbeat/cmd" + libbeat "github.com/elastic/beats/libbeat/version" ) // Name of the beat (apm-server). @@ -19,5 +22,6 @@ var RootCmd *cmd.BeatsRootCmd func init() { var runFlags = pflag.NewFlagSet(Name, pflag.ExitOnError) - RootCmd = cmd.GenRootCmdWithIndexPrefixWithRunFlags(Name, IdxPattern, "", beater.New, runFlags) + version := fmt.Sprintf("%s [%s]", libbeat.GetDefaultVersion(), version.String()) + RootCmd = cmd.GenRootCmdWithIndexPrefixWithRunFlags(Name, IdxPattern, version, beater.New, runFlags) } diff --git a/vendor/github.com/elastic/beats/NOTICE.txt b/vendor/github.com/elastic/beats/NOTICE.txt index a021e677828..55b14fc45c2 100644 --- a/vendor/github.com/elastic/beats/NOTICE.txt +++ b/vendor/github.com/elastic/beats/NOTICE.txt @@ -370,8 +370,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/gosigar -Version: v0.5.0 -Revision: 306d51981789ccc65e5f1431d5c0d78d8c368f1b +Version: v0.6.0 +Revision: 5cb8fed1ceb7f0fd69e4ad61c715a80601dddfd2 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/gosigar/LICENSE: -------------------------------------------------------------------- @@ -443,7 +443,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/fsnotify/fsevents -Revision: 3ceee05210c3babaa38cdc9181dabdcc83076a44 +Revision: 690cb784149d5facd7fe613c52757445c43afcde License type (autodetected): BSD-3-Clause ./vendor/github.com/fsnotify/fsevents/LICENSE: -------------------------------------------------------------------- @@ -3491,8 +3491,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/urso/go-structform -Version: v0.0.1 -Revision: a59a4e97c96431f4ad25ed3bd027981f2e0ff5c2 +Version: v0.0.2 +Revision: 844d7d44009e9e8c0f08016fc4dab64e136ca040 License type (autodetected): Apache-2.0 ./vendor/github.com/urso/go-structform/LICENSE: -------------------------------------------------------------------- diff --git a/vendor/github.com/elastic/beats/libbeat/cmd/completion.go b/vendor/github.com/elastic/beats/libbeat/cmd/completion.go index 861aee57634..4f24c5ab3fd 100644 --- a/vendor/github.com/elastic/beats/libbeat/cmd/completion.go +++ b/vendor/github.com/elastic/beats/libbeat/cmd/completion.go @@ -10,7 +10,7 @@ import ( func genCompletionCmd(name, version string, rootCmd *BeatsRootCmd) *cobra.Command { completionCmd := cobra.Command{ Use: "completion SHELL", - Short: "Output shell completion code for the specified shell (bash only by the moment)", + Short: "Output shell completion code for the specified shell (bash and zsh only by the moment)", // We don't want to expose this one in help: Hidden: true, Run: func(cmd *cobra.Command, args []string) { @@ -25,7 +25,7 @@ func genCompletionCmd(name, version string, rootCmd *BeatsRootCmd) *cobra.Comman case "zsh": rootCmd.GenZshCompletion(os.Stdout) default: - fmt.Printf("Unknown shell %s, only bash is available\n", args[0]) + fmt.Printf("Unknown shell %s, only bash and zsh are available\n", args[0]) os.Exit(1) } }, diff --git a/vendor/github.com/elastic/beats/libbeat/cmd/version.go b/vendor/github.com/elastic/beats/libbeat/cmd/version.go index 272e36fb85b..3d9e9438295 100644 --- a/vendor/github.com/elastic/beats/libbeat/cmd/version.go +++ b/vendor/github.com/elastic/beats/libbeat/cmd/version.go @@ -2,12 +2,12 @@ package cmd import ( "fmt" - "os" "runtime" "github.com/spf13/cobra" "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/libbeat/common/cli" "github.com/elastic/beats/libbeat/version" ) @@ -15,15 +15,16 @@ func genVersionCmd(name, beatVersion string) *cobra.Command { return &cobra.Command{ Use: "version", Short: "Show current version info", - Run: func(cmd *cobra.Command, args []string) { - beat, err := instance.NewBeat(name, "", beatVersion) - if err != nil { - fmt.Fprintf(os.Stderr, "Error initializing beat: %s\n", err) - os.Exit(1) - } + Run: cli.RunWith( + func(_ *cobra.Command, args []string) error { + beat, err := instance.NewBeat(name, "", beatVersion) + if err != nil { + return fmt.Errorf("error initializing beat: %s", err) + } - fmt.Printf("%s version %s (%s), libbeat %s\n", - beat.Info.Beat, beat.Info.Version, runtime.GOARCH, version.GetDefaultVersion()) - }, + fmt.Printf("%s version %s (%s), libbeat %s\n", + beat.Info.Beat, beat.Info.Version, runtime.GOARCH, version.GetDefaultVersion()) + return nil + }), } } diff --git a/vendor/github.com/elastic/beats/libbeat/common/cli/cli.go b/vendor/github.com/elastic/beats/libbeat/common/cli/cli.go new file mode 100644 index 00000000000..0bf4650fc85 --- /dev/null +++ b/vendor/github.com/elastic/beats/libbeat/common/cli/cli.go @@ -0,0 +1,20 @@ +package cli + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" +) + +// RunWith wrap cli function with an error handler instead of having the code exit early. +func RunWith( + fn func(cmd *cobra.Command, args []string) error, +) func(cmd *cobra.Command, args []string) { + return func(cmd *cobra.Command, args []string) { + if err := fn(cmd, args); err != nil { + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) + } + } +} diff --git a/vendor/github.com/elastic/beats/libbeat/dashboards/dashboards.go b/vendor/github.com/elastic/beats/libbeat/dashboards/dashboards.go index 18ebffd1e82..d5556c50a5b 100644 --- a/vendor/github.com/elastic/beats/libbeat/dashboards/dashboards.go +++ b/vendor/github.com/elastic/beats/libbeat/dashboards/dashboards.go @@ -46,10 +46,6 @@ func ImportDashboards( kibanaConfig = common.NewConfig() } - if !kibanaConfig.HasField("host") { - // fallback to the beats hostname (localhost) if host is not configured - kibanaConfig.SetString("host", -1, hostname) - } if esConfig.Enabled() { username, _ := esConfig.String("username", -1) password, _ := esConfig.String("password", -1) diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/api.go b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/api.go index 3201764b062..47870230e73 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/api.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/api.go @@ -168,7 +168,18 @@ func (es *Connection) DeletePipeline( // SearchURI executes a search request using a URI by providing request parameters. // Implements: http://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html func (es *Connection) SearchURI(index string, docType string, params map[string]string) (int, *SearchResults, error) { - status, resp, err := es.apiCall("GET", index, docType, "_search", "", params, nil) + return es.SearchURIWithBody(index, docType, params, nil) +} + +// SearchURIWithBody executes a search request using a URI by providing request +// parameters and a request body. +func (es *Connection) SearchURIWithBody( + index string, + docType string, + params map[string]string, + body interface{}, +) (int, *SearchResults, error) { + status, resp, err := es.apiCall("GET", index, docType, "_search", "", params, body) if err != nil { return status, nil, err } diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/testing.go b/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/testing.go deleted file mode 100644 index 092de3ae311..00000000000 --- a/vendor/github.com/elastic/beats/libbeat/outputs/elasticsearch/testing.go +++ /dev/null @@ -1,79 +0,0 @@ -package elasticsearch - -import ( - "math/rand" - "os" - "testing" - "time" - - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outil" -) - -const ( - // ElasticsearchDefaultHost is the default host for elasticsearch. - ElasticsearchDefaultHost = "localhost" - // ElasticsearchDefaultPort is the default port for elasticsearch. - ElasticsearchDefaultPort = "9200" -) - -// GetEsHost returns the elasticsearch host. -func GetEsHost() string { - host := os.Getenv("ES_HOST") - - if len(host) == 0 { - host = ElasticsearchDefaultHost - } - - return host -} - -// GetEsPort returns the elasticsearch port. -func GetEsPort() string { - port := os.Getenv("ES_PORT") - - if len(port) == 0 { - port = ElasticsearchDefaultPort - } - return port -} - -// GetTestingElasticsearch creates a test client. -func GetTestingElasticsearch(t *testing.T) *Client { - var address = "http://" + GetEsHost() + ":" + GetEsPort() - username := os.Getenv("ES_USER") - pass := os.Getenv("ES_PASS") - client := newTestClientAuth(address, username, pass) - - // Load version number - err := client.Connect() - if err != nil { - t.Fatal(err) - } - return client -} - -func newTestClientAuth(url, user, pass string) *Client { - client, err := NewClient(ClientSettings{ - URL: url, - Index: outil.MakeSelector(), - Username: user, - Password: pass, - Timeout: 60 * time.Second, - CompressionLevel: 3, - }, nil) - if err != nil { - panic(err) - } - return client -} - -func randomClient(grp outputs.Group) outputs.NetworkClient { - L := len(grp.Clients) - if L == 0 { - panic("no elasticsearch client") - } - - client := grp.Clients[rand.Intn(L)] - return client.(outputs.NetworkClient) -} diff --git a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/sync.go b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/sync.go index 59affa4aaa6..256e4df6197 100644 --- a/vendor/github.com/elastic/beats/libbeat/outputs/logstash/sync.go +++ b/vendor/github.com/elastic/beats/libbeat/outputs/logstash/sync.go @@ -120,12 +120,12 @@ func (c *syncClient) Publish(batch publisher.Batch) error { } else { n, err = c.publishWindowed(events) } - events = events[n:] - st.Acked(n) debugf("%v events out of %v events sent to logstash host %s. Continue sending", n, len(events), c.Host()) + events = events[n:] + st.Acked(n) if err != nil { // return batch to pipeline before reporting/counting error batch.RetryEvents(events) diff --git a/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/pipeline.go b/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/pipeline.go index c6cb740a60d..7ac0ba46f5c 100644 --- a/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/pipeline.go +++ b/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/pipeline.go @@ -68,7 +68,8 @@ type pipelineProcessors struct { processors beat.Processor - disabled bool // disabled is set if outputs have been disabled via CLI + disabled bool // disabled is set if outputs have been disabled via CLI + alwaysCopy bool } // Settings is used to pass additional settings to a newly created pipeline instance. @@ -304,8 +305,7 @@ func (p *Pipeline) ConnectWith(cfg beat.ClientConfig) (beat.Client, error) { } } - processors := p.newProcessorPipeline(cfg) - + processors := newProcessorPipeline(p.beatInfo, p.processors, cfg) acker := p.makeACKer(processors != nil, &cfg, waitClose) producerCfg := queue.ProducerConfig{ // Cancel events from queue if acker is configured diff --git a/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/processor.go b/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/processor.go index acf467cced6..26925f2af4f 100644 --- a/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/processor.go +++ b/vendor/github.com/elastic/beats/libbeat/publisher/pipeline/processor.go @@ -39,7 +39,9 @@ type processorFn struct { // 8. (P) pipeline processors list // 9. (P) (if publish/debug enabled) log event // 10. (P) (if output disabled) dropEvent -func (p *Pipeline) newProcessorPipeline( +func newProcessorPipeline( + info beat.Info, + global pipelineProcessors, config beat.ClientConfig, ) beat.Processor { var ( @@ -49,12 +51,9 @@ func (p *Pipeline) newProcessorPipeline( // client fields and metadata clientMeta = config.Meta localProcessors = makeClientProcessors(config) - - // pipeline global - global = p.processors ) - needsCopy := localProcessors != nil || global.processors != nil + needsCopy := global.alwaysCopy || localProcessors != nil || global.processors != nil // setup 1: generalize/normalize output (P) processors.add(generalizeProcessor) @@ -74,10 +73,11 @@ func (p *Pipeline) newProcessorPipeline( // setup 3, 4, 5: client config fields + pipeline fields + client fields + dyn metadata fields := config.Fields.Clone() - fields.DeepUpdate(global.fields) + fields.DeepUpdate(global.fields.Clone()) if em := config.EventMetadata; len(em.Fields) > 0 { common.MergeFields(fields, em.Fields.Clone(), em.FieldsUnderRoot) } + if len(fields) > 0 { processors.add(makeAddFieldsProcessor("fields", fields, needsCopy)) } @@ -99,7 +99,7 @@ func (p *Pipeline) newProcessorPipeline( // setup 9: debug print final event (P) if logp.IsDebug("publish") { - processors.add(debugPrintProcessor(p.beatInfo)) + processors.add(debugPrintProcessor(info)) } // setup 10: drop all events if outputs are disabled (P) diff --git a/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go b/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go index 24df8a2e24a..e18f561d4ae 100644 --- a/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go +++ b/vendor/github.com/elastic/beats/libbeat/setup/kibana/config.go @@ -19,7 +19,7 @@ type kibanaConfig struct { var ( defaultKibanaConfig = kibanaConfig{ Protocol: "http", - Host: "", + Host: "localhost:5601", Path: "", Username: "", Password: "", diff --git a/vendor/vendor.json b/vendor/vendor.json index afe3d3572a4..5f924d04ecc 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -245,208 +245,216 @@ { "checksumSHA1": "Cqf46jG1S/Ps+nCyNjkFRnujAVU=", "path": "github.com/elastic/beats/libbeat/api", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "HCHU63csurwOSysZfsTf5RgpSGE=", "path": "github.com/elastic/beats/libbeat/autodiscover", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "mvMbWi8jMCS5ZDCiWv+GkUzsmEw=", "path": "github.com/elastic/beats/libbeat/autodiscover/meta", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "Gp/+KwhRYSZxVYYNObuLFHJSn9s=", "path": "github.com/elastic/beats/libbeat/autodiscover/providers/docker", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "2sZQ2RjQpeYI5l615G+W3ODSVRk=", "path": "github.com/elastic/beats/libbeat/autodiscover/template", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "luRQJL+y5FS+nevmNTp/hOtqrVc=", "path": "github.com/elastic/beats/libbeat/beat", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "xk8rkIPmXFqMpKdow17KuNHsZbM=", "path": "github.com/elastic/beats/libbeat/cfgfile", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "kcJBPeHVyLhstApfy7Smi6fcxrg=", "path": "github.com/elastic/beats/libbeat/cloudid", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "NxHduvPmpjQ23nlK7+Ad9sF8eDc=", + "checksumSHA1": "MUgvvXt481aKOKo1ivhfqsXJLtg=", "path": "github.com/elastic/beats/libbeat/cmd", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "Xth9R/CXlzywVI2WVsXsG3zP7mw=", "path": "github.com/elastic/beats/libbeat/cmd/export", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "ahDZ746Q/OMpvdgPmNCJ1RUfUIw=", "path": "github.com/elastic/beats/libbeat/cmd/instance", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "hnrALZ/owH5lcue6u3G9p0/K4ag=", "path": "github.com/elastic/beats/libbeat/cmd/test", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "+sexHPZxbYktSWzdPEddVrs/HSk=", "path": "github.com/elastic/beats/libbeat/common", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "SS/yBENBeoNVCAu+TQcDylo4CPg=", "path": "github.com/elastic/beats/libbeat/common/atomic", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "I5ABLC2bPeiBbL2fKqLsQNe4DSQ=", "path": "github.com/elastic/beats/libbeat/common/bus", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "kbrbRXK+vEBW+gBucQX1gmn07nE=", "path": "github.com/elastic/beats/libbeat/common/cfgwarn", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", + "version": "master", + "versionExact": "master" + }, + { + "checksumSHA1": "pcyIn2gzdvx6y3Icc8N9ij2FRAU=", + "path": "github.com/elastic/beats/libbeat/common/cli", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "gGB9FaK8K+1w4kD0HsF1OpnN9eM=", "path": "github.com/elastic/beats/libbeat/common/docker", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "7bGcM14M5R8BuQLqKdWfbbQaKEM=", "path": "github.com/elastic/beats/libbeat/common/dtfmt", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "3GxLcVX/OFwXDi0VJNnJrafkq8A=", "path": "github.com/elastic/beats/libbeat/common/file", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "7WSOY58klc0crUF/5UZx/pLFIR0=", "path": "github.com/elastic/beats/libbeat/common/fmtstr", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "pdFJ+DF0STunSGRopAMwn9n9ZlY=", "path": "github.com/elastic/beats/libbeat/common/jsontransform", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "43jcD3PFE0qBsP40iA4kb/g94MU=", "path": "github.com/elastic/beats/libbeat/common/match", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "8exGjSEBI+fSKXMHdWI2e2lX5D0=", "path": "github.com/elastic/beats/libbeat/common/schema", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "WmqoD6kF9VraYUmjXacgWSHd2v4=", "path": "github.com/elastic/beats/libbeat/common/schema/mapstriface", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "zi4xMJ43/IzPCPNXs8iBc0WI2sE=", "path": "github.com/elastic/beats/libbeat/common/streambuf", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "L57xFYHwF9nI6SHr8WOgCk7Aa/o=", + "checksumSHA1": "H2gEW0UJF9+X5WvG6N8b3dBoV2Q=", "path": "github.com/elastic/beats/libbeat/dashboards", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, @@ -461,80 +469,80 @@ { "checksumSHA1": "qr5L7wYi9UcKO0ZPX7P6vxE1Vs0=", "path": "github.com/elastic/beats/libbeat/kibana/", - "revision": "75a1fc823c78fb89da98675c64ac303179dcf07e", - "revisionTime": "2017-11-30T11:08:11Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "CGZzbnj5fq3JaTjcF4jMGGLe2Mc=", "path": "github.com/elastic/beats/libbeat/logp", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "kZBPfX0Pv2dLMP5Iho9Mx/hXz9o=", "path": "github.com/elastic/beats/libbeat/monitoring", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "tRfILb+3nS9S5xf1GTqyGVbvGnU=", "path": "github.com/elastic/beats/libbeat/monitoring/adapter", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "9OgsegLCw7fQSbzm92h5SSLJSqo=", "path": "github.com/elastic/beats/libbeat/monitoring/report", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "lCt/bTo3Sn1qieuMCvpJyBnZMCc=", "path": "github.com/elastic/beats/libbeat/monitoring/report/elasticsearch", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "YbYccZJmreAs8GUQcptnoU0M+jc=", "path": "github.com/elastic/beats/libbeat/outputs", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "/g/IAXGizefK4Zw3Zw11f1Gw5Gw=", "path": "github.com/elastic/beats/libbeat/outputs/codec", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "vjVLDyWbKmCR6e2OayNshujneSI=", "path": "github.com/elastic/beats/libbeat/outputs/codec/format", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "j57gNFrdsjPGmF7AHx3dHdvB7qE=", "path": "github.com/elastic/beats/libbeat/outputs/codec/json", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, @@ -553,40 +561,40 @@ { "checksumSHA1": "JGP5bMcL1KyJRJCR1kW11gZhPhk=", "path": "github.com/elastic/beats/libbeat/outputs/console", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "neqGWutHye4LUObhXDfF7cTkjwA=", + "checksumSHA1": "V7XkkOHUobZcUE8ksPuTBlqychU=", "path": "github.com/elastic/beats/libbeat/outputs/elasticsearch", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "04/TropavM6jQFC5thTTUZgWMt0=", "path": "github.com/elastic/beats/libbeat/outputs/fileout", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "iI6dpKLMOnY+0KdVizQhgSlKq0M=", "path": "github.com/elastic/beats/libbeat/outputs/kafka", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "oy+0N33zlEZ4cYxz78fPpDEfAW0=", + "checksumSHA1": "RPhhTdxmvJ0U1CRvd5J5qizJ5B4=", "path": "github.com/elastic/beats/libbeat/outputs/logstash", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, @@ -617,88 +625,88 @@ { "checksumSHA1": "UEGH5mAXdKBysIjODuTxHKlzqsY=", "path": "github.com/elastic/beats/libbeat/outputs/outil", - "revision": "75a1fc823c78fb89da98675c64ac303179dcf07e", - "revisionTime": "2017-11-30T11:08:11Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "j11eTg831Fs7uxEz2dRA/DJmKoU=", "path": "github.com/elastic/beats/libbeat/outputs/redis", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "N8FWsJ68uJ5Haxc5vp8eS2Cp8jw=", "path": "github.com/elastic/beats/libbeat/outputs/transport", - "revision": "75a1fc823c78fb89da98675c64ac303179dcf07e", - "revisionTime": "2017-11-30T11:08:11Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "d5b9Ra0zcwznwemxEJmyW28FZJ0=", "path": "github.com/elastic/beats/libbeat/paths", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "2ef0H1yIcmjczaj6LsUc17/ss6I=", "path": "github.com/elastic/beats/libbeat/plugin", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "gGNyFGQLyg9NpEQnoy7Pyat76NA=", "path": "github.com/elastic/beats/libbeat/processors", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "JBWiLNZylmEHFiAbNXJAYa9D8fw=", "path": "github.com/elastic/beats/libbeat/processors/actions", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "rI+RcxALfhqftyApiHM1AgSjQ8U=", "path": "github.com/elastic/beats/libbeat/processors/add_cloud_metadata", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "vC/SJKQSddfAUhG9ncnxEEQIbq4=", "path": "github.com/elastic/beats/libbeat/processors/add_docker_metadata", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "VW1NcowJ0p3dtZvCLSjjkAorCBs=", "path": "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "UCfWJFoOVRzY1nQ+mAHT+mpGYv4=", "path": "github.com/elastic/beats/libbeat/processors/add_locale", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, @@ -711,8 +719,8 @@ { "checksumSHA1": "3kyV9PwlSwcLnK9SWKX97Gh7c00=", "path": "github.com/elastic/beats/libbeat/publisher", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, @@ -751,72 +759,72 @@ { "checksumSHA1": "btf3XhwPROVy4JtECpH0eL3nGwg=", "path": "github.com/elastic/beats/libbeat/publisher/includes", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "LcjqdJ6HhRdEUfqriAMMQbeVSqs=", + "checksumSHA1": "J1g7eS5I+dBAo2TAJTmDVOamZeo=", "path": "github.com/elastic/beats/libbeat/publisher/pipeline", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "k/1pxNUislJBfsjb/yZVG7+YP28=", "path": "github.com/elastic/beats/libbeat/publisher/queue", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "dRlFNTjIKtVHBmkyTOiOhWxCWws=", "path": "github.com/elastic/beats/libbeat/publisher/queue/memqueue", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "kT9MLdbYAKYJ0lWfjqX8fbrZTiY=", "path": "github.com/elastic/beats/libbeat/service", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "h28LQ4I1AWvlPNhNIaBjpki/cxs=", + "checksumSHA1": "semQzHqIR5CoJmXvPQmjtZnwwkA=", "path": "github.com/elastic/beats/libbeat/setup/kibana", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "BVrLP+2Vd0A3dhTfKTMIEvdVg4Q=", "path": "github.com/elastic/beats/libbeat/template", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "p+um0Jv/tT4q7+rCQS7dxq50Ws0=", "path": "github.com/elastic/beats/libbeat/testing", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "HviBA/yN/8aYDJSnP7lk004sbM0=", "path": "github.com/elastic/beats/libbeat/version", - "revision": "d9011ec66e774da31ce70a89901143b013926736", - "revisionTime": "2017-11-30T11:04:25Z", + "revision": "aea09e2cda3db5fcaeeeede23f0d1eb8862cb950", + "revisionTime": "2017-12-13T21:32:04Z", "version": "master", "versionExact": "master" }, diff --git a/version/version.go b/version/version.go new file mode 100644 index 00000000000..dddfa7e8cac --- /dev/null +++ b/version/version.go @@ -0,0 +1,12 @@ +package version + +import "fmt" + +var ( + buildTime = "unknown" + commit = "unknown" +) + +func String() string { + return fmt.Sprintf("%s built %s", commit, buildTime) +}