Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent cloudbeat support #179

Merged
merged 7 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions deploy/kubernetes/elastic-agent-managed-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
- name: group
mountPath: /hostfs/etc/group
readOnly: true
- name: etcsysmd
mountPath: /hostfs/etc/systemd
readOnly: true
volumes:
- name: proc
hostPath:
Expand All @@ -83,6 +98,21 @@ spec:
- name: varlog
hostPath:
path: /var/log
- name: etc-kubernetes
hostPath:
path: /etc/kubernetes
- name: var-lib
hostPath:
path: /var/lib
- name: passwd
hostPath:
path: /etc/passwd
- name: group
hostPath:
path: /etc/group
- name: etcsysmd
hostPath:
path: /etc/systemd
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
- name: group
mountPath: /hostfs/etc/group
readOnly: true
- name: etcsysmd
mountPath: /hostfs/etc/systemd
readOnly: true
volumes:
- name: proc
hostPath:
Expand All @@ -83,3 +98,18 @@ spec:
- name: varlog
hostPath:
path: /var/log
- name: etc-kubernetes
hostPath:
path: /etc/kubernetes
- name: var-lib
hostPath:
path: /var/lib
- name: passwd
hostPath:
path: /etc/passwd
- name: group
hostPath:
path: /etc/group
- name: etcsysmd
hostPath:
path: /etc/systemd
30 changes: 30 additions & 0 deletions deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,21 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
- name: group
mountPath: /hostfs/etc/group
readOnly: true
- name: etcsysmd
mountPath: /hostfs/etc/systemd
readOnly: true
volumes:
- name: datastreams
configMap:
Expand All @@ -627,6 +642,21 @@ spec:
- name: varlog
hostPath:
path: /var/log
- name: etc-kubernetes
hostPath:
path: /etc/kubernetes
- name: var-lib
hostPath:
path: /var/lib
- name: passwd
hostPath:
path: /etc/passwd
- name: group
hostPath:
path: /etc/group
- name: etcsysmd
hostPath:
path: /etc/systemd
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ spec:
- name: varlog
mountPath: /var/log
readOnly: true
- name: etc-kubernetes
mountPath: /hostfs/etc/kubernetes
readOnly: true
- name: var-lib
mountPath: /hostfs/var/lib
readOnly: true
- name: passwd
mountPath: /hostfs/etc/passwd
readOnly: true
- name: group
mountPath: /hostfs/etc/group
readOnly: true
- name: etcsysmd
mountPath: /hostfs/etc/systemd
readOnly: true
volumes:
- name: datastreams
configMap:
Expand All @@ -84,3 +99,18 @@ spec:
- name: varlog
hostPath:
path: /var/log
- name: etc-kubernetes
hostPath:
path: /etc/kubernetes
- name: var-lib
hostPath:
path: /var/lib
- name: passwd
hostPath:
path: /etc/passwd
- name: group
hostPath:
path: /etc/group
- name: etcsysmd
hostPath:
path: /etc/systemd
3 changes: 2 additions & 1 deletion internal/pkg/agent/program/supported.go

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

35 changes: 35 additions & 0 deletions internal/spec/cloudbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Cloudbeat
cmd: cloudbeat
args: [
"-E", "setup.ilm.enabled=false",
"-E", "setup.template.enabled=false",
"-E", "management.enabled=true",
]
restart_on_output_change: true
artifact: beats/cloudbeat
action_input_types:
- cloudbeat

rules:
- fix_stream: {}
- inject_index:
type: logs

- inject_stream_processor:
on_conflict: insert_after
type: logs

- filter_values:
selector: inputs
key: type
values:
- cloudbeat

- inject_agent_info: {}

- filter:
selectors:
- inputs
- output

when: length(${inputs}) > 0 and hasKey(${output}, 'elasticsearch', 'redis', 'kafka', 'logstash')