is there a way to see how much space is being used?

Hi, is there a call that I can make that will tell me how much space my ges db is taking? it looks like it bites off chunk of 256mg, is there a way to get a bit more granular?
I guess a follow up question is, is there a way to limit the system data generated? We recently started using elastic and found that one of the tools we use for monitoring the data was chewing up obscene amounts of data. We had to start pruning it. So now I’ve been questioned about how much data the system generated streams will use in ges.

so in summary

  1. can you make a call that will give you more granular data usage than 256mb on the file system

  2. is there a way to either prune system data or reduce the generation of it

  3. is 2 even necessary



The main system data is the statistics events assuming you are not running large projections (they use state as well). You can set $maxage on the stats stream to limit how much data is stored and cap you can change the interval it’s run on the command line.

In terms of more granular assuming you are not scavenging you can just run cat (on iPad so file name may be slightly off) writer.chp and it will tell you your current size. If scavenging it’s slightly more complex (need to sum the files and do a bit of calculation) but it will give you an exact size at that point.



Excellent. Thank you. I guess… I kind of knew this but it was not making the jump between neurons. I thought there was more system data being generated then just the stats stream. And I have no excuse for not actually looking in the stats stream to find the usage data. duh.
Well thanks, maybe someone else who is not thinking straight will benefit from this :slight_smile:


Hi Greg,
I see how to set the interval that $stats records at, however, I can’t find where you set the $maxage. I think that’s a great and important feature as you probably don’t want gigs of stats piling up. Can you point me in the right direction?



Stream metadata for your $stats stream. Same as any other stream.

Either use the client api
or http api

I see. So you might in your start up code make a SetStreamMetadataAsync and set up some limiting factors for your $stats and should you need to change them up for a period just adjust it at that time.


You can adjust it at any time.

If you adjust it to be longer ... e.g. was 5 days now is 14 days. The
data in between 5-14 data is undefined it may or may not be there when
you set it longer