Greetings, after installing Sonata Stats, the logs in /usr/share/sonata/queues-stats/backend/storage/logs/ are growing at 300 mb per day… I’ve looked through logrotate and don’t see anything that will keep these logs from filling up the hard drive endlessly…
Is there a log rotate setting for these logs that I’m missing? If not, I would like to add a logrotate setting. Can someone help me with this so I don’t have to monitor these logs and have to manually delete them?
Hi Roger thanks for the info… I tried to edit this php file but it seems to be encrypted with ioncube. What should I do? I’m not familiar with this or how to decode it.
Also, wondering if I wanted to keep it on debug level couldn’t we add an entry to logrotate for this? Right now each day a new log file is create in sequential order named laravel-2022-09-15.log - they are 250 mb each file… so there is a setting somewhere that forces the new log when it reaches to 250… is there an entry where I could add “rotate 4”. I don’t see this file path anywhere in the logrotate files…
How are other users handling this? Is everyone who installed queues stats needing to make this manual change so their hard drives don’t fill up?
Please check the contents of this file /usr/share/sonata/queues-stats/backend/.env, look for this configuration DB_HOST=localhost if you see that change it to this DB_HOST=127.0.0.1 then execute this commands php artisan config:cache and systemctl restart sonata-stats
DB_HOST is already set to 127.0.0.1. This is the content of that file below… is that APP_NAME correct? I deleted out the keys and secrets as I wasn’t sure if that should be shown for a forum post.
set password for ‘stats’@‘localhost’ = password(‘typeapasswordhere’);
grant all privileges on sonata_stats.* to ‘stats’@‘localhost’;
grant select on asterisk.queues_log to ‘stats’@‘localhost’;
grant select on asterisk.cdr to ‘stats’@‘localhost’;
on the same .env file change the value of DB_PASSWORD and DB_ASTERISK_PASSWORD for the password you entered and then php artisan config:cache and systemctl restart sonata-stats.
If the issue persists you can contact me at roger@vitalpbx.com so we can access on the server and look at the issue
Hi Roger… I apologize but I’m only just learning linux and any datatbase commands for the first time, so I need a little more detail to do this myself.
I got the prompt for mariadb after typing “mysql” at the bash# prompt which looked like this:
MariaDB [(none)]>
But I didn’t know how to enter each statement at this prompt or how to check if that user existed. If you could provide me a screenshot of these steps showing me the prompt with the command I can do this…
I’m also guessing after adding the passwords to the .env file (which I already know how to use the nano function, then after saving these changes to .env file, at the bash prompt # I would do the following?
[root@vpbx01 russ.greco]# php artisan config:cache
and then
[root@vpbx01 russ.greco]# systemctll restart sonata-stats
Please let me know or I can schedule for you to take a look at the server at your convenience… whatever is easy… thanks!