Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing IML entries

 

Clearing IML entries

I inherit a large system with different management agents. I have a lot of ambers and yellows. I like to clean them all up and start fresh. It is slow going one by one. Is there anyway to automate the process with a script. Can someone point me in the right direction

 

 

P.S. This thread has been moved from ITRC server mgmt (Insight Manager 7) Forum to ITRC HP Systems Insight Manager Forum - HP Forums Moderator

12 REPLIES 12
David Claypool
Honored Contributor

Re: Clearing IML entries

Assuming you want to clear (delete) the Integrated Management Log, you can automate that the the Integrated Management Log Viewer. It should be installed if the ProLiant Support Pack was used to install the server or to apply an update. cpqimlv has the ability to take arguments from a command line so you can build it into a batch file, and even automate it by calling it from IM7 or hpSIM.

Find cpqimlv.exe in "C:\Program Files\Compaq\Cpqimlv"

Arguments:

Command-line arguments
A GUI-less mode with command-line arguments has been added to allow the use of this utility from a batch file. As the commands are executed, feedback will be provided through success and error messages written to a log file. No display will be generated. You must have administrator level privileges to run this utility with command-line arguments.
Parameters:
/? - Displays this help topic.
/f:filename - Specifies the file for status logging. This parameter is optional; if it is not specified, a default filename of cpqimlv.log will be used. If the .LOG extension is not given, it will be added to the log filename.

/m:machine - Specifies the machine to connect to. This parameter is optional; if it is not specified, the local machine will be used.
/p[:filename] - Print the Integrated Management Log (IML) entries. If filename is specified, the information will be printed to that file; otherwise, it will be printed to the default printer.

/save:filename - Save the IML entries to a binary file specified by filename. The binary file can be read back into the viewer later. If the .IML extension is not given, it will be added to the filename.

/export:filename - Export the IML entries to a comma separated file specified by filename.

/clear - Clear all entries from the IML. Note that this is a data destructive action, and should be accompanied by one of the following actions: /save, /p, or /export. The utility will execute the Clear command last, regardless of the order of the parameters on the command line; this is to ensure that the data in the IML has been preserved in some form before it is cleared.

/ackalerts - Acknowledge pending alerts on the Integrated Management Display (IMD). This will clear any currently pending alerts from the system's IMD; however, when new alerts are received the IMD will begin flashing again.

/note:msg - Add a maintenance note to the IML. msg must be enclosed in double quotes, and must be between 1 and 228 characters (inclusive) in length.

Example:
To save the IML entries to the file TEST.IML and then clear the log on machine TEST:

cpqimlv.exe /m:test /save:test.iml /clear
BNewby
Frequent Advisor

Re: Clearing IML entries

This is a very helpful post, but I would like to build on it.

In our environment, we like to "repair" any critical or caution alarms in the IML when a PSP/ROM is performed. Is there a way to script the repair of all caution or critical alarms? I could easily change the csv file, however I don't believe that will update the IML data on the MB.

Or do we have to resort to clearing the entire IML, losing all previous data?

Thank you in advance!
Tom McGuigan
Frequent Advisor

Re: Clearing IML entries

I have same problem - I don't want to clear/delete the IML. Instead, I want to automate/script execution of "Mark all items repaired" aka "acknowledge all alerts", leaving the logs intact otherwise on many servers. The problem is that when I run cpqimlv with the /ackalerts option, I get back "Unable to acknowledge pending alerts on the Integrated Management Display." Any workaround?? I can, of course MANUALLY log onto each server's agent and MANUALLY click the "Mark all items repaired" button. However, there are far to many servers, that need this, far to frequently.

I have no problem with CLEARing (and deleting) all alerts. How can I automate the non-destructive task of acknowledging all alerts?
Thanks,
Tom
BNewby
Frequent Advisor

Re: Clearing IML entries

Is there a way to log an enhancement request with the ProLiant Support Pack team? It looks like this is a common request and would benefit from this feature.

Thanks
Tom McGuigan
Frequent Advisor

Re: Clearing IML entries

Still stuck "Unable to acknowledge pending alerts on the Integrated Management Display" when attempting to run cpqimlv.exe with the /ackalerts option. Any ideas??
Tom McGuigan
Frequent Advisor

Re: Clearing IML entries

Ok, I did some digging and found what appears to be the object and method needed to repair all IML entries via script (I verified the execution of the RepairAll method against a test server using WMI CIM Studio (a manual proof of concept) - and it worked! Now to create a script to automate it...more later!).
To Repair an entire IML (all records), use Method: RepairAll targeting (via script);
\root\HPQ\CIM_ManagedElement\CIM_ManagedSystemElement\CIM_LogicalElement\CIM_EnabledLogicalElement\CIM_Log\CIM_RecordLog\HP_CommonRecordLog\HPQ_CommonRecordLog

Note; Attempts to repair single IML records (1 at a time) fails. Bug? No matter. The RepairAll is what is needed anyway.
Tom McGuigan
Frequent Advisor

Re: Clearing IML entries

Ok,
Here is the tested/working script to automatically CLEAR ALL IML ALERTS on any specified target machine(s)...enjoy!!
Tom

'This VBScript code is used to REPAIR all IML records (NO DELETIONS).
'strComputer = " or "
strComputer = WScript.Arguments.Item(0)
' strNamespace = "\root\hpq\CIM_ManagedElement\CIM_ManagedSystemElement\CIM_LogicalElement\CIM_EnabledLogicalElement\CIM_Log\CIM_RecordLog\HP_CommonRecordLog"
' HPQ_CommonRecordLog
strNamespace = "\root\hpq"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & strNamespace)
Set colCommonRecordLog = objWMIService.ExecQuery("Select * from HPQ_CommonRecordLog")
Wscript.Echo "Repairing the record logâ ¦"
For Each objCommonRecordLog in colCommonRecordLog
objCommonRecordLog.RepairAll()
Next
Tom McGuigan
Frequent Advisor

Re: Clearing IML entries

Note; the prior script RESETS ALL IML ALERTS ("CLEAR" = delete in HP Speak).
BNewby
Frequent Advisor

Re: Clearing IML entries

Does this require HP Insight Management WBEM Providers? I can't find \root\hpq... with WMI Explorer. What is the class name?

Thanks Marty, this is a great start I just need to find out what is required for my environment