• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Possible to clear or clear parts of the "Imaging Log" under Reports?

    Scheduled Pinned Locked Moved Solved
    General Problems
    4
    11
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      salted_cashews
      last edited by

      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?

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @salted_cashews
        last edited by

        @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';
        

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        S 2 Replies Last reply Reply Quote 1
        • S
          salted_cashews @george1421
          last edited by

          @george1421 Thank you sir!

          1 Reply Last reply Reply Quote 0
          • S
            salted_cashews @george1421
            last edited by

            @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.

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @salted_cashews
              last edited by

              @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.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              S 1 Reply Last reply Reply Quote 0
              • S
                salted_cashews @george1421
                last edited by

                @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)?

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @salted_cashews
                  last edited by

                  @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';
                  

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    salted_cashews @george1421
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by

                      @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-tutorial

                      Creating a new database / table as in the examples might be a idea to play with things and not break any FOG tables.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        salted_cashews @Sebastian Roth
                        last edited by

                        @Sebastian-Roth Much appreciated!

                        1 Reply Last reply Reply Quote 0
                        • F
                          Fernando Gietz Developer
                          last edited by Fernando Gietz

                          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

                          1 Reply Last reply Reply Quote 1
                          • 1 / 1
                          • First post
                            Last post

                          234

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project