-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Filebeat supports templates for both prospectors and modules. | ||
|
||
["source","yaml",subs="attributes"] | ||
------------------------------------------------------------------------------------- | ||
filebeat.autodiscover: | ||
providers: | ||
- type: kubernetes | ||
templates: | ||
- condition: | ||
equals: | ||
kubernetes.namespace: kube-system | ||
config: | ||
- type: docker | ||
containers.ids: | ||
- "${data.docker.container.id}" | ||
exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines | ||
------------------------------------------------------------------------------------- | ||
This configuration launches a `docker` logs prospector for all containers of pods running in the Kubernetes namespace | ||
`kube-system`. | ||
If you are using modules, you can override the default prospector and use the docker prospector instead. | ||
["source","yaml",subs="attributes"] | ||
------------------------------------------------------------------------------------- | ||
filebeat.autodiscover: | ||
providers: | ||
- type: kubernetes | ||
templates: | ||
- condition: | ||
equals: | ||
kubernetes.container.image: "redis" | ||
config: | ||
- module: redis | ||
log: | ||
prospector: | ||
type: docker | ||
containers.ids: | ||
- "${data.docker.container.id}" | ||
------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Metricbeat supports templates for modules: | ||
|
||
["source","yaml",subs="attributes"] | ||
------------------------------------------------------------------------------------- | ||
metricbeat.autodiscover: | ||
providers: | ||
- type: kubernetes | ||
include_annotations: ["prometheus.io.scrape"] | ||
templates: | ||
- condition: | ||
contains: | ||
kubernetes.annotations.prometheus.io.scrape: "true" | ||
config: | ||
- module: prometheus | ||
metricsets: ["collector"] | ||
hosts: "${data.host}:{data.port}" | ||
------------------------------------------------------------------------------------- | ||
|
||
This configuration launches a `prometheus` module for all containers of pods annotated `prometheus.io.scrape=true`. |