/var/log/messages has a lot info nagios messages

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

/var/log/messages has a lot info nagios messages

Post by bosecorp »

the /var/log/messages file has a lot Nagios messages about all the different checks. not only the messages file uses a lot space because of that but also makes it very difficult to troubleshoot any non Nagios related issue because all the messages.

I would like to make it so Nagios doesn't write a lot informational messages about all the check is doing onto the /var/log/message.

I noticed this effort is duplicated. the reason is because almost the same messages are being recorded in /usr/local/Nagios/var/Nagios.log
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: /var/log/messages has a lot info nagios messages

Post by tmcdonald »

You should be able to set use_syslog=0 in your nagios.cfg and restart Nagios.

https://assets.nagios.com/downloads/nag ... gmain.html
Former Nagios employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: /var/log/messages has a lot info nagios messages

Post by bosecorp »

would that stop recording messages in /usr/local/Nagios/var/Nagios.log as well.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: /var/log/messages has a lot info nagios messages

Post by tmcdonald »

From our config file sample:
# LOGGING OPTIONS
# If you want messages logged to the syslog facility, as well as the
# Nagios log file set this option to 1. If not, set it to 0.

use_syslog=1
https://github.com/NagiosEnterprises/na ... #L249-L253

So setting it to 1 will log to both syslog and to the log file, and setting it to 0 will just log to the Nagios log file.
Former Nagios employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: /var/log/messages has a lot info nagios messages

Post by bosecorp »

NIce. thanks that is what I want

thank you

questions, if that is the case what would you want to set 1 in order to have the same messages in Nagios.log and messages file. Unless 1 gives you more detail and at the same times records info in the message file
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: /var/log/messages has a lot info nagios messages

Post by ssax »

It will use the syslog facility, it's the same information but handy if you are offloading your logs to another server and may have different rotate settings.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: /var/log/messages has a lot info nagios messages

Post by bosecorp »

thanks. you can close the ticket now
Locked