# Custom Logs via elastic agent on ECK

**URL:** <https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032>\
**Category:** Elastic Observability\
**Created:** [April 28, 2023, 8:46am UTC](https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032 "2023-04-28T08:46:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nada\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nada_s/32/118570_2.png) [@Nada\_S](https://discuss.elastic.co/u/Nada_S)\
**Post date:** [April 28, 2023, 8:46am UTC](https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032/1 "2023-04-28T08:46:26Z")

</div>

Hello,

I am trying to view custom logs on elastic cloud on kubernetes using an elastic agent. This is my configuration and I cannot view data on elasticsearch. Elasticsearch and Kibana are running normally and I get metricbeat and filebeat metrics and logs via this elastic agent:

apiVersion: [agent.k8s.elastic.co/v1alpha1](http://agent.k8s.elastic.co/v1alpha1)  
kind: Agent  
metadata:  
name: elastic-agent  
spec:  
version: 8.7.0  
elasticsearchRefs:

- name: elasticsearch  
daemonSet:  
podTemplate:  
spec:  
securityContext:  
runAsUser: 0  
config:  
inputs:
  - name: log  
version: latest  
type: logfile  
enabled: true  
use\_output: default  
meta:  
package:  
name: switch-log  
version: latest  
data\_stream:  
streams:  
data\_stream:  
dataset: sw02.log  
type: logs  
paths:
    - /home/pi/swlog/sw02.log\*

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [April 28, 2023, 8:57am UTC](https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032/2 "2023-04-28T08:57:53Z")

</div>

Hi Nada,

Are you seeing any errors in the logs at all?

---

<div class="post-metadata">

**Author:** ![Nada\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nada_s/32/118570_2.png) [@Nada\_S](https://discuss.elastic.co/u/Nada_S)\
**Post date:** [April 28, 2023, 9:05am UTC](https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032/3 "2023-04-28T09:05:12Z")

</div>

Hello Carly, I am seeing normal logs from filestream but not from this specific logfile I had specified.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [May 2, 2023, 9:07am UTC](https://discuss.elastic.co/t/custom-logs-via-elastic-agent-on-eck/331032/4 "2023-05-02T09:07:55Z")

</div>

Thanks for confirming. When you run the `setup` command did you see any errors for this file? Have you also checked the file permissions of this logfile to ensure the beat can access the file?
