so once filebeat sends the source logs into elastic search the sources can be destroyed yet elasticsearch still have a database of ALL * those logs, that is understood.,
i was tempted to write c-u-r-a-t-o-r to not summon you :)
untergeek
hahahaha
hal
okay lets back up if I delete the source NFS logs that filebeat is reading from then I will lose my ES indexes once the NFS is purged?
finalbeta has quit
so you advised that I logrotate?
rastro
hal: let's try to focus on one thing at a time.
hal
yes I backed up on that last question for a second : )
thx for youre help btw
rastro
hal: you have a bunch of files in a directory. doesn't matter if it's SSD, spinning disk, NFS, or a thumb drive.
hal
ok got it
rastro
hal: you point filebeat at that directory, and tell it to send those logs directly to elasticsearch...
hal
got it
rastro
hal: elasticsearch will try to index the logs that are being sent. in that indexing, ES will store a copy of the data in its own place.
hal
check.
rastro
hal: if the logs are successfully loaded into ES, and you have no further need of the original logs, you can compress, rotate, and/or delete them as you wish.
hal
at this point if the source is delete the indexes are still in tact correct?
*deleted
rastro
hal: "a bunch of files in a directory" are different than "[ES storing] a copy of the data in its own place".
hal: you have, perhaps, made some large assumption...
hal
so then yes once ES has indexed my data, the source and those indexes have no relationship based on what your are saying.
rastro
hal: that's true, yes.
hal
yes I did assume there : )
so think of the panama canal once you are in a new lock the previous lock can be drained with not threat to the water level where the boat is currently.
rastro
hal: but if ES isn't running, or doesn't like your data, or ..., then it might not index the info sent from filebeat.
hal: or you might want to change the mapping on a field, which you can't do without re-indexing.
hal
in other words you do not like depending on ES in the event of an issue where ES is not longer reachable so are youre logs.
rastro
hal: or your company may have a retention policy for old information.
srv|danofsatx joined the channel
hal
so I was thinking about implementing the following let me know what you think.
1. Logrotate is setup on a single apache web server in our cluster of 4 e.g. web1 will have an entry in /etc/logrotate.d/new_rotate
2. Have filebeat read /var/log/web/logs*
into ES as we discussed.
to be indexed
3. I will have AWS backup and archive the NFS logs while rotate is keeping 30 days logs, so AWS will have more than 30 days 60 90 120 etc.
this is a seperate task
** so we would have a running local 30 day rotation, AWS for long term reading the /var/log/*, and ES ingesting the NFS logs from filebeat.
sound good?
rastro
hal: sure.
hal: i would add step 2.5: have logrotate compress the files.