vector icon indicating copy to clipboard operation
vector copied to clipboard

Investigate the possibility of Vector integration into the Bottlerocket OS

Open MOZGIII opened this issue 4 years ago • 1 comments

https://github.com/bottlerocket-os/bottlerocket is a container-oriented OS. It might be interesting to work with them to integrate Vector right into their system.

We need to investigate the possibility of integrating Vector and chart the plan if it's possible.

MOZGIII avatar Dec 12 '20 03:12 MOZGIII

The provided example demonstrates how to capture logs from the host machine in Bottlerocket using a Kubernetes Pod:

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: ubuntu
  labels:
    app: ubuntu
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: eks.amazonaws.com/compute-type
            operator: NotIn
            values:
            - fargate
  containers:
  - image: public.ecr.aws/lts/ubuntu:22.04_stable
    command:
      - "/bin/bash"
      - "-c"
      - |
        apt-get update && apt-get install -y systemd-journal-remote  && sleep 604800
    imagePullPolicy: Always
    name: ubuntu
    volumeMounts:
    - mountPath: /var/log/journal-ac
      name: journal-volume
  restartPolicy: Always
  volumes:
  - name: journal-volume
    hostPath:
      path: /var/log/journal
EOF

Then, execute: kubectl exec ubuntu -- journalctl --directory=/var/log/journal-ac -f

chas0amx avatar Jan 29 '24 09:01 chas0amx