Page 1 of 1
current snmptt.log behind current time
Posted: Thu Apr 02, 2020 12:48 pm
by biswajit.banerjee
Hi Support ,
Our snmptt log current time of logging data is old ( 2 days back) , not able to understand this .
Capture-11.PNG
Can you please help me diagnose as some time based snmptrap is creating issue .
Thanks
Re: current snmptt.log behind current time
Posted: Fri Apr 03, 2020 8:56 am
by ssax
I've never seen this personally but it could be taking them from the actually time the trap was received.
First, please send the output of these commands:
Code: Select all
mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
date
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
grep "date.timezone =" /etc/php.ini
ls -l /var/spool/snmptt
Does restarting the SNMPTT service fix it?
Thank you
Re: current snmptt.log behind current time
Posted: Fri Apr 03, 2020 9:43 am
by biswajit.banerjee
Please find the required Outputs
# mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
+---------------------+
| NOW() |
+---------------------+
| 2020-04-03 10:28:55 |
+---------------------+
+--------------------+---------------------+
| @@GLOBAL.time_zone | @@SESSION.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
# date
Fri Apr 3 10:29:48 EDT 2020
# ls -l /etc/localtime
lrwxrwxrwx 1 root root 36 Mar 1 2018 /etc/localtime -> /usr/share/zoneinfo/America/New_York
root@usvanagiospxi3:(04-03 10:28): /root
# php -r 'echo date("D M j G:i:s T Y")."\n";'
Fri Apr 3 10:32:43 EDT 2020
root@usvanagiospxi3:(04-03 10:28): /root
# grep "date.timezone =" /etc/php.ini
date.timezone = America/New_York
# ls -l /var/spool/snmptt | wc -l
763249
# ls -ltur /var/spool/snmptt | tail -10
-rw-r--r-- 1 root root 339 Apr 3 10:40 #snmptt-trap-1585924843214849
-rw-r--r-- 1 root root 317 Apr 3 10:40 #snmptt-trap-1585924843291227
-rw-r--r-- 1 root root 321 Apr 3 10:40 #snmptt-trap-1585924843422659
-rw-r--r-- 1 root root 433 Apr 3 10:40 #snmptt-trap-1585924843466199
-rw-r--r-- 1 root root 317 Apr 3 10:40 #snmptt-trap-1585924843979619
-rw-r--r-- 1 root root 409 Apr 3 10:40 #snmptt-trap-1585924844047428
-rw-r--r-- 1 root root 317 Apr 3 10:40 #snmptt-trap-1585924844225515
-rw-r--r-- 1 root root 320 Apr 3 10:40 #snmptt-trap-1585924844432240
-rw-r--r-- 1 root root 583 Apr 3 10:40 #snmptt-trap-1585924844737205
-rw-r--r-- 1 root root 317 Apr 3 10:40 #snmptt-trap-1585924845055325
Restart of snmptt did not work out
Re: current snmptt.log behind current time
Posted: Fri Apr 03, 2020 3:05 pm
by ssax
That all looks proper.
Are you logging the traps to
/var/log/messages from snmptrapd? Please check if the times show wrong in there as well.
Please PM me one of the files from
/var/spool/snmptt?
Additionally, run this command (as root) and send me the resulting
/tmp/SNMPFILES.zip file:
Code: Select all
zip -r /tmp/SNMPFILES.zip /etc/snmp