How to manage elasticsearch logs: disk almost full

So, if I'm not wrong, if I solve the errors related to logstash I can solve also the disk full issue...it seems that elasticsearch doesn't require a lot of space in my deploy.
If I understand what I read, elasticsearch is a database, right? And I should work on it if I need to save only information related to the last 3 months (for example)...

Could you please say me if my understanding is correct?

If yes, I will try to understand the content of this thread Rotating ES Logs