Tuesday, 11 November 2014

HP OMU OML 9.20: opcragt

opcragt - remotely administer agent processes on HP Operations Manager
managed nodes
opcragt [ -help ]
        [ -update ]
        [ -running_as_user ]
        [ ( -start | -stop | -status | -primmgr | -cleanstart ) [-id <subagent_id>] ]
        [ -init_install <inst_server> <architecture> <version>
                        <account_password> <inst_drive> ]
        [ -distrib [ -policies ] [ -templates ] [ -instrum ] [ -actions ]
                   [ -monitors ] [ -commands ] [-subagts ]
                   [ -force | -purge ] [ -highprio ]
                   [ -simulate ] ]
        [ -subagent ( -install | -uninstall | -reinstall |
                      -active ) <subagent policy name> ]
        [ -agent_version ]
        [ -version ]
        [ -get_config_var [<namespace>:]<config_var> ]
        [ -get_config_var <namespace>: ]
        [ -set_config_var [<namespace>:]<config_var>=[<value>] ]
        [ -timeout <timeout> ]
        [ -all | [ -nodegrp <group>... ] <node>... ]
The command opcragt remotely administers the agent processes running on the managed nodes of HP Operations Manager (HPOM) from the HPOM management server.
If called without any option, opcragt returns the current status of all agent processes on the specified system(s).


NOTE, the ovcd and ovbbccb processes must be running on the managed nodes, otherwise the HPOM management server cannot access the agent processes remotely.
NOTE: Some functionality is only enabled if the config setting OPCRAGT_USE_THREADS is set to TRUE, as described below.
-help
Display usage message of opcragt.
All other options and parameters are ignored.
-update
Get latest node-specific configuration from HPOM management server and re-initialize all configured HPOM agents on the specified system(s).
-running_as_user
Display the ID of the user as which the agent is running.
-start
Start or restart configured agents on the specified system(s).
-stop
Shut down (stop) configured agent processes except ovcd and ovbbccb process on the specified system(s).
-status
Get current status of the agents on the specified system(s), grouped by subagent_id. Agents can be in state "running" or "isn't running".
-primmgr
Informs the agents on the specified system(s) to change the HPOM primary manager to the calling HPOM management server.
-cleanstart
Remove all files in the agent's temporary directory. Start or restart configured agents on the specified system(s). trace and pids files are not removed. <subagent_id> is ignored.
-id <subagent_id>
Perform administration on subagent(s) belonging to the <subagent_id>. If no<subagent_id> is specified, administration will be performed for all subagents.
-init_install <inst_server> <architecture> <version> <account_password>
<inst_drive>
Install HPOM Windows NT/2000 agent software on specified node from the<inst_server><architecture> specifies the architecture of the system to install, for example 'ms/intel/nt'.
-distrib
Distribute HPOM configuration. Distributes all (policies, templates, commands, monitors, actions and category based instrumentation), if no other option is set.
-policies
Distribute or update policies.
-templates
Distribute or update message source templates, including threshold monitor templates.
-commands
Distribute or update the configured commands.
-monitors
Distribute or update threshold monitor scripts.
-actions
Distribute or update the configured actions.
-instrum
Distribute or update the category based instrumentation.
-subagts
Install all configured, but not yet installed subagents, on specified node. Force option has no effect on subagent installation.
-force
Force the update of the configuration (subagents are not included in the update). The data is transferred even if it exists already on the node.
-purge
Use this option for removing the instrumentation data from the managed node. Be aware that instrumentation data is cumulated on managed nodes by default.
-highprio
Use this option for mission-critical configuration deployment. This option will ignore limitations set on the number of simultaneous deployments and immediately trigger the deployment to the specified node. Please note that only one target can be specified when using this option.
-simulate
When this option is used along with -distrib, opcragt will display the files that will be deployed to the managed node, but no actual deployment will be done. Simulation will take in consideration any additional options passed along with -distrib. Please note that a message saying that deployment has been successful will be logged in System.txt. This message can be disregarded.
-subagent
Install, uninstall or reinstall configured subagents on specified node. The <subagent name> should match the name of the subagent policy. In case the two names do not match the subagent handling would have to parse all the subagent policies assigned to the node to find the matching subagent policy.
-install
Install subagent on specified node.
-uninstall
Uninstall subagent from specified node.
-reinstall
Reinstall subagent on specified node. Subagent is first uninstalled from node and then installed again.
-active
Mark subagent as installed on specified node in the database.
-agent_version
Return the version number of the HPOM agent software that is currently installed on the node.
-version
Return the version number of the opcragt tool.
-get_config_var [<name_space>:]<config_var>
Return the setting of the configuration variable specified in <config_var> in the namespace specified in <name_space>. If the namespace is omitted, it defaults to "eaagt". For example eaagt:OPC_IP_ADDRESS is the same as OPC_IP_ADDRESS.
-get_config_var <name_space>:
Return all variable names and values of namespace <name_space>. Note: this feature is only enabled when setting on HPOM server side the config variable OPCRAGT_USE_THREADS to TRUE.
-set_config_var [<name_space>:]<config_var>=[<value>]
Set the configuration variable specified in <config_var> to the value specified in <value>in the namespace specified in <name_space>. If the namespace is omitted it defaults to "eaagt".
-timeout <timeout>
Use a timeout of <timeout> seconds per node. If the operation for a node is not finished within the time specified by <timeout>, it is considered as failed and "cancelled (timeout)" is written as failure reason. Default timeout is 10 Minutes.
-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>...
System or list of systems where administration will be performed. If no system has been specified the local system will be used. The system can be specified in following ways:
<short_sysname>
Short system name as returned by `uname -n` (e.g., opcagt).
<hostname>
Fully qualified system name as returned by `hostname` (e.g., opcagt.prod.your.com).
<IP_addr>
IP address using the standard representation (e.g., 12.132.123.3).
#<hex_IP_addr>
IP address using its hexadecimal representation (e.g., #f8f78a1).
'$MGMTSV'
Distribute to the management server itself. This can only be used to distribut Event Correlation policies to the management server itself. It is important that this is quoted, so that the shell doesn't replace it as a variable.
This command will exit with value 0 after successful operation; otherwise the exit value will be set to 1 and an appropriate message will be displayed on stderr.
This command can only be issued by the user root.
This command is only available on the HPOM management server.
If you want to distribute the nodeinfo file to a managed node, you must first create the file with the command opcsw -get_nodeinfo <nodename>, before you can distribute it with opcragt -distrib <nodename>.
After having set a configuration variable with -set_config_var, the agents must normally be restarted for the new values to take affect.
Some functionality is only enabled when setting OPCRAGT_USE_THREADS to TRUE (commandovconfchg -ovrg server -ns opc -set OPCRAGT_USE_THREADS TRUE) on the HPOM management server. In detail that's:
The HPOM managed nodes are contacted in parallel (default is to use 50 threads, can be adapted via config setting OPCRAGT_MAX_THREADS). If OPCRAGT_USE_THREADS is not set, the agents are contacted serially.
Options -start, -stop, -status, -primmgr, -get_config_var, -set_config_var and -agent_version are handled multi-threaded, others are not.
Unreached agents are listed with their FQDN in the logfile /var/opt/OV/share/tmp/OpC/mgmt_sv/opcragt-<command_option>-failed.log Whereas <command_option> is one of the supported options for multi-threading as listed above (status, start, stop, primmgr, ...). The next call with the same option overwrites the log output from the previous.
The -get_config_var mode to show complete namespaces is also bound to the config setting OPCRAGT_USE_THREADS TRUE.
Start all agent processes on system 'sales' and 'opcagt.prod.your.com':
opcragt -start sales opcagt.prod.your.com
Stop all agent processes (except the ovcd and ovbbccb) on system 12.132.123.3:
opcragt -stop 12.132.123.3
Determine current status of all systems belonging to this HPOM environment:
opcragt -status -all
Distribute/update policies and monitors to/on system 12.132.123.3:
opcragt -distrib -policies -monitors 12.132.123.3
Distribute the Event Correlation policies to the management server itself:
opcragt -distrib -policies '$MGMTSV'
Force distribution of commands to all managed nodes in this HPOM environment:
opcragt -distrib -commands -force -all
Set the primary HPOM manager on all systems belonging to the HPOM node group hp_ux:
opcragt -primmgr -nodegrp hp_ux
Return the version number of the HPOM agent software that is currently installed on node 'opcagt.prod.your.com':
opcragt -agent_version opcagt.prod.your.com
Return the value of OPC_LE_SAVE_STATE configuration setting from eaagt namespace on node 'opcagt.prod.your.com':
opcragt -get_config_var eaagt:OPC_LE_SAVE_STATE opcagt.prod.your.com
Set the OPC_LE_SAVE_STATE configuration setting in eaagt namespace on node 'opcagt.prod.your.com' to the value 'TRUE':
opcragt -set_config_var eaagt:OPC_LE_SAVE_STATE=TRUE opcagt.prod.your.com
Reset the OPC_LE_SAVE_STATE configuration setting in eaagt namespace on node
opcragt -set_config_var eaagt:OPC_LE_SAVE_STATE= opcagt.prod.your.com
Get the installation time for all your managed nodes:
opcragt -get_config_var OPC_INSTALLATION_TIME -all
Get the bbc.http namespace settings for all your managed nodes:
opcragt -get_config_var bbc.http: -all

No comments:

Post a Comment