I would like to use rollover to delete all logs, however, I always get an error message. It does not work. I can use only if turn of rollover. I do not modify anything on indexes, I use default Indexes after installing.
sudo filebeat setup --pipelines --modules system apache mysql
sudo filebeat setup --pipelines --modules system -M "system.syslog.enabled=true" -M "system.auth.enabled=true"
sudo filebeat setup --pipelines -e
Is it possible to configure Filebeat, Metricbeat, etc to automaticlaly create an alias whenever the index rolls over a to a new one due to ILM lifecycle policy?
How can I fix this issue? I have already tried to delete DataStream, after then delete Indexes, Index Templates but it does not help me.
Then I deleted templates, datastream and ran that command:
cd /usr/share/filebeat/bin && ./filebeat setup -c /etc/filebeat/filebeat.yml --path.home /usr/share/filebeat --path.data /var/lib/filebeat
Unfortunately, I always get this error message.
Policy filebeat is configured for rollover, but index .ds-filebeat-8.11.4-2024.01.14-000001 does not have an alias, which is required for rollover.
You are mostly right, but you're trying to treat the data stream which you should read about like an normal index. You should read about data streams
Just to warn you when you set ILM to settings like megabytes or minutes for rollover, it's not going to operate the way you think it is because ILM is meant to be used at scale on the gigabytes an hours. I'm just letting you know that you can test but do not expect it to exactly roll over on 10 megabytes. ILM Is a background process.
Third everything else in your filebeat.yml that you added about ILM etc. That is not useful.
4th always run the full setup command Not the setup command for individual components like index management
filebeat setup -e
Set your new ILM policy to what you want and again, when you set these tiny settings it's not going to work exactly how you want it to work.... And it does work at scale.
Now to roll over a datastream you do not try to roll over the actual index You roll over the data stream
POST filebeat-8.11.4/_rollover
Then run get
GET .ds-filebeat-8.11.4-2024.01.14-000001/_ilm/explain
Let's see how far you get.
I appreciate you jumping in and just trying everything, but it's probably worthwhile understanding data streams and ILM. I read those sections of the documentation
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.