Monday, 1 June 2015

HP OMU OML: How to set installed flag for all agent in the database HP Operations Manager HPOM

bash-4.0# cat /tmp/akimov/opcsw-installed_all.sh
#!/bin/sh
for i in  `/opt/OV/bin/OpC/utils/opcnode -list_nodes |grep Name|awk '{print($3)}'`
do
opcsw -installed $i
done


Hwo to used opcsw:
Usage: opcsw [ -help ] [ -installed | -de_installed | -get_nodeinfo | -license_set | -license_free | -package_type | -create_inst_info ] [ -all | [ -nodegrp <group>... ] <node>... ]


pcsw - set software status in HP Operations Manager database

Synopsis
opcsw [ -help ]
        [ -installed | -de_installed | -get_nodeinfo |
            -license_set | -license_free | -package_type
            -create_inst_info ]
        [ -all | {-nodegrp <group>}... | <node>... ]

Description
The command opcsw sets the software status flag in the HP Operations Manager (HPOM) database.
The IP address of the specified node will always be returned on standard output in hexadecimal presentation <hex_address> unless the -help option has been specified.
If called without any option (except node name), only the corresponding IP address will be returned.
Options
Any unique prefix can be specified for the available options.

-create_inst_info
    Generates configuration settings file containing the configuration defaults for each managed node <node_specifier>. Configuration settings file is created in the following location:

        /var/opt/OV/share/tmp/OpC/distrib/<hex_IP_addr>.i
        (where <hex_IP_addr> stands for the node's IP address in hexadecimal notation)

    This file is automatically copied to the target node during agent software installation from Management Server or can be used for manual agent installation.

    Default values in agent profile are:

        CORE_ID
        MANAGER
        MANAGER_ID
        CERTIFICATE_SERVER

    It is possible to specify additional values in your agent profile, in the /etc/opt/OV/share/conf/OpC/mgmt_sv/bbc_inst_defaults file.

-help
    Print usage message of opcsw. All other options are ignored.

-installed
    Inform the HPOM database that the HPOM software has been successfully installed on the Managed Node.

-de_installed
    Inform the HPOM database that the HPOM software has successfully been removed from the Managed Node.

-get_nodeinfo
    Provide the node specific configuration file in /var/opt/OV/share/tmp/OpC/distrib/<hex_address>.n. This file will be transmitted as soon as the Distribution Agent of the related Managed Node requests for new configuration data (for example, when re-starting the HPOM Agents on that system).
    The file <hex_address>.n will be placed into the node-specific configuration directory using the filename nodeinfo.

-license_set
    Inform the HPOM database that the Managed Node is licensed.

-license_free
    Inform the HPOM database that the Managed Node is not licensed.

-package_type
    Get the package type of the specified nodes.

    Possible value: RPC_BBC.

-all
    Perform administration on all systems belonging to this HPOM environment.

-nodegrp <group>...
    Perform administration on all systems belonging to the HPOM node group(s). The <group> name must reflect the name specified in the HPOM Node Group Bank.

<node>
    Hostname or list of hostnames of Managed Node(s) the operation should be applied on.

Exit Values
This command will exit with value 0 after successful operation. In case of errors, 1 will be returned and a descriptive text will be displayed on standard error.

Restrictions
This command can only be issued by user root.
The order of options is important: the options defining the operation must be specified before the options defining the target.
This command may only be called for manual software installation / de-installation purposes, otherwise the required functionality will be applied automatically!

Examples

Inform the HPOM database that the HPOM agent software has been successfully installed on all Managed Nodes in this HPOM environment:

    opcsw -installed -all

Get the node specific configuration file for node fancy.ben.kape.com:

        opcsw -get_nodeinfo fancy.ben.kape.com
        f8878a1 (returned value on standard output)

From bbc_inst_defaults (bbc.cb.ports):


    (In the domain bbn.hp.com, ovbbccb runs on all nodes on port 1111, excluding the management server where the default port 383 is used.)

No comments:

Post a Comment