Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vjsamuel committed Jan 9, 2020
1 parent f5fe8be commit feeff7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
13 changes: 13 additions & 0 deletions libbeat/docs/shared-autodiscover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ running configuration for a container, 60s by default.
either take `node` or `cluster` as values. `node` scope allows discovery of resources in
the specified node. `cluster` scope allows cluster wide discovery. Only `pod` and `node` resources
can be discovered at node scope.
`add_resource_metadata`:: (Optional) Specify resources against which additional enrichment needs to be done one.
`add_resource_metadata` can be done for `node` or `namespace`. Example:

["source","yaml",subs="attributes"]
-------------------------------------------------------------------------------------
add_resource_metadata:
namespace:
enabled: true
include_labels: ["namespacelabel1"]
node:
enabled: true
include_labels: ["nodelabel2"]
-------------------------------------------------------------------------------------


include::../../{beatname_lc}/docs/autodiscover-kubernetes-config.asciidoc[]
Expand Down
16 changes: 4 additions & 12 deletions libbeat/processors/add_kubernetes_metadata/indexers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ func TestPodIndexer(t *testing.T) {
"labelkey": "labelvalue",
},
},
"namespace": common.MapStr{
"name": "testns",
},
"namespace": "testns",
"node": common.MapStr{
"name": "testnode",
},
Expand Down Expand Up @@ -123,9 +121,7 @@ func TestPodUIDIndexer(t *testing.T) {
"labelkey": "labelvalue",
},
},
"namespace": common.MapStr{
"name": "testns",
},
"namespace": "testns",
"node": common.MapStr{
"name": "testnode",
},
Expand Down Expand Up @@ -181,9 +177,7 @@ func TestContainerIndexer(t *testing.T) {
"labelkey": "labelvalue",
},
},
"namespace": common.MapStr{
"name": "testns",
},
"namespace": "testns",
"node": common.MapStr{
"name": "testnode",
},
Expand Down Expand Up @@ -402,9 +396,7 @@ func TestIpPortIndexer(t *testing.T) {
"labelkey": "labelvalue",
},
},
"namespace": common.MapStr{
"name": "testns",
},
"namespace": "testns",
"node": common.MapStr{
"name": "testnode",
},
Expand Down

0 comments on commit feeff7f

Please sign in to comment.