3 Replies Latest reply on Aug 19, 2019 11:50 PM by jasmeetsinghsuri

    Purging vCenter task & event logs from VCDB hosted on external SQL server.

    jasmeetsinghsuri Lurker

      Hi,

       

      The vCenter database is full which is causing vpxd service to stop automatically that results in a complete shutdown of vCenter access through Web Client. Reference logs as below

       

      vCenter Version:  6.5.0.20000 Build 9451637

       

      vpxd.log
      ---------
      2019-08-15T15:03:44.787+05:30 info vpxd[33172] [Originator@6876 sub=vpxdVdb] WarningThreshold: 80% ErrorThreshold: 95%.
      2019-08-15T15:03:44.787+05:30 error vpxd[33172] [Originator@6876 sub=vpxdVdb] Insufficient free space for the Database (used: 96%; threshold: 95%)
      2019-08-15T15:03:44.788+05:30 info vpxd[33172] [Originator@6876 sub=Main] ** BEGIN SERVICES ** (time to active: 10246 ms)

       

       

      Now we managed to create some space on the DB and started the vpxd service. We have check that the task & event is taking the maximum space on the vCenter database as the retention policy is set to 730 days. My question is, what if we decrease the retention period for task & event in vCenter? Can it auto delete/ purge  the records from Database or do we have to execute some manual commands? Got an article related to the same Purging old data from the database used by vCenter Server (1025914).. Kindly advice.

       

       

       

      Thanks

       

      Jasmeet Singh

       

       

        • 1. Re: Purging vCenter task & event logs from VCDB hosted on external SQL server.
          AlessandroRomeo68 Hot Shot

          Hi,

           

          Read point ten:

          You can configure the maximum number of database connections that can occur simultaneously. To limit the growth of the vCenter Server database and save storage space, you can configure the database to discard information about tasks or events periodically.

          Procedure

           

          1. In the vSphere Client, navigate to the vCenter Server instance.
          2. Select the Configure tab.
          3. Under Settings, select General.
          4. Click Edit.
          5. Select Database.
          6. In Maximum connections, type a number. Increase this number if your vCenter Server system performs many operations frequently and performance is critical. Decrease this number if the database is shared and connections to the database are costly. Do not change this value unless one of these issues pertains to your system.
          7. To have vCenter Server periodically delete the retained tasks, select the Enabled box next to Task cleanup.
          8. (Optional) In Task retention (days), type a value in days. Information about tasks that are performed on this vCenter Server system is discarded after the specified number of days.
          9. To have vCenter Server periodically clean up the retained events, select the Enabled box next to Event cleanup.
          10. (Optional) In Event retention (days), type a value in days. Information about events for this vCenter Server system is discarded after the specified number of days.
          11. (Optional) To monitor vCenter Server database consumption and disk partition, open the vCenter Server Appliance Management Interface.
          12. Click Save.

          Optional) In Event retention (days), type a value in days.

          Server information is discarded after the specified number of days, so if you reduce the days, the days saved after that date are automatically deleted.

           

          Configure Database Settings

           

          If you decrease the days, the saves beyond that date are automatically canceled.

           

           

          Best regards

          Alesando Romeo

          • 2. Re: Purging vCenter task & event logs from VCDB hosted on external SQL server.
            IRIX201110141 Master

            Just follow KB 1025914 too free up the space for your DB to get vCenter working again. Keep in mind that some additional DB cleanup/merge tasks are needed of you perform a mass delete within a SQL DB.

             

            Normaly my customers sets something between 30-60 days for the retension policy. IIRC VMware sets it to 30 days as default in todays installation. In the early days of Windows vCenter the boxed for limited Task/Events was unchecked.

             

            Regards,

            Joerg

             

             

            1 person found this helpful
            • 3. Re: Purging vCenter task & event logs from VCDB hosted on external SQL server.
              jasmeetsinghsuri Lurker

              The Kb actually resolved the issue as the vCenter database sized got decreased immediately after changing the retention period and executing the store procedure for the VCDB. Wondering if there any sql maintenance job that that runs at its schedule time to purge the stale records automatically.

               

               

              Thanks,

              Jasmeet Singh