# Get logs from an application via elastic agent using stdout

**URL:** https://discuss.elastic.co/t/get-logs-from-an-application-via-elastic-agent-using-stdout/324897
**Category:** Elastic Agent
**Tags:** beats-module, filebeat
**Created:** [February 7, 2023, 12:45pm UTC](https://discuss.elastic.co/t/get-logs-from-an-application-via-elastic-agent-using-stdout/324897 "2023-02-07T12:45:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Bhrugu\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhrugu_sharma/32/116623_2.png) [@Bhrugu\_Sharma](https://discuss.elastic.co/u/Bhrugu_Sharma)
#### Post date: [February 7, 2023, 12:45pm UTC](https://discuss.elastic.co/t/get-logs-from-an-application-via-elastic-agent-using-stdout/324897/1 "2023-02-07T12:45:13Z")

</div>

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.

```auto
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

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 7, 2023, 12:45pm UTC](https://discuss.elastic.co/t/get-logs-from-an-application-via-elastic-agent-using-stdout/324897/2 "2023-03-07T12:45:49Z")

</div>

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