Get logs from an application via elastic agent using stdout

I have a sample application which generates sample logs

Sample log line 1
Sample log line 2

this application is running in a sperate namespace as compared to the elastic agent which is not an issue as the agent is able to pick up logs from other namespaces.

The issue that I have is that I have not mentioned the path to the log file in the agent configuration but according to my friend that should not be an issue as the logs are stdout and stderr so filebeat should be able to pick those up regardless of mention the inputs in filebeat.inputs .

So is there something wrong with my configuration of agent? and if i need to make changes there what should the type-dataset-namespace should be in the input

My sample application code.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: testpod-log-generator
  labels:
    app: testpod-log-generator
spec:
  selector:
    matchLabels:
      app: testpod-log-generator
  replicas: 1
  template:
    metadata:
      labels:
        app: testpod-log-generator
    spec:
      containers: 
      - name: testpod-log-generator
        imagePullPolicy: Always
        image: coffeeapplied/dockerloggenerator:1.0.2
        ports:
        - containerPort: 8080
       
        resources:
          requests:
            cpu: 50m
            memory: 50Mi
          limits:
            cpu: 100m
            memory: 100Mi

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.