snmptt log file not rolling over
snmptt log file not rolling over
Nagios XI version: 5.5.4
XI installed from: manual
XI UUID:
Release info: 3.10.0-862.11.6.el7.x86_64 x86_64
CentOS Linux release 7.5.1804 (Core)
Gnome is not installed
Can someone please assist.
I have noticed that since this system was migrated to a new platforrm the snmptt.log file is no longer rolling over and is now huge.
I'm not sure if this is also happening across other log files, but prior to migtrating to a new platform this used to roll in one week intervals and keep 4 weeks worth of rolled files.
Can you please advise ?
Thanks
XI installed from: manual
XI UUID:
Release info: 3.10.0-862.11.6.el7.x86_64 x86_64
CentOS Linux release 7.5.1804 (Core)
Gnome is not installed
Can someone please assist.
I have noticed that since this system was migrated to a new platforrm the snmptt.log file is no longer rolling over and is now huge.
I'm not sure if this is also happening across other log files, but prior to migtrating to a new platform this used to roll in one week intervals and keep 4 weeks worth of rolled files.
Can you please advise ?
Thanks
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: snmptt log file not rolling over
Hello, @vijilants. Please upload the following file from your server:
Also, where is the snmptt.log located your new system?/etc/logrotate.d/snmptt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt log file not rolling over
Thank you for your response.npolovenko wrote:Hello, @vijilants. Please upload the following file from your server:Also, where is the snmptt.log located your new system?/etc/logrotate.d/snmptt
The log is located in /var/log/snmptt/
Code: Select all
[]# more /etc/logrotate.d/snmptt
/var/log/snmptt/snmptt*.log /var/log/snmptt/snmptthandler.debug {
weekly
notifempty
missingok
}
/var/log/snmptt/snmptt.debug {
weekly
notifempty
missingok
postrotate
/etc/init.d/snmptt reload >/dev/null 2>/dev/null || true
endscript
}
[]#-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: snmptt log file not rolling over
@vijilants, Lets check permissions on the /var/log/snmptt folder:
Then run the following command and let me know if you see any errors:ls -ld /var/log/snmptt/
Then right after that run this command and show me the output:/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
tail -20 /var/log/messages
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt log file not rolling over
Please see below:npolovenko wrote:@vijilants, Lets check permissions on the /var/log/snmptt folder:Then run the following command and let me know if you see any errors:ls -ld /var/log/snmptt/Then right after that run this command and show me the output:/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conftail -20 /var/log/messages
# ls -ld /var/log/snmptt/
drwxrwxr-x 2 snmptt snmptt 73 Aug 24 11:23 /var/log/snmptt/
#
#
# /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
error: skipping "/var/log/snmptt/snmptt.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/snmptt/snmpttsystem.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/snmptt/snmpttunknown.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/snmptt/snmptthandler.debug" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/snmptt/snmptt.debug" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
#
#
# tail -20 /var/log/messages
Nov 19 09:20:01 londnms1 systemd: Started Session 1335743 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335743 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335745 of user root.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335745 of user root.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335746 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335746 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335747 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335747 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335750 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335750 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335748 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335748 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335749 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335749 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335751 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335751 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335752 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335752 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Started Session 1335753 of user nagios.
Nov 19 09:20:01 londnms1 systemd: Starting Session 1335753 of user nagios.
# [/quote]
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: snmptt log file not rolling over
@vijilants, Please run the following command to change the ownership of the snmptt folder:
And then run this again:chown root:root /var/log/snmptt/
/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt log file not rolling over
Thank you.
I will monitor this.
I will monitor this.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: snmptt log file not rolling over
@vijilants , Sounds good.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt log file not rolling over
Thank you.
This is now working !
This is now working !
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: snmptt log file not rolling over
@vijilants, Thanks for the update. Closing this thread as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.