Network Management

Truncate Syslog, Traps and TrapVarbinds in the Orion Platform due to performance issues

The article provides steps on how you can truncate the legacy Traps, TrapVarbinds and Syslog tables when these database tables are filling up SQL Database, causing performance issues.

First published date

10/23/2018 8:32 AM

Last published date

10/28/2022 8:19 PM

Overview

Whether it is one or all of these (Traps, TrapVarBinds, or Syslog) tables are filling up the Database causing the SQL Drive to fill up, you will need to Truncate these tables. 

This can cause several problems like

  • Web page performance issues
  • Database Maintenance not running or completing
  • Server performance issues
NOTE: This will not work for OLM Traps/Syslogs and on Orion Platform 2022.X and newer.

Product section

Orion Platform

Cause

The tables are too large. 
This is caused by too many traps flooding Orion. Usually due to the devices traps/ syslogs being set on a low logging level such as Info. Can also be caused by an excessive amount of devices sending traps. 

Resolution

  1. Before starting any work on your environment, please ensure that you have a recent backup of your database. More information here.
  2. Stop Orion services.
    • Click Start > All Programs > SolarWinds Orion > Orion Service Manager.
    • Click Stop Everything (Top Left of Service manager)
  3. Truncate the Traps and TrapVarbinds or Syslog table.
    • Click Start > All Programs > Solarwinds Orion >  Database Manager.
    • Add the database if it does not exist by clicking on the add default server.
    • Right-click on the database and select a new query.
    • Type the following query into the query box in the middle.
      -- Scripts are not supported under any SolarWinds support program or service.
      -- Scripts are provided AS IS without warranty of any kind. SolarWinds further
      -- disclaims all warranties including, without limitation, any implied warranties
      -- of merchantability or of fitness for a particular purpose. The risk arising
      -- out of the use or performance of the scripts and documentation stays with you.
      -- In no event shall SolarWinds or anyone else involved in the creation,
      -- production, or delivery of the scripts be liable for any damages whatsoever
      -- (including, without limitation, damages for loss of business profits, business
      -- interruption, loss of business information, or other pecuniary loss) arising
      -- out of the use of or inability to use the scripts or documentation.
      
      
      TRUNCATE TABLE [Syslog]
      TRUNCATE TABLE [Traps]
      TRUNCATE TABLE [TrapVarBinds]
    • Click Execute Query to run the query.
  4. Shrink the size of the Orion Database Transaction Log File
    • Stop all Orion Services using the Orion Service Manager. See Shutdown and restart Orion services.
    • Open the SQL Server Management Studio and connect to your SQL server.
    • Right-click the Orion Database and select All Tasks > Shrink > Files.
    • Set the File Type to Log. 
      The Filegroup is not an available option.
    • Under the Shrink action, select the option to Reorganize pages before releasing unused space. 
    • Set the Shrink File to 0 MB, and then click OK. 
      This step may take a while to complete. A few minutes per GB. 
    • It may be necessary to run the shrink several times
    • Restart all Orion Services. The Transaction Log File should now have a decreased size. 
  5. Run database maintenance utility.
    • Click Start > All Programs > SolarWinds Orion > Database Maintenance.
    • Click Start
  6. Start the Orion Services with Orion Service Manager. (Start Everything)