Network Management

How to clear discards and errors statistics for the day in NPM

The Orion database still retains discards and errors of monitored interfaces for the rest of the day after clearing them in the device directly. This is more obvious on maps created in Network Atlas where interfaces errors this hour and today are shown.

First published date

11/8/2018 9:16 PM

Last published date

9/7/2022 6:18 PM

Overview

The Orion database still retains discards and errors of monitored interfaces for the rest of the day after clearing them in the device directly. This is more obvious on maps created in Network Atlas where interfaces errors this hour and today are shown. For this reason, the steps below outline how to clear errors and discards statistics collected by NPM within the day.

Product section

Network Performance Monitor

Resolution

  1. Open Database Manager
  2. Click "Add Orion Server"
  3. Expand your server, right-click the database, and hit "New query ..."
  4. Copy and paste the SQL query below replacing NAME with the name of the interface and NUMBER with the NodeID of the device where the interface is located.

    Note: To obtain the NodeID of a device, refer to How to obtain a node ID from the Web Console

  5. Click "Execute query"
-- 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.

FOR SINGLE/SPECIFIC NODE CLEARING

UPDATE Interfaces SET InDiscardsThisHour = '0',
InDiscardsToday = '0',
InErrorsThisHour = '0',
InErrorsToday = '0',
OutDiscardsThisHour = '0',
OutDiscardsToday = '0',
OutErrorsThisHour = '0',
OutErrorsToday = '0' WHERE InterfaceName = 'NAME' AND NodeID = 'NUMBER'

FOR CLEARING INTERFACE in SINGLE NODE 

UPDATE Interfaces SET InDiscardsThisHour = '0', 
InDiscardsToday = '0', 
InErrorsThisHour = '0', 
InErrorsToday = '0', 
OutDiscardsThisHour = '0', 
OutDiscardsToday = '0', 
OutErrorsThisHour = '0', 
OutErrorsThisHour = '0', OutErrorsToday = '0' WHERE InterfaceName != 'NULL' and nodeid = 'NUMBER'

FOR BULK CLEARING

UPDATE Interfaces SET InDiscardsThisHour = '0', 
InDiscardsToday = '0', 
InErrorsThisHour = '0', 
InErrorsToday = '0', 
OutDiscardsThisHour = '0', 
OutDiscardsToday = '0', 
OutErrorsThisHour = '0', 
OutErrorsToday = '0' WHERE InterfaceName != 'NULL'