3

I've been trying the ntopng software from http://www.ntop.org/get-started/download on a CentOS box at work to monitor what is happening on our network. The problem I'm having is that I can't find any part of the software that gives an option to delete old data.

The disk usage by this software was so uncontrolled it used 79% of the space and 87% of the inodes on the disk in that server after a few months.

Has anyone seen a solution for having only the most recent xx days or GB of data when using ntopng? Also ensuring it doesn't run out of inodes as well. Can/should I just delete any old files and empty directories in its rrd data directory?

BeowulfNode42
  • 2,595
  • 2
  • 18
  • 32

2 Answers2

5

I've encountered a similar problem. One day df -ih shows that there is no free inodes on root partition. OS is Ubuntu 12.04.

After some research I found that there is a lot of small .json files in /var/tmp/ntopng/\*/top_talkers/ which contain information about the most active consumers of traffic.

We don't need that much history (I've seen some files which are 1 year old) so I decided to delete all files older than 2 months:

find /var/tmp/ntopng/*/top_talkers/* -mtime +60 -delete

Also I’ve added task to the /etc/crontab:

@monthly    ubuntu  /usr/bin/find /var/tmp/ntopng/*/top_talkers/* -mtime +60 -delete

Now server uses only 55% of inodes.

GregL
  • 9,030
  • 2
  • 24
  • 35
dima.butyrin
  • 146
  • 1
  • 8
  • So you don't think there's any related meta data that needs updating. Have you noticed any adverse effects from just deleting these files? – BeowulfNode42 Nov 04 '14 at 23:30
  • So far, so good. I'm not sure is there any related metadata or not, looks like everything is work as usually. – dima.butyrin Feb 04 '16 at 10:29
  • 1
    For me, the most used directories are the `*/rdd` ones. Do you think it's safe to use the same command (maybe with a longer mtime)? – tigerjack Apr 30 '16 at 08:47
0

There is option in Preferences->Timeseries Database. If you use RRD it is "Old RRDs Terention" and you can specify number of days. If you use InfluxDB it is "InfluxDB Storage" same idea - number of days. Also in Preferences->Misc->Databases there is option "Top Talkers Storage" - number of days.

I know the answer is in old question, but I was looking for same information and could not find it. So here it is.