ovowmsgutil utility =================== This utility allows to

advertisement
ovowmsgutil utility
===================
This utility allows to perform bulk operations on messages offline
without using the POM for Windows console. Following operation types are
possible:
* Changing the state of messages ( own, unown, acknowledge, unacknowledge ).
* Changing the severity of messages.
* Deleting messages from the Management Server Database (openview).
* Downloading of messages, related annotations and related custom message attributes.
* Uploading previously downloaded messages, related annotations and related custom
message attributes.
As the utility changes the database directly and does not generate any kind of
events it automatically stops all affected POM for Windows services before the
database is updated. After the database is updated it automatically restarts
all affected POM for Windows services. This ensures that all POM for Windows
components are provided with the actual data from the database.
Benefits
--------
* For large number of messages the operations mentioned above can be performed much
faster as by using the message browser.
* Can be started offline during non-busy hours at command level.
* By using an SQL like syntax it provides a powerful and flexible method for
qualifying the messages which should match for the selected operation.
* Messages, their annotations and custom message attributes can be downloaded by
demand and later on uploaded on the same or another management server. Same SQL
like syntax as described above is used to define a subset of messages to act upon.
Messages can also be deleted during download. CSV format (MS Excel) is used for
storing messages, annotations and custom message attributes in files.
* If messages are deleted it ensures that all related information (e.g. annotations,
message key relation cache entries; custom message attributes) are deleted as well.
* Can be used as trouble shooting tool by HP support personnel and by end users in
case of database related problems (e.g. database overflow, data inconsistency caused
by manual DB manipulation).
* Fits perfectly for system testers who are developing manual or automatic test cases.
It helps to set the message/action server database to a desired state.
Operational requirements
------------------------
* Must run on a POM for Windows management server node.
* The user account under which the ovowmsgutil utility is started must meet
the following requirements:
- Must be a member of the HP-OVE-ADMINS group;
- Must have local Administrator privileges;
- Must have administrative permissions on the database.
Alternatively, add the HP-OVE-User to the local Administrators group,
and then run the tool using this user.
Sample use cases
----------------
The list below shows some sample use cases. Note that the use cases are a verbal
description of some operations and are not denoted in the SQL-like syntax.
* Acknowledge messages which were generated on some specified nodes by some
specified applications and are older than a specified date and have severity
normal.
* Change the severity for those messages which were generated by a specified
service on a specified day from minor to critical.
* Delete those messages which are still active and are older than a specified number
of days and were generated on specified nodes and have severity normal.
* Unacknowledge those messages which belong to specified message groups and which
have been acknowledged by a specified user.
* Delete all acknowledged messages.
* Delete all active and acknowledged messages.
* Download messages coming from specific nodes and fulfiling certain conditions
(state, severity, date, etc.). If needed, messages can be removed from OVO DB.
* Upload messages (previously downloaded on this or another management server).
Special considerations for node name specifications
---------------------------------------------------
As indicated in the sample use cases one of the possible message attributes for
qualifying the messages which should match for the selected operation is the node name.
Node names can be specified in different ways:
* By using the node's GUID.
* By using the node's primary node name.
* By using the node's caption.
* By using the node's communication path.
Internally the utility always uses the node's GUID for qualifying the messages. If
primary node names or captions or communication paths are specified
then the utility automatically finds out the corresponding GUIDs and uses them for
message selection.
Usage
-----
ovowmsgutil <TypeOfChange> -exp <QualifyString> [-nodedelim <DelimChar>]
OR
ovowmsgutil <TypeOfChange> -{fa|fu} <SqlFile> [-nodedelim <DelimChar>]
OR
ovowmsgutil -dnl <BaseFilename> [-remove] [-cp (UNICODE|MBYTE)] [-sep <FieldSeparator>]
-exp <QualifyString> [-nodedelim <DelimChar>]
OR
ovowmsgutil -dnl <BaseFilename> [-remove] [-cp <CodePage>] [-sep <FieldSeparator>]
-{fa|fu} <SqlFile> [-nodedelim <DelimChar>]
OR
ovowmsgutil -upl <BaseFilename> [-replace]
<TypeOfChange> Type of change you want to make. Possible values are:
-ack
Acknowledge qualified messages
-unack
Unacknowledge qualified messages
-own
Own qualified messages
-disown
-del
Disown qualified messages
Delete qualified messages
-sev <Num> Change severity of qualified messages to level <Num>.
Possible values for <Num>: 1 Unknown
2 Normal
4 Warning
8 Minor
16 Major
32 Critical
-dnl
Download a subset of messages from OVO DB.
-upl
Upload messages into OVO DB. Messages must be stored in a file, previously
generated with the -dnl option. All messages from the file will be uploaded.
<BaseFilename> Partial file name to be used for download or upload of messages, annotations and
custom message attributes. _MSG.csv, _ANN.csv and _CMA.csv will be appended to the
given name to get actual file names.
-remove
attributes
Causes removal of downloaded message their annotations and custom message
from HP Operations agent DB.
-cp
Specifies the codepage of the generated files for messages, annotations and custom
message attributews. Two values are allowed: UNICODE (for Unicode encoding) and
MBYTE (for MultiByte encoding). It defaults to MBYTE.
-sep
Sets the field separator for the resulting CSV files (defaults to comma ",").
<FieldSeparator> The field separator character to be used in the CSV files.
-replace
Causes replacment of existing messages, annotations and custom message attributes with
data from the files during upload.
-exp
Expression option to qualify messages you want to change or download.
<QualifyString> String which qualifies the messages to be changed or downloaded. Syntax
is similar to an SQL expression as used in the WHERE clause of an SQL
SELECT statement. The expression can contain the following items for
qualifying the messages:
State
Current message state. Possible values:
1 Undefined
2 Unowned
3 Owned
4 Acknowledged
5 Node of message has been deleted
6 Message is marked for deletion
TimeOfStateChangeTimeStamp Time of last state change
UserOfStateChange
NodeName
Name of user who made the last state change
Node name where the message originates from.
Possible node name specifications are one of these:
Primary node name,
Caption,
Communication path.
Above specifications have to be included between
delimiters. See -nodedelim command option below.
Alternately node GUID's enclosed between {} can be
used as well.
TimeCreatedTimeStamp
Time when message has been created
TimeReceivedTimeStamp
Time when message has been received on server
MessageGroup
Object
Application
Type
Message group
Object message associated with
Application message associated with
Message type
ServiceId
Service message associated with
Severity
Message severity. Possible values see above
LogOnly
Message is log only
Unmatched
Message is unmatched
NOTE: instead of using an expression you can specify * as ALL operator.
In this case all messages will qualify for the selected change.
-nodedelim
Optional parameter. Specifies a character which is used as delimiter
for node names. Node names have to be included between 2 delimiters.
Default delimiter is the "@" character.
If node GUID's are specified instead of node names then the GUID's have to
be included between "{" and "}" characters. For GUID's the delimiter
parameter is ignored.
<DelimChar>
-{fa|fu}
Delimiter character for node names.
Use the parameter FA or FU if the expression which qualifies the messages
to be changed is stored in a file. This makes sense for long and complex
expressions. FA specifies that the file uses WINANSI character encoding,
FU specifies that the file uses UNICODE character encoding.
<SqlFile>
Name of the file which contains the qualifying expression.
Examples:
---------
ovowmsgutil -ack -exp "(NodeName='#hpspi011#' OR NodeName='#jupiter#') AND Severity = 2" nodedelim #
Acknowledge messages originating from the nodes hpspi011 or jupiter
with severity normal. Use the # character as delimiter for node names.
ovowmsgutil -sev 32 -exp "NodeName='@sap002@' AND Application='R3' AND Type = 'Error'"
Change the severity of messages to critical which originate from node sap002 and from
application R3 and are of type Error.
ovowmsgutil -del -exp "State = 4 AND TimeOfStateChangeTimeStamp < '2000-01-31 13:45:00'"
Delete all messages which have been acknowledged before january 31st 2000 1:45:00PM.
Note: time stamps have the format "YYYY-MM-DD HH:MM:SS" or "YYYY-MM-DD".
ovowmsgutil -disown -fa "c:\Program Files\Hewlett-Packard\OvEnterprise\ExpFiles\Disown1"
Disown messages. The expression which qualifies the messages to be disowned is
stored in file "c:\Program Files\Hewlett-Packard\OvEnterprise\ExpFiles\Disown1"
The file is WINANSI encoded.
ovowmsgutil -unack -exp *
Unacknowledge all messages regardless of their state.
ovowmsgutil -dnl c:\temp\test -exp "State <> 4 AND Severity = 32" -cp UNICODE -sep ;
Download all messages (and their annotations and custom message attribututes) with
critical severity and state different than "Acknowledged". The resulting files
(c:\temp\test_MSG.csv and c:\temp\test_ANN.csv) will be saved in Unicode encoding and
the CSV field separator will be semicolon ";".
ovowmsgutil -upl c:\temp\test -replace
Upload messages, annotations and custom message attributes from c:\temp\test_MSG.csv,
c:\temp\test_ANN.csv replacing and c:\temp\test_CMA.csv any existing records in the DB
with records from the files.
Download