trimmin the log.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

trimmin the log.

Post by benhank »

is there a way to have nagios limit the size of its log files?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: trimmin the log.

Post by slansing »

The Nagios system automatically archives the logs and it needs them in that archive for various reports. So it is not really recommended to fiddle around with changing or limiting the Nagios system's log's.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: trimmin the log.

Post by benhank »

I was thinking more of the event logs. We once screwed up notifications and ended up with a 20gig log file ...4 of them
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: trimmin the log.

Post by mguthrie »

You can't really limit the log size, just the frequency of the rotation, which is in the main nagios.cfg file. You can however turn off some of the logging features so that less data gets logged. This will actually help performance if you don't need the data.

Code: Select all

log_event_handlers=0
log_notifications=0
log_passive_checks=0
log_service_retries=0
log_host_retries=0
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: trimmin the log.

Post by benhank »

excellent! that's just what I needed!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked