Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
c7b7b2b
Moved agent into beats repo (#14163)
michalpristas Oct 25, 2019
56ffef0
ca cannot be shorthand (#14366)
michalpristas Nov 1, 2019
20cfcdd
revisiting sample configuration and bringin it up to date (#14367)
michalpristas Nov 1, 2019
4389042
Agent: updated transpile rules for metricbeat (#14403)
michalpristas Nov 11, 2019
565c4ad
Moved agent into beats repo (#14163)
michalpristas Oct 25, 2019
471be1d
ca cannot be shorthand (#14366)
michalpristas Nov 1, 2019
073aa0b
revisiting sample configuration and bringin it up to date (#14367)
michalpristas Nov 1, 2019
9c124fc
Agent: updated transpile rules for metricbeat (#14403)
michalpristas Nov 11, 2019
c8c8c24
conflicts resolved
michalpristas Nov 25, 2019
e2ac4ab
merged conflicts
michalpristas Nov 25, 2019
441bde5
Refactor: Rename pipeline into stream (#14593)
ph Nov 26, 2019
ce8bff4
Merge branch 'master' into fleet
michalpristas Dec 2, 2019
b85351b
Change from Enrollment token to use Elasticsearch API key (#14869)
ph Dec 2, 2019
5d49777
Change the Authentication mechanism for fleet. (#14867)
ph Dec 2, 2019
b17619f
Agent add support for multiples outputs (#14830)
ph Dec 3, 2019
fa0d309
add delta wait to ensure bucket ticked (#14932)
michalpristas Dec 4, 2019
bdf28d9
Add required API calls to retrieve configuration from Fleet. (#14871)
ph Dec 4, 2019
1bc5895
[Fleet] Enable log introspections (#14390)
michalpristas Dec 5, 2019
aef8334
Fakewebapi simulare a Fleet API endpoint for testing the checkin (#14…
ph Dec 5, 2019
a379823
resolved conflicts with master
michalpristas Dec 10, 2019
1743bbc
[Agent] Grpc support for agent to beat communication (#14835)
michalpristas Dec 11, 2019
9394639
Store access token missing (#15089)
ph Dec 16, 2019
38591b9
Update ecslog to fix an infinite loop (#15142)
ph Dec 17, 2019
73fc672
Update notice (#15189)
ph Dec 18, 2019
4b479d2
The MapVisitor didn't handle correctly Uint and Uin64 (#15187)
ph Dec 18, 2019
0b978c7
[Agent] Make default config congestable by agent (#15191)
michalpristas Dec 18, 2019
f307368
[Agent] Include beats in agent package (#15046)
michalpristas Dec 18, 2019
06a7a0f
Allow the Agent to retrieve configuration from the Fleet API. (#15027)
ph Dec 18, 2019
e25649f
[Agent] Agent UUID step 1 (#15144)
michalpristas Dec 19, 2019
7104867
[Agent] Parse and pass correct configuration sections into correspond…
michalpristas Dec 19, 2019
7a26160
Agent/fix api fleet issues (#15228)
ph Dec 20, 2019
992ef0c
[Agent] Workaround the API format returned by Fleet. (#15244)
ph Dec 20, 2019
c863b03
[Agent] Cleanup yaml and remove OS and Arch (#15267)
michalpristas Dec 31, 2019
e91114b
[Agent] Persist UUID (#15243)
michalpristas Dec 31, 2019
358dab5
[Agent] refactor reporter (#15237)
michalpristas Jan 2, 2020
372b905
[Agent] Fix flaky tests concerning the TockenBucket (#15282)
ph Jan 2, 2020
792b5b0
[Agent] Onboard custom errors package - part 2 (#15294)
michalpristas Jan 2, 2020
6ff0e87
conflicts on master
michalpristas Jan 3, 2020
9539116
Scheduler now add some jitter when waiting on Tick. (#15325)
ph Jan 6, 2020
aeaae85
Enroll delay (#15327)
ph Jan 6, 2020
af4a428
[Agent] Onboard to custom errors type (#15340)
michalpristas Jan 6, 2020
13b34a0
Retries on error when communicating with Fleet (#15309)
ph Jan 7, 2020
a1f7e85
StateResolve fix issues with should state and current State (#15299)
ph Jan 7, 2020
31e9bfb
[Agent] Combine spec with translation rules together with app info sp…
michalpristas Jan 8, 2020
2c80800
[Agent] ACK action events on a handler level (#15352)
michalpristas Jan 9, 2020
a1b2547
Fix the tick than wait strategy for the PeriodicJitter (#15393)
ph Jan 9, 2020
bfe43ff
Increase polling frequency to provide quicker feedback (#15406)
ph Jan 9, 2020
f292179
fixed casing in spec and binary path resolution (#15410)
michalpristas Jan 10, 2020
604a42f
Keep only Filebeat and Metricbeat enabled (#15390)
ph Jan 10, 2020
8242a93
[Agent] Ignore not supported applications on operator level (#15408)
michalpristas Jan 13, 2020
a4be561
[Agent] Send hostname when enrolling (#15496)
michalpristas Jan 13, 2020
0691879
[Agent] Batch ACKs together (#15413)
michalpristas Jan 13, 2020
520da69
[Agent] Remove workaround outpout url returned by Fleet (#15398)
nchaulet Jan 13, 2020
4e04894
[Agent] Fleet auth round tripper nil ptr (#15472)
ph Jan 13, 2020
b30f3a4
Scheduler close ordering (#15481)
ph Jan 13, 2020
c53d18e
[Agent] Send meta with every checkin request (#15499)
michalpristas Jan 13, 2020
a9a71ca
Disable ILM setup and template setup (#15468)
ph Jan 13, 2020
42507a2
[Agent] Fix panic on backoff Retry (#15533)
michalpristas Jan 14, 2020
dfa954a
When the Agent received no streams in the configuration we should sto…
ph Jan 14, 2020
b0dd953
Make sure the xpack fleet is enabled (#15578)
ph Jan 15, 2020
b4622dd
[Agent] Small fixes from local testing (#15573)
michalpristas Jan 16, 2020
5396c6d
[Agent] Fix empty policy handler (#15626)
michalpristas Jan 20, 2020
87b725b
[Agent] Incorporate new ACK endpoint (#15454)
michalpristas Jan 20, 2020
7675097
interrupt on stop (#15673)
michalpristas Jan 20, 2020
7857d48
[Agent] Enable usage of path variables in configuration (#15576)
michalpristas Jan 20, 2020
fce54f7
Persist the last good ActionPolicyChange on disk (#15641)
ph Jan 20, 2020
6ec6288
[Agent] Re-introduce STOPPING event subtype (#15672)
michalpristas Jan 21, 2020
e562629
[Agent] Rule extracting items from array (#15809)
michalpristas Jan 28, 2020
71bab46
resolved conflicts
michalpristas Jan 29, 2020
47c43a9
[Agent] Wait for GRPC on start (#15954)
michalpristas Feb 3, 2020
9886329
Merge branch 'master' into fleet
ph Feb 10, 2020
93a6f77
Agent Configuration examples (#15940)
ph Feb 11, 2020
888beee
Metricbeat fix imports in magefile (#16214)
michalpristas Feb 12, 2020
662d0b4
Agent configuration tweaks (#16240)
ph Feb 12, 2020
02c6156
Agent/ca sha256 (#16217)
ph Feb 12, 2020
6f27724
Ensure Kibana version is checked (#16258)
ph Feb 12, 2020
c975340
[Agent] Using context propagated to (#16020)
michalpristas Feb 13, 2020
32b4ef7
Migration of Fleet -> ingest_manager affect the API paths (#16314)
ph Feb 13, 2020
e0b3e9c
Merge branch 'master' of github.com:elastic/beats into feature-ingest
ph Feb 17, 2020
368af58
Merge pull request #16375 from ph/agent-merges/feb17
ph Feb 18, 2020
77f5f68
Make spec_test idempotent (#16392)
ph Feb 24, 2020
caff56c
Merge remote-tracking branch 'origin' into feature-ingest
ph Feb 24, 2020
112d2d6
Merge remote-tracking branch 'origin/feature-ingest' into feature-ingest
ph Feb 24, 2020
3ef7ccb
Example of a Suricata datasource configuration (#16496)
ph Feb 25, 2020
1ca0933
Move release package and custom kibana where it is used the most. (#1…
ph Feb 25, 2020
be23233
Merge remote-tracking branch 'origin/feature-ingest' into feature-ingest
ph Feb 25, 2020
f6d0d9f
Move specific gitignore into agent directory (#16607)
ph Feb 26, 2020
3bb0545
Guard against double slashes (#16559)
ph Feb 26, 2020
657451b
Merge remote-tracking branch 'origin/feature-ingest' into merge-agent…
ph Feb 26, 2020
9b5d675
[Agent] Include agentID in event payload (#16327)
michalpristas Mar 2, 2020
bc9c170
Merge remote-tracking branch 'origin/feature-ingest' into merge-agent…
ph Mar 2, 2020
3c1bd80
Merge remote-tracking branch 'origin/master' into merge-agent-in-master
ph Mar 2, 2020
1e32eb3
Conflicts
ph Mar 2, 2020
9ab83df
Fixit
ph Mar 2, 2020
d662fbc
Merge remote-tracking branch 'origin/master' into merge-agent-in-master
ph Mar 3, 2020
404cf03
use go modules
ph Mar 3, 2020
589bb21
Migrating to modules
ph Mar 3, 2020
6127f41
Fix for go modules
ph Mar 3, 2020
f27903e
match magetools
ph Mar 3, 2020
49df8aa
Align deps
ph Mar 3, 2020
773e8d1
What?
ph Mar 3, 2020
563df87
Why it is removed?
ph Mar 3, 2020
8ab4c79
Will need another pair of eye on this problem
ph Mar 3, 2020
b8ec22b
Disable suite followup in https://github.com/elastic/beats/issues/16771
ph Mar 3, 2020
38a913d
mage vendor
ph Mar 3, 2020
388c906
tag v0.0.1 for ecslog
ph Mar 4, 2020
5887bdd
notice
ph Mar 4, 2020
84ee7cf
Fix windows build
ph Mar 5, 2020
f2bf6aa
Merge remote-tracking branch 'origin/master' into merge-agent-in-master
ph Mar 5, 2020
8538f4d
package has been moved..
ph Mar 5, 2020
05d37e0
Merge remote-tracking branch 'origin/master' into merge-agent-in-master
ph Mar 5, 2020
b9a239c
Fixing windows tests #1
ph Mar 5, 2020
462f2c6
Fix and skipped more tests
ph Mar 5, 2020
309365c
More skip on windows
ph Mar 5, 2020
4609c06
placeholder for windows. system test.
ph Mar 6, 2020
7baf137
Fixit.
ph Mar 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ jobs:
go: $TRAVIS_GO_VERSION
stage: test

# Agent
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have this also in our jenkins build?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- os: linux
env: TARGETS="-C x-pack/agent testsuite"
go: $TRAVIS_GO_VERSION
stage: test
- os: osx
env: TARGETS="TEST_ENVIRONMENT=0 -C x-pack/agent testsuite"
go: $TRAVIS_GO_VERSION
stage: test

# Generators
- os: linux
env: TARGETS="-C generator/_templates/metricbeat test test-package"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BUILD_DIR=$(CURDIR)/build
COVERAGE_DIR=$(BUILD_DIR)/coverage
BEATS?=auditbeat filebeat heartbeat journalbeat metricbeat packetbeat winlogbeat x-pack/functionbeat
BEATS?=auditbeat filebeat heartbeat journalbeat metricbeat packetbeat winlogbeat x-pack/functionbeat x-pack/agent
PROJECTS=libbeat $(BEATS)
PROJECTS_ENV=libbeat filebeat metricbeat
PYTHON_ENV?=$(BUILD_DIR)/python-env
Expand Down
1,114 changes: 969 additions & 145 deletions NOTICE.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions filebeat/filebeat.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"BinaryPath":"filebeat","Args":["-e"],"Configurable":"grpc"}
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require (
github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc
github.com/akavel/rsrc v0.8.0 // indirect
github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43
github.com/antlr/antlr4 v0.0.0-20200225173536-225249fdaef5
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/aws/aws-lambda-go v1.6.0
github.com/aws/aws-sdk-go-v2 v0.9.0
Expand Down Expand Up @@ -82,12 +83,14 @@ require (
github.com/golang/protobuf v1.3.2
github.com/golang/snappy v0.0.1
github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9
github.com/google/go-cmp v0.4.0
github.com/google/gopacket v1.1.18-0.20191009163724-0ad7f2610e34
github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f // indirect
github.com/googleapis/gnostic v0.3.1-0.20190624222214-25d8b0b66985 // indirect
github.com/gorhill/cronexpr v0.0.0-20161205141322-d520615e531a
github.com/gorilla/mux v1.7.2 // indirect
github.com/gorilla/websocket v1.4.1 // indirect
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874
github.com/hashicorp/golang-lru v0.5.2-0.20190520140433-59383c442f7d // indirect
github.com/insomniacslk/dhcp v0.0.0-20180716145214-633285ba52b2
github.com/jcmturner/gofork v1.0.0 // indirect
Expand All @@ -110,6 +113,7 @@ require (
github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51
github.com/mitchellh/mapstructure v1.1.2
github.com/morikuni/aec v1.0.0 // indirect
github.com/oklog/ulid v1.3.1
github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483 // indirect
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect
github.com/pierrre/gotestcover v0.0.0-20160113212533-7b94f124d338
Expand All @@ -127,11 +131,10 @@ require (
github.com/shirou/gopsutil v2.19.11+incompatible
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/stretchr/objx v0.1.2-0.20180702103455-b8b73a35e983 // indirect
github.com/stretchr/testify v1.4.0
github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b
github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a
github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b // indirect
Copy link
Copy Markdown
Contributor Author

@ph ph Mar 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kvch I will need your help on theses two dependencies (objx, magetools), I can't explain why they get removed.
I've tested with the master brancher and I do not have this issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as recommended by @urso I've ran mage vendor

github.com/urso/ecslog v0.0.1
github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 // indirect
Expand All @@ -149,10 +152,11 @@ require (
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4
google.golang.org/api v0.15.0
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb
google.golang.org/grpc v1.27.1
gopkg.in/inf.v0 v0.9.0
gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect
gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528
gopkg.in/yaml.v2 v2.2.7
gopkg.in/yaml.v2 v2.2.8
howett.net/plist v0.0.0-20181124034731-591f970eefbb
k8s.io/api v0.0.0-20190722141453-b90922c02518
k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8
Expand Down
51 changes: 47 additions & 4 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libbeat/cmd/instance/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (b *Beat) configure(settings Settings) error {
logp.Info("Beat ID: %v", b.Info.ID)

// initialize config manager
b.ConfigManager, err = management.Factory()(b.Config.Management, reload.Register, b.Beat.Info.ID)
b.ConfigManager, err = management.Factory(b.Config.Management)(b.Config.Management, reload.Register, b.Beat.Info.ID)
if err != nil {
return err
}
Expand Down
25 changes: 21 additions & 4 deletions libbeat/management/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ var Namespace = "libbeat.management"
// DebugK used as key for all things central management
var DebugK = "centralmgmt"

var centralMgmtKey = "x-pack-cm"

// ConfigManager interacts with the beat to update configurations
// from an external source
type ConfigManager interface {
Expand All @@ -47,32 +49,47 @@ type ConfigManager interface {
CheckRawConfig(cfg *common.Config) error
}

// PluginFunc for creating FactoryFunc if it matches a config
type PluginFunc func(*common.Config) FactoryFunc

// FactoryFunc for creating a config manager
type FactoryFunc func(*common.Config, *reload.Registry, uuid.UUID) (ConfigManager, error)

// Register a config manager
func Register(name string, fn FactoryFunc, stability feature.Stability) {
func Register(name string, fn PluginFunc, stability feature.Stability) {
f := feature.New(Namespace, name, fn, feature.MakeDetails(name, "", stability))
feature.MustRegister(f)
}

// Factory retrieves config manager constructor. If no one is registered
// it will create a nil manager
func Factory() FactoryFunc {
func Factory(cfg *common.Config) FactoryFunc {
factories, err := feature.GlobalRegistry().LookupAll(Namespace)
if err != nil {
return nilFactory
}

for _, f := range factories {
if factory, ok := f.Factory().(FactoryFunc); ok {
return factory
if plugin, ok := f.Factory().(PluginFunc); ok {
if factory := plugin(cfg); factory != nil {
return factory
}
}
}

return nilFactory
}

type modeConfig struct {
Mode string `config:"mode" yaml:"mode"`
}

func defaultModeConfig() *modeConfig {
return &modeConfig{
Mode: centralMgmtKey,
}
}

// nilManager, fallback when no manager is present
type nilManager struct{}

Expand Down
52 changes: 52 additions & 0 deletions vendor/github.com/antlr/antlr4/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading