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
/var/log/messages has a lot info nagios messages
Re: /var/log/messages has a lot info nagios messages
You should be able to set use_syslog=0 in your nagios.cfg and restart Nagios.
https://assets.nagios.com/downloads/nag ... gmain.html
https://assets.nagios.com/downloads/nag ... gmain.html
Former Nagios employee
Re: /var/log/messages has a lot info nagios messages
would that stop recording messages in /usr/local/Nagios/var/Nagios.log as well.
Re: /var/log/messages has a lot info nagios messages
From our config file sample:
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.
https://github.com/NagiosEnterprises/na ... #L249-L253# 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
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
Re: /var/log/messages has a lot info nagios messages
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
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
Re: /var/log/messages has a lot info nagios messages
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.
Re: /var/log/messages has a lot info nagios messages
thanks. you can close the ticket now