On a installation of mine inside Log File Viewer the Log file “full” is missing.
Any idea how to fix or check what i wrong?
What i did was: i only cleared CDR and CEL events in Database.
CDR and CEL events are working fine.
Thanks
On a installation of mine inside Log File Viewer the Log file “full” is missing.
Any idea how to fix or check what i wrong?
What i did was: i only cleared CDR and CEL events in Database.
CDR and CEL events are working fine.
Thanks
That’s what it looks like:
I just deleted the “full” line again but there is still no “full” log after a testcall.
This is all i have:
But /var/log/asterisk is showing the files and they are up2date:
Could you please verify the mime type?
#> cd /var/log/asterisk/
#> file --mime-type full
Sure!
file --mime-type full
full: application/octet-stream
file --mime-type fail2ban
fail2ban: text/plain
Thank you for your time!
After deleting the file “full” and saving again in the “log files” menu it is now:
text/plain
And now it is working.
How does this happen?
Is this maybe why i had issues with the Maintainance-script as well, maybe you remember?!
THANKS!
In the code, we validate if the mime type is “text/plain.” So, in this case, the file returns “application/octet-stream;” this is why the GUI doesn’t load the file.
Is it a real plain text file?
I did a test in my lab, and the file returns “text/plain.”
I have no idea why and how it got application/octet-stream
Do you know why?
When i used #cat full i was able to see the file just fine at any time.
Your guess is as good as mine!
Lets see what happens and night when full will be converted to full-20211028 and full will be cleared by vitalpbx. Maybe it happens there.
@miguel
Yes it happens at night. Now the files can not be seen in Log File viewer anymore, again.
Same Problem again after some cronjob at night.
@miguel
Like i said: this happens at night when you run a cron job / shell.
You guys want to check via a remote-session what is going on here?
Thanks
Well, I think there is a bigger issue here. I have a BLF issue which I wanted to debug, but I cam across the following:
[root@core1 asterisk]# ll | grep full
-rw-r----- 1 asterisk asterisk 179026358 Nov 3 08:39 full
-rw-r----- 1 asterisk asterisk 519324 Oct 18 03:36 full-20211018.gz
-rw-r----- 1 asterisk asterisk 1950311 Oct 19 03:26 full-20211019.gz
-rw-r----- 1 asterisk asterisk 2010605 Oct 20 03:19 full-20211020.gz
-rw-r----- 1 asterisk asterisk 1435285 Oct 21 03:11 full-20211021.gz
-rw-r----- 1 asterisk asterisk 1810378 Oct 22 03:42 full-20211022.gz
-rw-r----- 1 asterisk asterisk 949930 Oct 23 03:25 full-20211023.gz
-rw-r----- 1 asterisk asterisk 436909 Oct 24 03:44 full-20211024
It does not seem like log rotate is working in the latest version, as you can see, we updated on the 24th and since then all the logs are in the full file.
So I am looking at the /etc/logrotate.d/asterisk
logrotate file, and indeed, things has changed.
Latest version of VitalPBX:
/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
daily
rotate 2
minsize 500M
missingok
compress
delaycompress
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
/var/spool/mail/asterisk {
daily
missingok
rotate 2
minsize 100M
notifempty
sharedscripts
create 0660 asterisk mail
su asterisk mail
}
/var/log/asterisk/queue_log {
daily
missingok
rotate 30
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
And the below if from a VitalPBX 3.1.1-1
/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
daily
rotate 7
missingok
compress
delaycompress
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
/var/spool/mail/asterisk {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0660 asterisk mail
su asterisk mail
}
/var/log/asterisk/queue_log {
daily
missingok
rotate 30
notifempty
sharedscripts
create 0640 asterisk asterisk
su asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
@miguel as you can see, things are definetly different and the logs aren’t rotated every day
The logs aren’t rotating because the file is less then the minsize (500M)
This issue got addressed on VitalPBX 3.1.3