Server Management - Systems Insight Manager
1748225 Members
4444 Online
108759 Solutions
New Discussion юеВ

Re: Cannot access HP SIM-how to clear events directly from databse

 
Alpha_1_1
Valued Contributor

Cannot access HP SIM-how to clear events directly from databse

Our HP SIM server has stopped working.We cannot browse to its url.At this stage I suspect a "trap storm".When I examine the mxdomainmgr.log it shows multiple error messages.

25 Jan 13:30:43,184 INFO [HPSIM_DEBUG] [Panic Logger-0] (InterconnectEngine) Automation construction TrapHandler has large number of events 1,177,500 in Queue


25 Jan 13:30:53,695 INFO [HPSIM_DEBUG] [Panic Logger-0] (Low Memory Detector) Heap collection hitting upper limits 99% used

25 Jan 13:31:11,147 INFO [HPSIM_DEBUG] [Panic Logger-0] (IntervalTimer) A thread has run longer than desired, it is being moved out of the pool Construction Cache for HardwareStatusPolling:11 Max run time is 180


25 Jan 13:31:11,163 INFO [HPSIM_DEBUG] [Panic Logger-0] (Low Memory Detector) Heap collection hitting upper limits 99% used
25 Jan 13:31:11,163 INFO [HPSIM_DEBUG] [Panic Logger-0] (Low Memory Detector) Heap collection hitting upper limits 99% used
25 Jan 13:31:18,587 INFO [HPSIM_DEBUG] [Panic Logger-0] (Low Memory Detector) Heap collection hitting upper limits 99% used
25 Jan 13:31:28,646 INFO [HPSIM_DEBUG] [Panic Logger-0] (Low Memory Detector) Heap collection hitting upper limits 100% used .

As HP SIM is not functioning I am looking for a way to delete the events directly from the database. I have no real datbase experience.
I have found a table within the HP SIM database called dbo.trapData which is 1,213MB in size.I suspect this is the table that needs to be cleared.
Can anybody confirm this is the database table where traps recieved by HP SIM are stored.
Does anybody know a safe method to delete/clear traps from this table.
GTS I&O - "In the Server Room, no-one can hear you scream..."
5 REPLIES 5
Eddie J. Garza
Advisor

Re: Cannot access HP SIM-how to clear events directly from databse

I have seen this problem before.
I don't remember the specifics but I did write down some general steps:

1) Stop SIM service
2) delete(empty) the output folder (each task output is recorded in a file on the c:\programs files\hp....(Something) look for a lot of log file.
3) run this sql query: delete from hpmxautomationtaskresults
4) run this sql query: delete from hpmxjob
5 run mxconfigrepo ├в f
6) restart SIM service

Hope this helps.
Alpha_1_1
Valued Contributor

Re: Cannot access HP SIM-how to clear events directly from databse

Thanks Eddie,
Prior to your reply I accessed the SQL database using SQL SERVER MANAGEMENT STUDIO.
I opened the table dbo.trapData in the HP SIM database Insight_v50.0.152452240 and ran the truncate command against the table - truncate table dbo.trapData;
This appeared to do the trick as I was able to start HP SIM sucessfully.The only downside is that I can no longer see "All Events" in the HP SIM webpage.The screen remains blank for ages and then I get a message saying java.lang.NullPointerException.
I can select a server and browse to its individual events but I have somehow messed up the "All Event". I have a call open with HP and I will update ifs its resolved satisfacorily
GTS I&O - "In the Server Room, no-one can hear you scream..."
David Claypool
Honored Contributor

Re: Cannot access HP SIM-how to clear events directly from databse

Yup. Opening up the database for anything but a read operation can corrupt it. Make a backup copy of the database and run 'mxconfigrepo -r' to have it put itself back together again.
Alpha_1_1
Valued Contributor

Re: Cannot access HP SIM-how to clear events directly from databse

Hi All,
I have resolved my problem with help from HP.
Make sure you have a backup of your database.
Events/Traps are represented in the SQL database as Notice Severities.

Notice Severity
1 = Discovered System
5 = Critical
4 = major
3 = minor
100 = information
***Important Note: Type 1 must not be deleted, otherwise SIM won't work***

In my case I was trying to delete informational events from the database.
I stopped the HP SIM service first
I then browsed to the HP SIM database using Microsoft SQL Server Management Studio .
I drilled down to the HP SIM database Insight_V50_0_152452240.
I highlighted the database and using a right-hand click opened up New Query.
For people with no database experience like me this is where you execute SQL commands.

I typed in the following command using the exact syntax below

delete from notices where ((noticeType != 1 ) and (noticeSeverity = 100) )

I then selected execute to run the query.Hitting the enter button does nothing.You have to select Execute.
The query took ages to run .When it completed I got a message saying over 1.2million informational events had been deleted.That seems alot of events to me.

If I wanted to delete other types of events the queries to run would be -

To delete critical events run
delete from notices where ((noticeType != 1 ) and (noticeSeverity = 5) )
To delete Major event run
delete from notices where ((noticeType != 1 ) and (noticeSeverity = 4) )
To delete Minor events run
delete from notices where ((noticeType != 1 ) and (noticeSeverity = 3) )

HP recommend running the command mxconfigrepo -f after deleting events from the database.
This is run from the Command Prompt on your HP SIM Server - C:\Program Files\HP\Systems Insight Manager\bin
However according to the HP SIM Command Line Reference Guide this command is automatically run when the HP SIM service is started.

Once I restarted HP SIM I checked the All Events tab .This time HP SIM was able to display All Events no problem.

I believe all my problems started when one dodgy server was constantly bombarding my HP SIM server with generic traps.This "Trap Storm" flooded my HP SIM SQL Database over a period of time until it got so much HP SIM could not
function correctly.
Thanks to all who gave their input.
GTS I&O - "In the Server Room, no-one can hear you scream..."
Alpha_1_1
Valued Contributor

Re: Cannot access HP SIM-how to clear events directly from databse

See solution above
GTS I&O - "In the Server Room, no-one can hear you scream..."