#Nabox 95% full, How do I purge old data?

1 messages · Page 1 of 1 (latest)

brave remnant
#

As per above, NAbox is full and not reporting. How do i remove old data

brave remnant
#

I have followed the guide on the website but getting a 404 page not found from putty

frigid ravine
brave remnant
#

I used done this as per the FAQ on the nabox website, but still 404

frigid ravine
#

@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.

brave remnant
#

Could you post that command in so I can just ctrl c it please 🙂

frigid ravine
#

docker exec -it prometheus sh
ps -ef | grep prometheus

brave remnant
keen crescent
#

that probably means at mistake was made in changing the prom file and it is in a restart loop. Double check the edit

frigid ravine
#

try running docker logs prometheus and see if any errors

brave remnant
keen crescent
#

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

brave remnant
#

Is the harvest install file stored anywhere? Could I remove them?

keen crescent
#

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?

brave remnant
#

Can do but we will get charged

keen crescent
#

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

brave remnant
#

I cant get out the network to install stuff 😦

storm merlin
#

I'm guessing growing vmdk is not an option ?

#

df -h says what ?

keen crescent
#

@brave remnant sent you a DM

storm merlin
#

I usually go with

cd /data
du -hs *
# cd into directories causing issues
du -hs *
# etc...
keen crescent
#

yep ncdu does all that for you

storm merlin
#

yes much easier with ncdu but if not possible to install...

keen crescent
#

it's a 67.8 KB file we can send to Watson

storm merlin
#

good point, let me get that for you

keen crescent
#

that's the DM I mentioned above

storm merlin
#

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

keen crescent
#

I sent you a question in teams about python versions

#

yes our nabox system does not have much fat

storm merlin
#

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

brave remnant
#

Yeah its the data part thats rammed

keen crescent
#

yep i see that's a different mount so cleaning up anything on / does not help

storm merlin
#

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

brave remnant
storm merlin
#

me might be able to remove the partition reserve

#

tune2fs -l /dev/vg_data/lv_data|grep Rese

keen crescent
#

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

storm merlin
#

exactly, 173M might be enough to fix it

brave remnant
#

Harvest 2 Im using so I could give that a go

storm merlin
#

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

brave remnant
#

Pollers are not even loading, the web gui for the systems is just blank

storm merlin
#

all right

#

dc stop nabox-harvest2; rm -rf /data/graphite/*; dc start prometheus

brave remnant
#

Same error, not enough space removed

storm merlin
#

dang it

#

tune2fs -l /dev/vg_data/lv_data|grep Rese

brave remnant
storm merlin
#

tune2fs -m 1 /dev/vg_data/lv_data then start again

brave remnant
#

thats done the trick!

storm merlin
#

Quick !!!

brave remnant
storm merlin
#

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

brave remnant
#

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?

storm merlin