Tuesday, 9 June 2015

HP OMU OML OMW: Deleting event from HPOM database

Deleting messages from OMW:

Archive events other than acknowledge events:
ovowmsgutil -dnl h:\history\messages -exp "State <> 4"

Acknowledge from particular date :
ovowmsgutil -ack -exp "TimeOfStateChangeTimeStamp < '2015-04-01'"

Delete Message which are acknoledged in step 02:
ovowmsgutil -del -exp "State =  4 AND TimeOfStateChangeTimeStamp < '2015-04-01'"

Deleting messages from OMU and OML:

The first step:
opcackmsgs -g demo_wmi  -n demonode
Then:
opchistdwn -older 0s -fi le /tmp/history
or
opchistdwn -from 02/01/15 -until 03/22/15




bash-3.2# opchistdwn -h
opchistdwn [-older <time crit>][-file <file>][-no_orphan][...]
-older <crit time>:      Only download messages that have been acknowledged for
                         longer than <time crit>
                         (Default: Use the values configured in the GUI)
-file <file>:            Write history messages to specified file
                         (Default: Use the values configured in the GUI)
-no_orphan:              Do not remove unused entries in the opc_node_names table
-no_delete:              Do not delete messages from the database
-node <node>:            Only download messages from node <node>
-not_node <node>:        Don't download messages from node <node>
-ngrp <nodegrp>:         Only download messages from nodegroup <nodegrp>
-not_ngrp <nodegrp>:     Don't download messages from nodegroup <nodegrp>
-application <appl>:     Only download messages with application <appl>
-not_application <appl>: Don't download messages with application <appl>
-msggrp <msggrp>:        Only download messages with messagegroup <msggrp>
-not_msggrp <msggrp>:    Don't download messages with messagegroup <msggrp>
-object <obj>:           Only download messages with object <obj>
-not_object <obj>:       Don't download messages with object <obj>
-service <svc>:          Only download messages with service <svc>
-not_service <svc>:      Don't download messages with service <svc>
-severity <sev>:         Only download messages with severity <sev>
                         (one of: normal, warning, minor, major, critical, unknown)
-not_severity <sev>:     Don't download messages with severity <sev>
                         (one of: normal, warning, minor, major, critical, unknown)
-from <mm/dd/yy>:        Only download messages since a receiving time of <mm/dd/yy>
-until <mm/dd/yy>:       Only download messages until a receiving time of <mm/dd/yy>

No comments:

Post a Comment