Page 1 of 1

snmptt.log file size too much

Posted: Sun Jun 06, 2021 1:41 am
by OmarNaji1
Dears,

Request your support for the file size for the below files

256G /var/log/snmptt/snmptt.log


as I checked the snmptt.ini I found the below.

Code: Select all

[Logging]
# Set to 1 to enable messages to be sent to standard output, or 0 to disable.
# Would normally be disabled unless you are piping this program to another
stdout_enable = 0

# Set to 1 to enable text logging of *TRAPS*.  Make sure you specify a log_file
# location
log_enable = 1

# Log file location.  The COMPLETE path and filename.  Ex: '/var/log/snmptt/snmptt.log'
log_file = /var/log/snmptt/snmptt.log
should I change the log_enable to be 0?
if I removed the snmptt.log is that will impact the Nagios Application or will missing alert from the history?

Best regards.

Re: snmptt.log file size too much

Posted: Mon Jun 07, 2021 10:42 am
by gsmith
Hi,

There is a facility to rotate the log weekly and keep 4 weeks worth of
log files.

First please run:

Code: Select all

chown root:root /var/log/snmptt/
Then run the following command and let me know if you see any errors:

Code: Select all

/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf

Then right after that run this command and show me the output:

Code: Select all

tail -20 /var/log/messages
Also please send me the file /etc/logrotate.d/snmptt

Thanks