Ticketing Inbound is a new optional feature added in Enterprise Manager 12c. This feature synchronizes the ticket status between Service Manager and Enterprise Manager. This feature requires the addition of a new field to the HP Service Manager incident database to contain the Enterprise Manager connector identifier. It also requires the setup of a Java script in HP Service Manager that is called to send the status information to Enterprise Manager whenever a status change occurs. You can skip this chapter if you choose not to implement this feature.
When a ticket or incident Enterprise Manager creates is updated manually at the Service Manager console, the new ticket status is updated in Enterprise Manager. The update at the Service Manager console triggers a Java script that calls the EM CLI utility to send the new status to Enterprise Manager.
This chapter provides the following procedures to set up the ticketing inbound feature:
This section provides instructions to add a custom field to the HP Service Manager incident database to contain the Enterprise Manager connector identifier. The identifier must be stored with the incident, because it is a required value that must be supplied when status updates are sent to Enterprise Manager.
To add the custom field:
Log in to the HP Service Manager client using an account that has Administrative permissions.
Add the new custom field to the HP Service Manager database to contain the Enterprise Manager connector ID as follows:
Expand Menu Navigation, then Tailoring in the System Navigator pane.
Double-click on Database Dictionary.
The Database Dictionary panel appears.
Enter a File Name of probsummary and click Search.
A form with the probsummary table information appears, as shown in Figure 6-1.
Click on the line with a Name of descriptor and a Type of structure.
Click on New Field/Key.
The Add Field window appears.
Enter a Name of oracle.connector.id and a type of character, then click Add.
Scroll down to the bottom of the list of fields and click on the row with the name of oracle.connector.id.
Click on Edit Field/Key. The field edit window appears, as shown in Figure 6-2.
Enter ORACLE_CONN_ID in the SQL Name field, VARCHAR(32) in the SQL Type field, and m2 in the SQL Table field, then click OK.
Click OK on the main panel.
The ALTER TABLE database SQL statement appears, and you are asked whether Service Manager should automatically apply the change, or whether you want to apply it manually.
Click SM Alters.
After a period of time, a message states that the record has been updated in the dbdict file.
Modify the web service to include the new database field as follows:
Expand Menu Navigation, then Tailoring, then Web Services in the System Navigator pane.
Double-click on WSDL Configuration.
The External Access Definition panel appears.
Enter probsummary in the Name field and click Search.
The record for probsummary will be loaded as shown in Figure 6-3.
Click on the Fields tab and scroll to the bottom of the list of fields.
Click on the Field column of the first empty row and select oracle.connector.id from the list.
Click on the Caption column on the same row and enter OracleConnectorId, as shown in Figure 6-4, then click OK.
Install the Enterprise Manager EM CLI Client on the Service Manager server system. The EM CLI Client needs to be able to communicate with your OMS.
To install the Enterprise Manager EM CLI Client:
Log into the Enterprise Manager console.
From the Setup menu, select Command Line Interface.
Click the Download the EM CLI kit to your workstation link, and download the emclikit.jar file to the local system.
Transfer the jar file to the Service Manager server system.
At the HP Service Manager server, set your JAVA_HOME environment variable and ensure that it is part of your PATH. You must be running Java 1.6.0_25 or greater. For example:
setenv JAVA_HOME /usr/local/packages/j2sdk1.6.0_2 setenv PATH $JAVA_HOME/bin:$PATH
Install the EM CLI Client on the Service Manager server. You can install the client portion of EM CLI in any directory using the following command, where <emcli_dir> is the installation directory:
java -jar emclikit.jar client -install_dir=<emcli_dir>
Open a window using the account that runs the Service Manager Server. On a Windows system, this should be the System account.
To open a window running the System account, run the following command with <time> being 1 minute in the future. At the time specified, a window opens at the system console running under the context of the System account.
at <time> /interactive cmd.exe
Run the following command to configure the EM CLI Client to connect to OMS, where <hostname> is the host name or IP address where the OMS server is located, and <sysman_pwd> is the password for the sysman account in OMS:
<emcli_dir>\emcli setup -url=https://<hostname>:7801/em -username=<em_super_user> -password=<sysman_pwd>
Run the following command to synchronize the EM CLI Client with OMS:
<emcli_dir>\emcli sync
Note:
EMCLI must be installed on the Service Manager server in order to communicate with your OMS.The notification script files are included in the Self Update archive that was installed in Section 2.1, "Installing the Connector".
To extract the script files:
Determine the command required to export the archive files. To do this, perform the following steps:
From the Setup menu of the Enterprise manager console, select Extensibility, then Self Update.
Click on the Management Connector link in the Type column.
The HP Service Manager connectors appear in the list with a status of Applied.
Click on the HP Service Manager connector, then select Export from the Actions list.
A pop-up window, like the example shown in Figure 6-5, appears with the command required to export the file.
Open a command window on the Management Server host system and navigate to a temporary directory where you can copy and unzip the file.
Log into EM CLI using the following command. You will be asked to provide the password information for the sysman account.
emcli login -username=sysman
Run the EM CLI export_update command from your system, changing <dirname> to the full path of the temporary directory.
This action creates a zip file. The file name is comprised of the id value you specify in the export_update command with a .zip extension. In the example command in Figure 6-5, the zip file name would be:
E9F684312AE7A18E98340715D079E58D.zip
Extract the adapter installation jar file from the zip file using the following command:
unzip *.zip archives/OracleOMSPost.js
This section provides the steps required to configure HP Service Manager to call the notification script.
To configure HP Service Manager to call the notification script:
Log into the HP Service Manager client with an account that has Administrative permissions.
Create a Script Library that generates the parameters for the EM CLI call by performing the following sub-steps:
Expand Menu Navigation, then Tailoring in the System Navigator pane.
Double-click on Script Library.
The Script Library panel appears.
Enter a Name of OracleServices and a Package of OracleScripts.
Copy the contents of the OracleOMSPost.js file from Section 6.3 into the script panel. Figure 6-6 shows the Script Library panel after the fields have been specified.
Change the value of the username on line 6 from oms_user to the username that Enterprise Manager will use to access the Service Manager web service. See Service Manager Username in Section 3.4.1, "Connection Settings" for more information.
Click Add.
Create a Script Panel that calls the Script Library by performing the following sub-steps:
Double-click on Scripts in the System Navigator panel.
The Script Panel Definition panel appears.
Enter a script name of OracleScript.
Click on the Pre RAD Statements tab.
Click on the first line and enter the following text, where <emcli_dir> is the path where the EM CLI tool was installed:
$L.command="<emcli_dir>\\emcli.bat;"+jscall("OracleServices.OracleOMSPost", $script)
Note:
Backslashes in the path must be entered as double backslashes. For example, C:\tools\em\emcli.bat would be entered as C:\\tools\\em\\emcli.bat.Figure 6-7 shows the Script Library panel after the fields have been specified.
Click on the RAD tab and set Application to us.launch.external.
Click on the first line in the Names column and enter name.
Click on the first line in the Values column and enter $L.command.
Click Add to create the Script Panel.
Perform the following sub-steps to update the Format Control to invoke the script upon creating or updating a ticket:
Double-click on Format Control in the System Navigator panel.
The Search Format Control Records panel appears.
Enter probsummary in the Name field and click Search.
The Format Control: probsummary panel appears.
Click on the line where the Name is probsummary.
Click Subroutines to open the Subroutines tab.
One or more subroutines may already be defined.
Scroll down the screen to the last empty entry and enter the following data:
Set Add to true.
Set Upd to true.
Set Names to file on line 1, and name on line 2.
Set Values to $file on line 1, and OracleScript on line 2.
Figure 6-8 shows the Format Control panel after you have specified the fields.
Click Save.
This section provides the steps required to remove the changes made to HP Service Manager to allow for ticket inbound operations.
Follow the steps below to remove calls to the notification script:
Log in to the HP Service Manager client with an account that has Administrative permissions.
Expand Menu Navigation, then Tailoring in the System Navigator pane.
Double-click on Script Library.
Click Search to view all Scripts in the Script Library.
Find and select OracleServices, then click Delete, and Yes to confirm.
Double-click on Scripts in the System Navigator panel.
Click Search to view all Scripts available.
Find and select OracleScript, click Delete, then Yes to confirm.
Double-click on Format Control in the System Navigator panel.
Enter probsummary in the Name field and click Search.
Click on the line where the Name is probsummary.
Click Subroutines to open the Subroutines tab.
Click Delete, then Yes to confirm.
Follow the steps below to remove custom field added for script operation:
Log in to the HP Service Manager client using an account that has Administrative permissions.
Expand Menu Navigation, then Tailoring in the System Navigator pane.
Double-click on Database Dictionary.
The Database Dictionary panel appears.
Enter a File Name of probsummary and click Search.
Scroll down to the bottom of the list of fields and click on the row with the name of oracle.connector.id.
Click Delete Dbdict Record, and select Yes to confirm.
Expand Menu Navigation, then Tailoring, then Web Services in the System Navigator pane.
Double-click WSDL Configuration.
Enter probsummary in the Name field and click Search.
Click the Fields tab and scroll to the bottom of the list of fields.
Click the Field column of the first empty row and remove oracle.connector.id.
Click the Caption column on the same row and remove OracleConnectorId, then click OK.
To uninstall the Enterprise Manager command line interface (emcli), perform the following steps:
Navigate to the emcli
installation directory.
Delete the emcli
directory and all sub-directories from the system.