EM CLI Standard
The Enterprise Manager Command Line Interface (EM CLI) enables users to access Enterprise Manager functionality through a command-line interface or scripts. This is used by the NMS Monitor to communicate with the Enterprise Manager in order to read site operation plans and to request failover between sites.
Download
The CLI can be downloaded from an installed enterprise manager from the main page by navigating to Setup -> Command Line Interface or by using the following URL:
https://<hostname>:7803/em/faces/core-emcli-emcliDownload
Where <hostname> is the host that the Enterprise Manager is installed on.
The web page carries a link to the emclikit.jar which should be downloaded to each server running NMS Monitor.
Installation
In order to install the CLI, you must first create its home directory. In this example we will may the CLI home directory $ HOME/emcli. This assumes that the emclikit.jar file has previously been downloaded to the $NMS_HOME directory. Issue the following commands:
cd $ HOME
mkdir emcli
java –jar emclikit.jar –install_dir=emcli
Setup
Once the CLI has been installed it must be setup. Issue the following commands to setup the CLI:
cd emcli
emcli setup -url=https://<hostname>:7803/em -username=<username>
where <hostname> is the name of the server on which the Enterprise Manager is deployed and <username> is the administrator user name for the Enterprise Manager. If using multiple Enterprise Manager instances, each NMS monitor instance must be configured to use the Enterprise Manager instance at its own site.
Configuring NMS Monitor
Each NMS Monitor instance must be configured to use the CLI, specifically the CLI home and the credentials used to login to the Enterprise Manager must be configured. More details on this can be found in the NMS Monitor chapter.