If you are using the free "basic" license for X-Pack, then the monitoring history is limited to 7 days.
If you are using a paid license (gold or platinum) then you can configure the expiry with the xpack.monitoring.history.duration
setting in your elasticsearch.yml
file.