Database Reference
In-Depth Information
Also deploy oracle.samples.xsh2 and oracle.samples.xsh3 in the same way. Note that emcli will ask for the SYS
password during deployment and not just SYSMAN , presumably because plug-in deployment requires the SYSDBA role.
Note that emcli actually sends a deployment job in the background, and you can check on the progress by using
emcli get_plugin_deployment_status -plugin_id=oracle.samples.xsh1 .
And, finally, the culmination: adding the target type instances! You will use emcli again to avoid long navigation
through the EM12c console and multiple screenshots. For each of the three target types, use this command:
emcli add_target -name='Sample Host 1' -type=sample_host1 -host=<Existing Host Name>
-properties="sample_host1_username:<OS user>;sample_host1_password:<OS pwd>"
<Existing Host Name> is where the new plug-in will be deployed. Use the exact spelling that you see in the
EM12c console for that host target. For <OS user> and <OS pwd> , you can use Oracle user credentials (in fact, the
sample plug-in provided in EDK 12.1.0.2.0 doesn't use them at all, as it simply runs commands as the OS user running
the local management agent). Run this command for the two other plug-in versions, incrementing the index in the
name, type, and properties. You will end up with three sample host targets. They are all monitoring the same server
(the local server where the agent is running), but each provides incrementally more functionality.
To simulate the host's up/down state, the plug-ins read /tmp/hostsample_status . The target is considered
up when the content of the file is “up.” Please initialize that file on the host where you are deploying by using the
command < echo up>/tmp/hostsample_status . Otherwise, your Sample Host X targets will be in the Status Pending
state indefinitely.
Basic Plug-in Target Types and Metrics
In this section, you will start working with the simplest sample EDK plug-in located in
<EDK>/samples/plugins/oracle.samples.xsh1 . Inside is the plugin_dist directory that I refer to as the stage or
staging area.
Stage Structure
To package a plug-in using EDK, its files must be organized within a staging area. EDK defines a certain directory
structure to be followed. I recommend that you create that directory structure right at the beginning of the
development. You will start with the simplest possible structure shown in Figure 10-8 .
Figure 10-8. Plug-in staging area structure
 
Search WWH ::




Custom Search