Please-please-please-need a script to delete all entries in Passive Monitor Logs

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Please-please-please-need a script to delete all entries in Passive Monitor LogsExpand / Collapse
Author
Message
Posted 3/8/2005 4:15:50 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 1/3/2006 11:27:00 AM
Posts: 58, Visits: 1

I tought that SP1 would have something to clean up the logs...no  such luck.

IPSWITCH

please-please-please, we need a database script to clean those logs...I would take a script that delete and recreate that table...Mine is now approximate 3 millions rows now.

 

 

 

Post #5469
Posted 3/9/2005 2:13:53 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 7/24/2005 6:18:00 AM
Posts: 117, Visits: 1

ogos,

Please read the "Cleaning database" thread, in which you will find instructions on how to clear out both the Active and Passive Monitor Log tables:

http://www.ipswitch.com/forums/shwmessage.aspx?ForumID=14&MessageID=5206

-- Nathan

Post #5516
Posted 3/11/2005 4:44:50 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 1/3/2006 11:27:00 AM
Posts: 58, Visits: 1

Thanks to NathanA post...

I was able to change his SQL script from "Active" to "Passive" and  I was able to clean the Syslogs and SNMP traps etc.

I still do not like to do this manually...but is better than not able to acess them at all..

I am going to monitor these tables and see how long it takes (records in the table) before WUP chokes up with the SQL timeouts errors.

Thanks NAthanA

Post #5585
Posted 3/11/2005 4:50:07 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 1/3/2006 11:27:00 AM
Posts: 58, Visits: 1

Just in case anyone else need to clear the Passive logs.....

just Replace in  NathanA script the word from "Active" to "Passive" and it will works great.

"

1. Stop the Ipswitch WhatsUp Engine, just to be on the safe side.

2. Run the OSQL command-line Transact-SQL interface:

osql -S (local)\whatsup -E

- OR -

osql -S (local)\whatsup -U sa -P <password>

(depending on whether you are authenticating to the database by DB user/pass or by NT credentials)

3. Run the following Transact-SQL statements (but supply a 'go' after every one just to make sure that you typed it in right and that it worked):

USE WhatsUp
ALTER TABLE ActiveMonitorActivityLog DROP CONSTRAINT FK_ActiveMonitorActivityLog_PivotActiveMonitorToDevice
ALTER TABLE ActiveMonitorSampleData DROP CONSTRAINT FK_ActiveMonitorSampleData_ActiveMonitorActivityLog
TRUNCATE TABLE ActiveMonitorActivityLog
TRUNCATE TABLE ActiveMonitorSampleData
ALTER TABLE ActiveMonitorSampleData ADD CONSTRAINT FK_ActiveMonitorSampleData_ActiveMonitorActivityLog FOREIGN KEY (nActiveMonitorActivityLogID) REFERENCES ActiveMonitorActivityLog (nActiveMonitorActivityLogID)
ALTER TABLE ActiveMonitorActivityLog ADD CONSTRAINT FK_ActiveMonitorActivityLog_PivotActiveMonitorToDevice FOREIGN KEY (nPivotActiveMonitorTypeToDeviceID) REFERENCES PivotActiveMonitorTypeToDevice (nPivotActiveMonitorTypeToDeviceID)
DBCC SHRINKDATABASE (WhatsUp)

4. Restart the Ipswitch WhatsUp Engine.

5. Set your Raw Data retention to 2 hours and cross your fingers.

Good luck,

-- Nathan

"

Post #5586
Posted 3/11/2005 5:49:49 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 3/11/2005 5:43:00 PM
Posts: 14, Visits: 1
There are registry settings that can be used to control log expiration:

[HKLM\SOFTWARE\Ipswitch\Network Monitor\WhatsUp Engine\2005\Database Settings\Log Expiration Settings]

[HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\Network Monitor\WhatsUp Engine\2005\Database Settings\Sample Rollup Settings]

The former key is new to SP1.

You can set different rules for the different logs.

ie:

Keep Passive Monitor Error Log for 24 hours
Keep Recurring Report Log for 2400 hours




Mark Symons
Ipswitch, Inc
Augusta GA
Post #5588
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Jason Williams, Hush, FTPplanet.com, Hugh Garber, George Dailey, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 4:49am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 7 queries. Compression Enabled.