snmptt.log file size too much

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
OmarNaji1
Posts: 17
Joined: Mon Mar 09, 2020 8:55 am

snmptt.log file size too much

Post 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.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: snmptt.log file size too much

Post 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
Locked