For testing, I created a file in my home
directory:
touch /home/testuser/test.log
I use td-agent
to deliver logs to Elasticsearch (EFK).
This is my test configuration in td-agent.conf
:
<source>
@type tail
path /home/testuser/test.log
read_from_head true
tag test.**
<parse>
@type none
</parse>
</source>
<filter *.**>
@type record_transformer
enable_ruby
<record>
hostname "#{Socket.gethostname}"
</record>
</filter>
<match test.**>
@type elasticsearch
host .....
port .....
user .....
password .....
logstash_format true
logstash_prefix test
flush_interval 1s
</match>
Then I started the agent. There are no errors in the agent's logs. It is written that the agent monitors the specified file.
After that, I started filling in the log:
echo "123" >> test.log
echo "456" >> test.log
echo "789" >> test.log
No new entries have appeared in the td-agent
logs. In Kibana
, the index "test- *" does not appear.
What am I doing wrong?