• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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 Nov 5, 2018, 3:24 PM

    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?

    G 1 Reply Last reply Nov 5, 2018, 8:22 PM Reply Quote 0
    • G
      george1421 Moderator @salted_cashews
      last edited by Nov 5, 2018, 8:22 PM

      @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 Nov 6, 2018, 3:33 PM Reply Quote 1
      • S
        salted_cashews @george1421
        last edited by Nov 6, 2018, 3:33 PM

        @george1421 Thank you sir!

        1 Reply Last reply Reply Quote 0
        • S
          salted_cashews @george1421
          last edited by Dec 18, 2018, 3:29 PM

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

          G 1 Reply Last reply Dec 18, 2018, 4:18 PM Reply Quote 0
          • G
            george1421 Moderator @salted_cashews
            last edited by Dec 18, 2018, 4:18 PM

            @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 Dec 18, 2018, 9:25 PM Reply Quote 0
            • S
              salted_cashews @george1421
              last edited by Dec 18, 2018, 9:25 PM

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

              G 1 Reply Last reply Dec 18, 2018, 9:28 PM Reply Quote 0
              • G
                george1421 Moderator @salted_cashews
                last edited by Dec 18, 2018, 9:28 PM

                @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 Dec 18, 2018, 10:39 PM Reply Quote 0
                • S
                  salted_cashews @george1421
                  last edited by Dec 18, 2018, 10:39 PM

                  @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 Dec 19, 2018, 5:18 AM

                    @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 Dec 19, 2018, 9:00 PM Reply Quote 0
                    • S
                      salted_cashews @Sebastian Roth
                      last edited by Dec 19, 2018, 9:00 PM

                      @Sebastian-Roth Much appreciated!

                      1 Reply Last reply Reply Quote 0
                      • F
                        Fernando Gietz Developer
                        last edited by Fernando Gietz Dec 20, 2018, 8:18 AM Dec 20, 2018, 2:18 PM

                        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

                        176

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project