Reduce number of logs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Reduce number of logs

Post by johndoe »

I believe nagios XI is eating alot of my DISK IO, what steps can i make to ensure logs and other things don't use so much disk IO? a.k.a which and how can i remove unnecessary logs?
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Reduce number of logs

Post by abrist »

There are a number of things that can cause a large amount of disk I/O in XI. Lets check what the largest offenders are with iotop:

Code: Select all

yum install iotop -y
/usr/sbin/iotop
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Reduce number of logs

Post by johndoe »

So it appears the disk IO was being consumed by something else which i fixed, however and continuing on the topic of reducing the number of logs how can I get rid of the following on /var/log/messages:

Code: Select all

Jan 26 13:45:28 localhost nagios: Warning: Check result queue contained results for service 'XXXXXX' on host 'XXXXXX', but the service could not be found!  Perhaps you forgot to define the service in your config files?
Jan 26 13:46:08 localhost nagios: SERVICE ALERT: XXXXXX;TIME;OK;HARD;1;TIME OK - 0 second time difference
Jan 26 13:53:48 localhost nagios: Warning: The results of service 'XXXXXX' on host 'XXXXXX' are stale by 0d 0h 1m 0s (threshold=0d 0h 4m 0s).  I'm forcing an immediate check of the service.
As for the first message, i know the object is unconfigured (that one and several others) but i dont need nagios always writting that to logs, would like to disable.
As for the second message... I dont need it also to log me when things are ok... would like to get rid of it being logged.
As for the third message... i use certain thresholds for passive checks, that is fine... What i do not understand is what nagios is always trying to do with "forcing an immediate check of the service", is nagios trying an active check?
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Reduce number of logs

Post by scottwilkerson »

edit /usr/local/nagios/etc/nagios.cfg
change to

Code: Select all

use_syslog=0
Then restart nagios

Code: Select all

service nagios restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked