#Nabox 95% full, How do I purge old data?
1 messages · Page 1 of 1 (latest)
I have followed the guide on the website but getting a 404 page not found from putty
@brave remnant You would need to start prometheus with --web.enable-admin-api to be able to use delete_series endpoint. More information here https://sbcode.net/prometheus/delete-timeseries/#:~:text=There may be a time,earlier%2C then you are able.
@brave remnant I have tried enabling the --web.enable-admin-api in nabox and it works fine. DO add your time range in below query.
curl -k --location -g --request POST 'http://localhost/prometheus/api/v1/admin/tsdb/delete_series?match[]={job="harvest2"}'
Did you restart prometheus after changing prometheus configuration? You can check if this setting is applied like below.
Could you post that command in so I can just ctrl c it please 🙂
docker exec -it prometheus sh
ps -ef | grep prometheus
that probably means at mistake was made in changing the prom file and it is in a restart loop. Double check the edit
try running docker logs prometheus and see if any errors
ah not able to restart because of no free space issue. hmmm will need to cleanup something else so Prom can restart so you can delete some data
Is the harvest install file stored anywhere? Could I remove them?
yeah let us check and see what large file(s) we can remove
@storm merlin any pointers on what @brave remnant can delete to try to recover. I'm not seeing much fat to get rid of. Maybe /data/graphite if you aren't using Harvest 1.X but may be small if you aren.t @brave remnant can you increase the underlying disk?
Can do but we will get charged
i generally reach for ncdu when I want to find the top things to delete, but you probably will not be able to install it even though it's small. You could try by sshing in and running apk add ncdu then ncdu /
var/log/docker should be safe to remove
/var/cache/apk/* is safe
I cant get out the network to install stuff 😦
@brave remnant sent you a DM
I usually go with
cd /data
du -hs *
# cd into directories causing issues
du -hs *
# etc...
yep ncdu does all that for you
yes much easier with ncdu but if not possible to install...
it's a 67.8 KB file we can send to Watson
good point, let me get that for you
that's the DM I mentioned above
cool
if /data is real full that might be an issue because I don't see what we can delete in prometheus data without breaking it
might be worth checking what size is /data/graphite/
or maybe tune2fs and remove the 5% reserve it might have
I sent you a question in teams about python versions
yes our nabox system does not have much fat
Doesn't need fat really, if something goes wrong it's usually in the logs, that you can clean anyways
well, /data is another story
Yeah its the data part thats rammed
yep i see that's a different mount so cleaning up anything on / does not help
anything you can delete like /data/graphite ?
another way which is some work is copy over the prometheus data and run it so you can clean it u, then copy it bac
or mount a NFS share, copy over, and do the same
I'd like to see du -hs /data/* anyways
me might be able to remove the partition reserve
tune2fs -l /dev/vg_data/lv_data|grep Rese
and as mentioned earlier, if you are not using Harvest 1.X you can rm /data/graphite - that might be enough to allow Prom to restart
i would try that first
exactly, 173M might be enough to fix it
Harvest 2 Im using so I could give that a go
make sure you stop harvest pollers before
Now if the goes it to clean up all prometheus data you might as well delete everything in /data/prometheus
removing graphite makes only sense if you want to selectivvely delete prom data like indicated in https://nabox.org/faq/#delete-data
Pollers are not even loading, the web gui for the systems is just blank
Same error, not enough space removed
tune2fs -m 1 /dev/vg_data/lv_data then start again
thats done the trick!
Quick !!!
Don't forget curl -k -L -X POST http://localhost/prometheus/api/v1/admin/tsdb/clean_tombstones
And tune2fs -m 5 /dev/vg_data/lv_data
FYI I fixed the blank page when graphite/prom/grafana aren't responding
Thank you 81GB back 🙂 until the let us buy more GB of storage Would it be an easy job to use NFSV4 as the area?