HP Systems Insight Manager 5.3 Command Line Interface reference guide

Example 7
To add the passwords
myPw1
and
myPw2
with the values
myPw1Value
and
myPw2Value
, enter mxpassword
-a -x myPw1=myPw1Value -x myPw2=myPw2Value.
Example 8
To check if the HP SIM keystore exists, enter mxpassword -c. A typical result is Keystore exists.
mxquery
Adds, lists, modifies, execute, or removes queries in HP SIM.
Synopsis
mxquery -a -f filename [–x force]
mxquery -m -f filename
mxquery -r queryname...
mxquery -r -f filename
mxquery -e queryname [-x xml]
mxquery [-l n|t] [ queryname... ]
mxquery -lf [-b encoding ] [-x query ] [ queryname... ] [-x cat ]
mxquery -l cat
mxquery -l crit
mxquery -l mode criterianame
mxquery -l val criterianame
Description
mxquery allows you to add, list, modify or remove queries in HP SIM.
IMPORTANT: Using mxcollection is preferred over using category with mxquery. Using cat will
still work for mxquery, but you should switch to mxcollection for creating and manipulating collections
(previously known as categories).
mxquery -a -f filename [-x force]
This command allows you to add queries. Query information is provided in a query definition file (see
mxquery(4)) and allows you to add one or more queries.
During an add operation, HP SIM adds only the queries whose names do not reference existing queries
in the database. If a duplicate query is detected, it is skipped, and all non-duplicate queries are added.
Skipping duplicate queries does not affect the return value.
Optionally, you can specify the force flag, which instructs the system to add a query's criteria even if
there is not a database entry corresponding to the criteria value. This affects only criteria values that
are selected from a list of values stored in the database, such as system names.
mxquery -l val CriteriaByEventType
This command allows you to view a list that includes sub categories for the event types when applicable.
For the mxquery -a -f filename CLI (create a query), you can use mxquery -l val
CriteriaByEventType which lists all the possible event types. Each element represents a single
event type containing a category, a sub category, and an event type. This is the event type value string
which is used when creating an event query based on event type criteria.
Note: when creating a query, the event type value string must match what is listed in the output from
the previous mxquery -l command. The value string is case sensitive. All categories, subcategories,
and event type strings must be unique within HP SIM.
Example 7 71