Network Management

Traps and TrapVarBinds table of the Orion database is growing too large

This article discusses about an issues with the Orion database where it grows too large due to Traps and TrapVarbinds table

First published date

10/26/2018 2:37 PM

Last published date

4/14/2022 9:00 AM

Overview

Network devices sending too many trap messages to a polling engine may cause the Traps and TrapVarbinds table to grow and cause disk space issues on the SQL server hosting the Orion database.

Product section

Network Performance Monitor

Cause

The issue occurs when:
  • The table is too large.
  • The table is growing too quickly,
  • Database maintenance will not complete due to traps. 

Resolution

To resolve this issue:
  1. Before starting any work on your environment, please ensure that you have a recent backup of your database. More information here.
  2. Identify the devices that are sending the most trap messages by running the below query in Database Manager on the Orion server.
-- 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.

SELECT hostname, count(*) as TotalTrapsPerHour from traps 
where datetime>dateadd(hour, -1, getdate() )
Group By Hostname
Order By TotalTrapsPerHour desc

 

Another possibility is to query for Legacy Traps, which will show the top talkers for Traps.

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

select hostname, Traptype, COUNT(trapid) as total from Traps
where DateTime>DATEADD(day, -1, GETDATE() )
group by hostname, traptype
order by total desc, hostname, traptype
  1. Create a Trap Rule to drop messages from these hosts. See Create a Trap Rule.
  2. Truncate Traps and TrapVarbinds in the Orion Platform

It is advised to manage Syslog and trap rules in the future to avoid encountering this problem again. This comprehensive guide will help manage these messages for a healthy environment.