Riya_Roy Absent Member.
Absent Member.
4183 views

Deleting OMW event from database

Jump to solution

Hi Experts,

 

We have OMW 9.0 in our environment integrated with BSM 9.01 for event and topology integration.

 

Is there any command to delete OMW acknowledge events from database?  Is there any way to check how many events are in queue of OMW ?

Also please suggest command to delete active events directly from OMW database.


 

Please suggest.

 

Regards,

RiYa RoY

Regards,
Riya Roy

Ship in harbor is safe -- but that is not what ships are built for …
0 Likes
1 Solution

Accepted Solutions
Riya_Roy Absent Member.
Absent Member.

Re: Deleting OMW event from database

Jump to solution
Hello Vidyasagar / Ram / AkimovDenis ,

Thanks a lot for your valuable inputs throughout this thread.

Operational Activity

Step 01:- Archive events other than acknowledge events
ovowmsgutil -dnl D:\Events\test -exp "State <> 4"

Step 02 :- Acknowledge from particular date :-
ovowmsgutil -ack -exp "TimeOfStateChangeTimeStamp < '2012-06-01'"

Step 03 :- Delete Message which are acknoledged in step 02

ovowmsgutil -del -exp "State = 4 AND TimeOfStateChangeTimeStamp < '2012-06-01'"

Thanks 🙂
Regards,
Riya Roy

Ship in harbor is safe -- but that is not what ships are built for …

View solution in original post

0 Likes
12 Replies
AkimovDenis Valued Contributor.
Valued Contributor.

Re: Deleting OMW event from database

Jump to solution
opcdelmsg [ -help ] | [-o][ -u <user name> ] <msg id> [<msg id>]

Removes messages from the message-manager queue even while management-server processes are
running. Only messages matching all specified criteria are deleted. But you have to know ID messages/

 

And

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>

 

Messages are stored in the database and therefore they can increase the required amount of disk space when you back up the database. To reduce the backup size, use the opcackmsg and opchistdwn commands periodically for acknowledging and downloading the messages. After that you can store downloaded messages separately from the main backup.

AkimovDenis Valued Contributor.
Valued Contributor.

Re: Deleting OMW event from database

Jump to solution

Also exist command opcackmsgs - externally acknowledge active messages that have specific
message attributes

 

opcackmsgs -g <msg_group> -n <node_name> [ -l <msg_level> [ -s ] [ -o <object> ]]

 

Riya_Roy Absent Member.
Absent Member.

Re: Deleting OMW event from database

Jump to solution
Hi AkimovDenis,

Can you please give sample example how to use this syntax to delete older events from database?
Regards,
Riya Roy

Ship in harbor is safe -- but that is not what ships are built for …
0 Likes
Highlighted
AkimovDenis Valued Contributor.
Valued Contributor.

Re: Deleting OMW event from database

Jump to solution

If event is active, make 

 

opcackmsgs -g demo_wmi  -n demonode

demo_wmi -  my message group

demonode - node

 

And download  to file all messages from demonode , afte that messages remove from HPOM databes.

 

opchistdwn -node demonode -file namefile

 or

 

opchistdwn -older 0s -file /tmp/history

opchistdwn -from 01/04/00 -until 02/23/00

 

 

AkimovDenis Valued Contributor.
Valued Contributor.

Re: Deleting OMW event from database

Jump to solution

The command opchistdwn downloads the Operations (HPOM) history (=acknowledged) messages stored in the HP Operations database to a file. opchistdwn is called during the database maintenance process but
it can also be called manually. 

Acclaimed Contributor.. m_vidyasagar Acclaimed Contributor..
Acclaimed Contributor..

Re: Deleting OMW event from database

Jump to solution

Hello Riya,

 

In OMW to download the messages refer the ovowmsgutil.txt under "%ovinstalldir%/support".

 

This utility will help you out.

- Vidyasagar Machani -

Tell me and I forget. Teach me and I remember. Involve me and I learn. -- Benjamin Franklin
Riya_Roy Absent Member.
Absent Member.

Re: Deleting OMW event from database

Jump to solution
Hi Team,

I will check above options & surely get back to you.

Thank you so much,
Regards,
Riya Roy

Ship in harbor is safe -- but that is not what ships are built for …
0 Likes
Ram_21 Contributor.
Contributor.

Re: Deleting OMW event from database

Jump to solution

Hello

 

Is there a reason why you want to delete messages directly from database?

 

You can do this using ovowmsgutil tool from OMW server (it will stop OMW services) like already suggested. This is bit tricky thing to do for you are also trying to delete active messages. So plan this out to avoid unintended consequences.

 

Regards
Ram

Riya_Roy Absent Member.
Absent Member.

Re: Deleting OMW event from database

Jump to solution
Hi Ram,

Thanks for your inputs.

Can you please share command for below requirements.

1) architrave events before 1st May 2012
2) delete the archive events before 1st May 2012 from DB.

Please share command how I can achieve the same using ovowmsgutil.

Thanks..
Regards,
Riya Roy

Ship in harbor is safe -- but that is not what ships are built for …
0 Likes
Ram_21 Contributor.
Contributor.

Re: Deleting OMW event from database

Jump to solution

Hello

 

Check the OMW Online help topic "ovowmsgutil" for it gives you details of using this binary with examples tha twill meet you rneeds as well.

 

Note this command will stop OMW services and so you do plan for it. Also if you delete messages it is permanent one way action.

 

Hope this helps.

Regards
Ram

Acclaimed Contributor.. m_vidyasagar Acclaimed Contributor..
Acclaimed Contributor..

Re: Deleting OMW event from database

Jump to solution

Hello Riya,

 

First in the command prompt navigate to the %installdir%/support directory.

Ex: D:\HP\HP BTO Software\support

 

(1) For downloading the messages :

 

ovowmsgutil -dnl c:\old_messages -exp "TimeOfStateChangeTimeStamp < '2012-05-01 00:00:00'" -cp UNICODE -sep ;

 

This will create old_messages directory and under the files will download.

 

(2) For deleting the acknowledge messages

 

ovowmsgutil -del -exp "TimeOfStateChangeTimeStamp < '2012-05-01 00:00:00'"

 

This will delete the old messages from the database.

 

Note : Both OvEpMessageActionServer and OvEpStatusEngine services will be stopped and once completed services will be started automatically during this. Hence do it during non production hours.

- Vidyasagar Machani -

Tell me and I forget. Teach me and I remember. Involve me and I learn. -- Benjamin Franklin
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.