Per host retention and used space

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Per host retention and used space

Post by mejokj »

Hi,

Is there a way to have different retention periods for logs coming in from different hosts? For example I want to retain logs from some Linux servers for 1 month and others for 6 months?

Also, is it possible to know how much logs(MB/GB) are received per day from each host?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Per host retention and used space

Post by cdienger »

This is a fairly common request but not one that has been implemented yet. If one were inclined though something could be set up as a cron job. The command to delete all of 192.168.55.2's logs from yesterday's index would like like:

curl -XDELETE 'http://localhost:9200/logstash-2018.11. ... 2.168.55.2'

As far as getting the size of data in bytes that an host sends, there isn't a good way to do this on the NLS end. You can however see the number of events a host sends which should give you an idea of how much data it is sending. This can be done by applying a filter like "host:192.168.55.2" on the dashboard.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked