Skip to content

Commit

Permalink
agent cloudbeat support (#179)
Browse files Browse the repository at this point in the history
* agent cloudbeat suppor
* update buildspec after merging main
  • Loading branch information
oren-zohar authored Mar 29, 2022
1 parent a019f23 commit 71616dc
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 1 deletion.
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')

0 comments on commit 71616dc

Please sign in to comment.