Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Creating and Uploading Policies

News HP HPOM Policies Recommended Links Reference Version Management Comparing Policies
Creating and Uploading Policies Listing policies installed on the node Removal of policies Assigning Policies Deploying Policies How to find out which policies are associated with the particular node
Policy Groups Default Policy Groups node groups Layout groups Message groups Policy Files Naming Conventions
Troubleshooting Event Correlation Actions History Humor Etc

Policies can be added to HPOM in several way:

Direct upload of policies:

Policies can be uploaded to the HPOM repository directly using opcpolicy command line tool. It allows upload of single or multiple policies.

If multiple policies are to be uploaded, they should be located in the same directory and follow the naming schema rules.

An example of uploading a single policy using opcpolicy command line tool:

# opcpolicy –upload \ file=970FF268-24FA-4f03-9E48-339E2F9A3827_header.xml

If multiple policies are located in directory /tmp/policies, they can be uploaded using the following command:

# opcpolicy -upload dir=/tmp/policies

Any files that do not conform to the policy files naming schema will be ignored.

Upload of policy data downloaded from another HPOM server

Transfer of policies from one HPOM server to another can be accomplished using opccfgdwn (download) and opccfgupld (upload)tools.

Refer to the opcpolicy (1M) and opccfgupld (1M) reference pages for moreinformation about command options. For more information aboutavailable policy-related APIs refer to the HPOM Developer’s Referenceguide.

Registering Policy Types

The policy type must be known on the HPOM server before policy of that type is registered. This is performed by using the opcpoltype commandline tool, for example:# opcpoltype -reg -xml /var/conf/poltypes.xml

Input for opcpoltype is an XML file, which describes the policy types registered on the HPOM server. If you specify the -dir option, all files with the .xml extension in thespecified directory are processed, and treated as policy type registrationfiles. Refer to the opcpoltype (1M) reference page for more information aboutthe opcpoltype command options. For information about policy type registration using APIs, refer to the HPOM Developer’s Reference.

NOTE A new policy type should be registered before any policy of that type is uploaded. If you attempt to upload a policy of an unknown type to themanagement server, an error is returned. Once the new policy type isregistered, policies of that type can be uploaded and later deployed to theHPOM server.The following is an example of the XML registration file:

<policyTypeList>

<policyType>

<policyTypeName>Special-log</policyTypeName>

<policyTypeAgentType>le</policyTypeAgentType>

<policyTypeUUID>E8405458-2970-4DB7-825C- \816B3FBF11FE</policyTypeUUID>

<policyTypeEditor>/usr/local/bin/specedit \-argument</policyTypeEditor>

<policyTypeCallbacks>

<edit>/usr/local/bin/speccopy</edit>

<deploy>/usr/local/bin/specadapt</deploy>

</policyTypeCallbacks>

<policyTypePolicy>/usr/local/policys/ \special-log.tmpl</policyTypePolicy>

</policyType>

</policyTypeList>

NOTE Any number of policy types can be registered in a single policy type registration file.

# opcpolicy -download pol_name="Oracle messages" pol_type="Open_Message_Interface" version=1.0 dir=/tmp

For more information about the parameters available with theopcpolicy command, refer to the opcpolicy (1M) reference page.

Changing Policy Attributes

To change policy attributes such as description or policy body syntax, use the opcpolicy command line tool with -update option. opcpolicy canonly be used to modify attributes that are part of the policy header andwill not affect the contents of the policy bodies. For a list of the attributes that can be changed, refer to the opcpolicy (1M) reference page.

Changing the Policy Syntax Versions

Each policy type can have a different syntax version. If the syntax version is not specified in the command line arguments when registering a new policy, it is set to the default,

1.You can change the syntax version of a policy by using the opcpolicy-update option with syn=<syn> argument set, for example:

# opcpolicy -update syn=<policy_syntax_version>HPOM Configuration

NOTE After editing a policy, its syntax version is not changed by default. It canbe automatically changed with the opcpolicy -syn command withincheck callback. If you want to change the syntax version manuallywithout using the check callback, you must do it before the nextdeployment. Otherwise, the policy will be deployed with an old syntaxversion.Refer to the opcpolicy (1M) reference page for more information aboutthe opcpolicy command options.

Migrating HPOM 8.xx Policys to HPOM 9.0x Policies

To migrate policys from HPOM 8.xx to HPOM 9.0x, use the opccfgupld utility with the -replace parameter as follows:

# opccfgupld -replace [-subentity]

When migrating policies, note the changes in the directory structureused for the upload and the download operations.

For example:❏ HPOM 8.xx: <upload_path>/POLICYS/*(also includes <upload_path>/POLICYS/TEMPLGROUPS)❏ HPOM 9.0x: <upload_path>/POLICIESand<upload_path>/POLICYGROUPS

For more information about the opcdfgupld command and permittedparameters, refer to the opccfgupld (1M) reference page.

NOTE If the HPOM policy checksum comparison finds version 1.0 policies are identical, the upload is skipped. In the event that policies with the same version number have different contents, you can use the -add |-replace [-subentity] parameter to add a new policy version or replace the existing version.HPOM Configuration

Policy Assignment Tasks in HPOM

Table 2-9 lists policy-related tasks and operations provided with HPOMfor Windows 8.xx, HPOM for Unix 8.xx and 9.0x, and HPOM on Linux 9.01. The comparison can help you to get a clear overview of the scope ofassignment tasks, and to enhance the interoperability among theseproducts. Refer to the HPOM Administrator’s Reference for moreinformation about HPOM interoperability.