Possible to clear or clear parts of the "Imaging Log" under Reports?
-
Hello, our imaging log has grown quite large and it takes quite a bit for the page to load so I was curious, is it possible to delete imaging log entries or clear the log entirely?
-
@salted_cashews yes you can delete entries in your imaging log table. You will need linux command prompt access on your fog server.
> sudo mysql -u root >> use fog; >> // set your time horizon and run the command to get the number of records that will be delete. In my case I picked jan 01 2018. >> select count(ilHostID) from imagingLog where ilStartTime < '2018-01-01'; >> // now delete these records >> delete from imagingLog where ilStartTime < '2018-01-01';
-
@george1421 Thank you sir!
-
@george1421 Is there a file stored somewhere that I would be able to delete in the future? I might have to do this more frequently than I thought.
-
@salted_cashews said in Possible to clear or clear parts of the "Imaging Log" under Reports?:
Is there a file stored somewhere that I would be able to delete in the future?
I don’t understand that statement. These records are in the mysql database. How many images a month are you deploying? I’ve never heard a full imagingLog causing webui slowness, especially since you flushed it 1 month ago.
-
@george1421 We’ve been doing a lot of testing/deploying with our new network. I seemed to have not ran the previous commands properly. Is (ilHostID) what I type or should that be a specific value? I’m typing exactly what is typed there (excluding the // statements)?
-
@salted_cashews These are the only important commands. Just pick a start date that is imporant to you. If you want to just delete all records remove the where clause
where ilStartTime < '2018-01-01'
and it will remove all records.use fog; delete from imagingLog where ilStartTime < '2018-01-01';
-
@george1421 There we are, thanks! On that note, I know absolutely nothing about MySQL. Is there a reference you can provide or any basic tips one should know when using it? I’m mainly looking for best practices/how-not-to-break things.
-
@salted_cashews Here you find an easy to use tutorial on mysql command line access. Just skip the step in installing mysql as this is already done on your system. Find the password of your database (root) user in /var/www/html/fog/lib/fog/config.class.php (might be
''
-> empty) and got ahead try out things: https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorialCreating a new database / table as in the examples might be a idea to play with things and not break any FOG tables.
-
@Sebastian-Roth Much appreciated!
-
Hi,
I want to add that I have done some changes in the reports, imaging log report too, to make pre-filters and not shows all the registries.For example, in the imaging log report you can do a a prefilter by image name, user name or hostname. In this way, the result is more small and you don’t need erase registries in the database.
The new version of the reports are available in the “working” branch