# Elastic agent not sending logs to elastic search

**URL:** <https://discuss.elastic.co/t/elastic-agent-not-sending-logs-to-elastic-search/349909>\
**Category:** Elastic Agent\
**Created:** [December 25, 2023, 5:18am UTC](https://discuss.elastic.co/t/elastic-agent-not-sending-logs-to-elastic-search/349909 "2023-12-25T05:18:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramapdev](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@ramapdev](https://discuss.elastic.co/u/ramapdev)\
**Post date:** [December 25, 2023, 5:18am UTC](https://discuss.elastic.co/t/elastic-agent-not-sending-logs-to-elastic-search/349909/1 "2023-12-25T05:18:48Z")

</div>

HI All,

i am able to launch the elastic agent and fleet successfully  
[ec2-user@ip-172-31-56-159 testlogs]$ sudo /usr/bin/elastic-agent status  
┌─ fleet  
│ └─ status: (HEALTHY) Connected  
└─ elastic-agent  
└─ status: (HEALTHY) Running

but i am not able to send logs or metrics

[ec2-user@ip-172-31-56-159 testlogs]$ tail -n 20 /home/ec2-user/testlogs/firsttest.log  
THis is a testlog  
HELLOWORLD  
HELLOWORLD

i used the below elastic.yml for elastic agent  
[ec2-user@ip-172-31-52-201 elastic-agent-8.11.1-linux-x86\_64]$ cat elastic-agent.yml  
id: 54dab730-a274-11ee-81bd-b55c6dbf9195  
revision: 13  
outputs:  
default:  
type: elasticsearch  
hosts:  
-  
ssl.ca\_trusted\_fingerprint: ac76fd1059ec015383059c09b6179e62c9698c87d71684a1c44294407b5d581d  
username: elastic  
password: 7bYj71tS0x90vprzcZ\_9  
inputs:

- id: testlogs  
name: log-1  
revision: 1  
index: test\_index  
type: logfile  
use\_output: default  
meta:  
package:  
name: log  
version: 2.3.0  
data\_stream:  
namespace: default  
package\_policy\_id: 996742b4-ffa3-4312-81e2-6c3ff9c1df70  
streams:
  - id: logfile-log.logs-996742b4-ffa3-4312-81e2-6c3ff9c1df70  
data\_stream:  
dataset: generic  
paths:
    - /home/ec2-user/testlogs/firsttest.log  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  
signature: \>-  
MEUCIQDJLwtwnwpyTetOeUK/0aexagyRCj0ZJWqmxQuW3XdqlwIgMuH/Hgbu+08KZ2mKRAjHmMJFvyUjktuauc23yapMJrk=  
secret\_references:

---

<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:** [January 22, 2024, 5:19am UTC](https://discuss.elastic.co/t/elastic-agent-not-sending-logs-to-elastic-search/349909/2 "2024-01-22T05:19:34Z")

</div>

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