Anda di halaman 1dari 25

Introduction to Opalis

Introduction to Opalis

Table of Contents
Introduction to Opalis ........................................................................................................... 1
Exercise 1 Building Policies (Workflows) .......................................................................................................................2
Exercise 2 System Center Integrations ........................................................................................................................10
Exercise 3 SQL Server Integration ................................................................................................................................14
Exercise 4 WMI Integration .........................................................................................................................................17
Exercise 5 Command Line Application Integration ......................................................................................................19
Exercise 6 Opalis Quick Integration Kit ........................................................................................................................21
Introduction to Opalis

Introduction to Opalis

Objectives After completing this lab, you will be better able to:
 Understand the Opalis Architecture
 Be able to build basic Policies
 See the integration and extensibility possible with Opalis

Scenario Opalis Integration Server allows you to automate IT Operations. It provides


orchestration, integration and automation of IT processes, enabling companies
to define and standardize best practices and improve operational efficiency.
Benefits include: Consistent & repeatable IT activity, Lower support and
operational costs, Higher quality, consistent service delivery, and Process-driven
management and reporting.
With Opalis Integration Server, you can connect different systems from
different vendors together without any scripting or programming.
To automate processes in Opalis Integration Server, you drag and drop objects
and connect them together to create Policies. These Policies become the visual
representation of your procedures and will run unattended.

Estimated Time to 75 Minutes


Complete This Lab

Computers used in this


Lab DC

EXCH

Opalis-demo-vm

RMS

The password for the Administrator account on all computers in this lab is:
P@ssword

Page 1 of 23
Introduction to Opalis

Exercise 1
Building Policies (Workflows)

Scenario
In this exercise, you will create a simple monitor Policy. This Policy will monitor a folder for new text files. When
detected, the monitor will trigger an event and another policy to run.
Tasks Detailed Steps
Complete the following a. Click Start | Opalis Integration Server Client. The Client console opens.
tasks on: Note: Maximize Window if necessary
b. In the left hand Connections pane, right-click Policies, point to New and then click
Opalis-demo-vm Folder.
1. Create a Simple c. A new folder appears and the folder name is highlighted for editing.
Monitor with d. Type Labs in the input box and press Enter.
Platform Event e. Right-click the Labs folder, point to New and then click Folder.
f. Type 01-09 in the input box and press Enter.
g. Right-click the 01-09 folder, point to New and then click Policy.
h. A new tab appears in the Designer Workspace named “New Policy”.
i. Right-click the New Policy tab and click Rename.
j. At the Confirm Check out dialog, click Yes.
k. Type Task 1 in the input box and press Enter.
l. In the Objects palette on the right, click the File Management module button to
expand the category, and then drag the Monitor Folder object into the design
window.
m. In the Objects palette, click the Notification module button to expand the
category, and then drag the Send Platform Event object into the design window
to the right of the previous object.
n. Mouse over the right side of the Monitor Folder object to display the Link arrow.

o. Click on the arrow and drag it to the other object, then release the mouse. This
will link the Monitor Folder object to the Send Platform Event object.
p. Double-click the Monitor Folder object. The Monitor Folder Properties dialog
appears.
q. Ensure the left Details tab is selected. Then, in the Path field, type
C:\Lab_monitor.
r. Click the Add button below the File Filters list.
s. In the Filter Settings dialog box, set the following, and then click Ok:
 Name: File Name

Page 2 of 23
Introduction to Opalis
Tasks Detailed Steps
 Relation: Matches pattern
 Value: *.txt
t. Click the Triggers tab on the left
u. Select Number of files is, set the dropdown to greater than, and type 0 in the text
box.
v. Click Finish.
w. Double-click the Send Platform Event. The Send Platform Event Properties dialog
appears.
x. On the Details tab set the following:
 Type: Information
 Summary: Task 1
 Details: test
y. Click Finish.
z. In the Objects pane, click the Workflow Control module button to expand the
category and drag Trigger Policy onto the details pane next to the Send Platform
Event object.
aa. Click and drag a link between the Send Platform Event and Trigger Policy objects.
bb. Right-click the Task 1 policy tab, select Properties. The Task 1 Properties dialog
appears.
cc. Click on the Logging tab and enable both checkboxes: Store Object-specific
Published Data and Store Common Published Data.
dd. Click Finish.
ee. Right-click the Task 1 tab and click Check In.
Note: This new Policy is designed to monitor a folder for the addition of a new .TXT
file, and when that occurs, it will trigger the Send Platform Event action, which logs
events in the Events tab of the Logs pane. Following that, another policy will be
triggered to start. The next exercise build the second Policy that will be triggered by
the first.
2. Create a second a. Right-click the 01-09 folder point to New and then click Policy. This creates a
Policy to read text second tab above the Designer Workspace.
file and generate a b. Right-click the New Policy tab and click Rename.
Platform Event c. At the Confirm Check out prompt, click Yes.
d. Type Task 2 in the input box of the tab.
e. Right-click the Task 2 tab and click Check In. Click OK on the Warning dialog.
Note: We are checking in the policy to ensure the Policy name is registered in the
database, so that it can be referenced by the other Policy.
f. In the Designer Workspace click the Task 1 tab.
g. Double-click the Trigger Policy object. The Trigger Policy Properties dialog
appears.
h. Click on the General tab on the left and type Trigger Task 2 in the Name text box.
i. Click the Details tab.
j. Click the ellipsis (…) button to the right of the Policy field. Browse to Labs\01-
09\Task 2.
k. Select Task 2 and click OK.
l. Select the Trigger by Path check box, and then click Finish.
m. At the Confirm Check out prompt, click Yes.

Page 3 of 23
Introduction to Opalis
Tasks Detailed Steps
n. In the Designer Workspace, click the Task 2 tab.
o. In the Objects Palette, click the Text File Management module button to expand
the category, and add three Find Text objects to the details pane (at the Confirm
Check out prompt, click Yes).
p. Create links between the three Find Text objects.

q. Double-click the first Find Text to open the Find Text Properties dialog.
r. Click the General tab.
s. In the Name field, type Read Line for Domain.
t. Click the Details tab.
u. In the File text box type C:\Lab_monitor\setup.txt.
v. Click the ellipsis (…) button next to the File Encoding field.
w. In the File Encoding dropdown, choose ASCII. Click OK.
x. In the Search text field, type domain.
y. Choose Only the first line that matches the text will be returned from the Result
options, and click Finish.
z. You have now set up the first action, which will read a text file for the word
“domain” and return the line that it appears. It will publish the line to the
Databus, and then send the policy to the next object.
aa. Double-click Find Text (2) to open the Find Text (2) Properties dialog.
bb. Click the General tab.
cc. In the Name field, type Read Line for Account.
dd. Click the Details tab.
ee. In the File text box type C:\Lab_monitor\setup.txt.
ff. Click the ellipsis (…) button next to the File Encoding field.
gg. In the File Encoding dropdown, choose ASCII. Click OK.
hh. In the Search text field, type account.
ii. Choose Only the first line that matches the text will be returned from the Result
options, and click Finish.
jj. You have now set up the second action, which will read a text file for the word
“account” and return the line that it appears. It will publish the line to the
Databus, and then send the policy to the next object.
kk. Double-click Find Text (3) to open the Find Text (3) Properties dialog
ll. Click the General tab.
mm. In the Name field type Read Line for Password.
nn. Click the Details tab.
oo. In the File text box type C:\Lab_monitor\password.txt.
Note: We are intentionally using an incorrect file name to trigger an error during the
testing of the policy.

Page 4 of 23
Introduction to Opalis
Tasks Detailed Steps
pp. Click the ellipsis (…) button next to the File Encoding field.
qq. In the File Encoding dropdown, choose ASCII. Click OK.
rr. In the Search text field, type password.
ss. Choose Only the first line that matches the text will be returned from the Result
options, and click Finish.
tt. In the Object Palette, click the Notification module button to expand the
category and add a Send Platform Event object to the policy.
uu. Create a link between the Read Line for Password object and the Send Platform
Event object.
Note: In the following steps, you will add Published Data to an object. Published Data
is the result of running each object in the policy. This data is published to an internal
data bus which is unique for each policy. Subsequent objects can subscribe to this
Published Data and use it in their configuration. Link conditions also use this
information to add decision-making capabilities to Policies.
An object can only subscribe to Published Data from the objects that are linked before
it in the Policy.

vv. When an object has subscribed to Published Data, a text placeholder resembling a
hyperlink is inserted where the Published Data will be added.
ww. Double-click the Send Platform Event object to display the Send
Platform Event Properties dialog.
xx. On the Details tab, choose Information from the Type dropdown list.
yy. In the details text box type the following: Domain is [Field(Field(
zz. Right-click in the details text box (in the space just to the right of the last
parenthesis) and point to Subscribe and then click Published Data.
aaa. Select Read Line for Domain from the Object dropdown. If you don’t
see it in the dropdown, cancel the properties screen and try again.
bbb. Select Original Line and then click OK.
ccc. Type the following after the text that was just inserted: ,’=’,2,’\’,1)]
ddd. On the next line, type the following: Account is [Field(Field(
eee. Right click and select Subscribe | Published Data.(in the space just to
the right of the last parenthesis)
fff. Select Read Line for Account from the Object dropdown.
ggg. Select Original Line and then click OK.
hhh. Type the following after the text that was just inserted: ,’=’,2,’\’,2)]
iii. On the next line, type the following: Password is [Field(
jjj. Right-click in the details text box and point to Subscribe and then click Published
Data.
kkk. Select Read Line for Password from the Object dropdown.
lll. Select Original Line and then click OK.
mmm. Type the following after the text that was just inserted: ,’=’,2)]
Note: Your Details section should now appear like the one below:

Page 5 of 23
Introduction to Opalis
Tasks Detailed Steps

Note: The items in curly braces { ... } are Published Data subscribed from previous
objects.
nnn. Click Finish.
ooo. In the Objects Palette, still within the Notification category, add a Send
Popup object to the workspace at the right of the workflow.
ppp. Create a link between the Send Platform Event and Send Popup
objects.
qqq. Double-click the Send Popup object to display the Send Popup
Properties dialog.
rrr. Next to the User or Computer field, click the ellipsis (…) button to display the
Browse for Computer dialog.
sss. Expand Microsoft Windows Network, expand Contoso, click Opalis-
demo-vm and then click OK.
ttt. Ensure that the User or Computer field displays IP address 10.2.2.15.
uuu. Right-click in the Message area and point to Subscribe, and then click
Published Data.
vvv. In the Published Data dialog, ensure that Send Platform Event is
selected in the Object dropdown, click Details, and then click OK.
www. Click Finish.
Note: You have now finished the second Policy for this exercise. This Policy will be
triggered by the first policy, and then will read the text file for specific values in the
file, adding those values to the Databus properties, and finish by sending an event
and displaying a user message with the results.
3. Testing and Running Note: The Policy Testing Console enables you to test Policies in a simulated runtime
New Policies and debugging environment. You can run an entire Policy, step through it one object
at a time, or add breakpoints to stop the simulation at any object you select.
IMPORTANT: The testing console will actually perform the steps within the workflow
– the steps are not performed in a simulated or virtualized environment. All the
connections referenced in the Policy will be live and fully functional, so any actions
that modify or destroy data in connected systems will cause that data to be modified
or destroyed when using the Testing Console. For example, if you use the “Query
Database” object to “DROP TABLE ImportantTable” it will actually delete the
“ImportantTable” from the SQL Server.

a. In the Designer Workspace, click the Task 1 tab.


b. Make sure Send Platform Event is connected to Trigger Task 2 and click the Test
button in the toolbar above the Designer Workspace. The Policy Testing Console
appears.

Page 6 of 23
Introduction to Opalis
Tasks Detailed Steps
c. In the Policy Testing Console, click the Step Over button in the toolbar to start
stepping through the policy.
Note: Note the new entry in the Log pane. To gain more space to view the Log pane,
remove the Resources pane by selecting View from the menu and unselecting
Resource Browser.
d. Open Windows Explorer by clicking Start | Windows Explorer.
e. Browse to the C:\Lab_source folder. Copy Setup.txt to C:\Lab_monitor.
f. Close Windows Explorer.
g. In the Policy Testing Console click the Next button in the toolbar.
h. After a few moments you will notice that the Log pane entry changes and shows
an event for Object name: Monitor Folder.
i. Click the Show Details link to see the contents of the Databus for that Policy.
j. Scroll down the list of properties. Note that the Object Status is success indicating
that the Monitor Folder object detected the change in the folder
k. Click the Next button in the toolbar.
l. Notice that the Log pane changes and shows an event for Object name: Send
Platform Event.
m. Click the Show Details link and note that the Object Status is success indicating
that the Send Platform Event object detected the change in the folder.
n. Close the Policy Testing Console.
o. Click the Check In button on the toolbar.
Note: When you have finished updating a Policy, you must check in your changes to
commit them to the Opalis Datastore. This is the way Opalis integration servers save
the work.
4. Testing Policy a. Right-click the Task 2 policy tab, select Properties, then the Logging tab and
enable both checkboxes: Store Object-specific Published Data and Store
Common Published Data.
b. Click Finish.
c. Click the Test button.
d. In the Policy Testing Console, click the Step Over button to start stepping
through the policy. Notice that the Read Line for Domain object is called to focus
and the Next icon appears on it.
e. Click the Next button in the toolbar. Notice that the Read Line for Account
object is called to focus and the Next icon appears on it.
f. Click the Next button. Notice that the Read Line for Password object is called to
focus and the Next icon appears on it.
g. Click Next.
h. Notice that the Log pane displays an error. Click the Show Details link.
i. Review the Error summary text and notice that C:\Lab_Test\password.txt could
not be found.
j. Click the Read Line for Password object in the Workspace.
k. On the Design Time Properties pane, click the button next to File to open the file
dialog. Browse to the C:\Lab_Monitor directory.
Note: Notice that Password.txt is the wrong file name. It should be Setup.txt.
l. Close the File Open Dialog.
m. Close the Policy Testing Console.

Page 7 of 23
Introduction to Opalis
Tasks Detailed Steps
n. Double-click the Read Line for Password object to open the Read Line for
Properties dialog.
o. On the Details tab in the File text box, replace password.txt with setup.txt.
p. Click Finish.
q. Click the Test toolbar button.
r. In the Policy Testing Console, click Step Over, then click Next several times to
sequence through each object. Notice the test now passes and a Messenger
Service dialog appears.
s. Click OK to close the Messenger Service dialog.
t. Close the Policy Testing Console.
u. Click Check In.
5. Register Integration a. Click Start | Deployment Manager.
Pack (SCOM 2007) b. In the Management Server pane, right-click Integration Packs.
c. Click Register IP with the Management Server.
d. On the Integration Pack Registration Wizard welcome page, click Next.
e. On the Integration Pack or Hotfix Selection page, click Add.
f. Browse into the C:\Install\OIS\IPs\Opalis Integration Pack for Microsoft SC
Operations Manager 2007 5.53_5.5.3.0003 directory, select
Opalis_IP_MicrosoftSystemCenterOperationsManager2007_553.oip, and then
click Open.
g. Click Next.
h. On the Completing the Integration Pack Registration Wizard page, click Finish.
i. At the End-User License Agreement page, click Accept.
j. In the Management Server pane, expand Management Server, and click
Integration Packs.
k. Notice that Integration Pack for Microsoft System Center Operations Manager
2007 is now listed in the Workspace pane.
6. Deploy Integration a. In the Workspace pane, right-click Integration Pack for Microsoft System Center
Pack to Action Server Operations Manager 2007, and click Deploy IP to Action Server or Client.
& Client Note: Since our Action Server and our Client Server are on the same computer we will
only need to deploy the IP once.
b. On the Integration Pack Deployment Wizard welcome page, click Next.
c. On the Integration Pack or Hotfix Deployment page, click to select Integration
Pack for Microsoft System Center Operations Manager 2007, and then click
Next.
d. On the Computer Selection page, type Opalis-demo-vm in the Computer text
box, and then click Add.
e. Click Next.
f. On the Installation Options page, click Next.
g. On the Completing the Integration Pack Deployment Wizard page, click Finish.
Note: It will take a few moments for the Integration Pack to deploy.
h. In the Workspace pane, right-click Integration Pack for Microsoft System Center
Operations Manager 2007and click Properties.
i. In the Integration Pack for Microsoft System Center Operations Manager 2007
dialog box click the Integration Pack tab.

Page 8 of 23
Introduction to Opalis
Tasks Detailed Steps
j. Click Resolve.
k. We can now see Opalis-Demo-VM in the Computer list, showing that the
Integration Pack is now deployed to that server.
l. Click OK.
m. Close the Deployment Manager window.

Page 9 of 23
Introduction to Opalis

Exercise 2
System Center Integrations

Scenario
You can use Opalis to automate responses to alerts from Microsoft System Center Operations Manager 2007 R2.
Using the Integration Pack for Operations Manager, you can drag and drop objects into a Policy that directly
communicate with an Operations Manager Management Server to do the following:

 Monitor for, Get, Create or Update Alerts

 Get a Monitor

 Get a Monitor’s State

 Start or Stop Maintenance Mode

Using these objects, you can automate actions that get information from or send information to Operations
Manager to streamline your IT monitoring processes.

This exercise will demonstrate how you can connect to Operations Manager to monitor for alerts and then
respond to them with automated actions. Using these automated actions, remediations can occur much more
quickly than if an administrator had to do them manually in response to an alert in the Operations Manager
console.

Tasks Detailed Steps


Complete the following a. Click Start | Opalis Integration Server Client.
task on: If your Opalis Integration Server Client is already open, please restart it. The client
must be restarted to properly display new Integration Packs
Opalis-demo-vm b. On the menu bar, click Options and then click Microsoft Operations Manager
2007.
1. Operations Manager
c. Click on domain:test:admin in the connection list and then click Edit.
2007 R2
d. On the MS System Center Operations Manager Connection Settings dialog, type
the following information:
Name: RMS
Domain: Contoso
User name: Administrator
Password: P@ssword
e. Click Test Connection. At the Success dialog click OK.
f. Click OK to close the Connection Settings dialog, and then click Finish to save the
connection configuration.
g. In the left pane, expand Policies | Labs | 01-09, right-click 01-09 and point to
New, and then click Policy. A new policy tab appears above the Workspace pane.
h. Right-click the New Policy tab and click Rename.
i. At the Confirm Check out prompt, click Yes.
j. Type Task 3 in the input box and press Enter.
k. In the Objects Palette, click the Microsoft Operations Manager 2007 module
button to expand the category.

Page 10 of 23
Introduction to Opalis
Tasks Detailed Steps
l. Drag a Monitor Alert object in to the Workspace.
m. In the Workspace, double-click the Monitor Alert object to open the Properties
dialog.
n. Click the button next to the Connection field to open the Item Selection dialog.
Select Contoso:RMS:Administrator and click OK.
o. In the Filters area, add the following filters by clicking Add, selecting the
appropriate choice in the fields for each column, and then clicking OK (repeat for
each row below).

Name Relation Value


Category Equals AvailabilityHealth
IsMonitorAlert Equals True

MonitoringObjectDisplayName Equals Hub Transport (EXCH)

MonitoringObjectName Equals Hub Transport


Severity Equals Critical

When complete, the Filters list should appear as shown below.

p. Click Finish to save the properties.


q. On the Objects Palette click the Notification module button to expand the
category and drag a Send Platform Event object into the Workspace.
r. Click and drag a Link between the two objects.
s. Double-click Send Platform Event to open the Properties dialog. On the Details
tab, set Type to Error.
t. Click Finish.
u. In the Objects Palette, click the System module button to expand the category,
and drag a Start/Stop Service object into the Workspace.

Page 11 of 23
Introduction to Opalis
Tasks Detailed Steps
v. Click and drag a Link between the Send Platform Event object and the Start/Stop
Service object.
w. Double-click Start/Stop Service to open the Properties dialog.
x. Click the General tab and type Restart Hub Transport in the Name text box.
y. Click the Details tab, and select Restart service in the Action group.
z. Under the Execution group, click the button to the right of Computer and browse
to Microsoft Windows Network | Contoso | Exch and click OK. IP address
10.2.2.10 should appear in the Computer field.
aa. Click the button next to Service and select Microsoft Exchange Transport from
the list. Click OK.
bb. Click Finish to save the properties.
cc. Click Test in the toolbar above the Workspace to launch the Policy Testing
Console.
dd. Click Step Over, then click Next.
Note: The policy is now running and the monitor is waiting for an alert to be
generated by Operations Manager. You will now open the Operations Manager
console to view how this Policy interacts with Operations Manager to monitor alerts
and automatically perform remediations.
ee. Switch to the RMS virtual machine.
ff. Double-click the Operations Console icon on the desktop to open the Operations
Manager console.
gg. Click on the Monitoring module button on the left side to display the Monitoring
pane.
hh. In the tree view, expand Monitoring | Microsoft Exchange Server 2007 and click
on Active Alerts.
ii. If any alerts exist in the details pane, select them all and then right-click and
select Close Alert.
Note: You are closing these alerts simply to make viewing any new alerts easier. You
will now switch to the Exchange server and stop a service, which will cause an alert in
Operations Manager.
jj. Switch to the EXCH virtual machine
kk. Click Start | Administrative Tools | Services
ll. Right-click on the Microsoft Exchange Transport service and select Stop.
mm. Switch to the RMS virtual machine.
Note: Notice that a critical alert now appears in the Active Alerts window. Now you
can step through the Opalis Policy and see how the Policy handles this alert.
nn. Switch to the Opalis virtual machine.
oo. When the Monitor Alert is set to success and focus moves to the Send Platform
Event object, click Next. Focus moves to the Restart Hub Transport object.
pp. Click Next. The Restart Hub Transport action is performed and will take a few
moments to complete.
Note: This action restarts the service on the Exchange server, providing automated
remediation of a failure.
qq. When the Restart Hub Transport object shows success, switch to Exch virtual
machine and refresh the Services snap-in and see that the Microsoft Exchange
Transport has restarted.
rr. Switch to the RMS virtual machine.

Page 12 of 23
Introduction to Opalis
Tasks Detailed Steps
ss. Press F5 to refresh the console. The critical alert is now resolved so it disappears
from the list.
Note: It may take a few seconds for Operations Manager to change the status of the
alert. If the alert doesn’t disappear when you refresh the console, wait a few seconds
and try again.
tt. Switch to the Opalis virtual machine.
uu. Close the Policy Testing Console.
vv. Click Check In.
Note: Remember that checking in a policy saves it to the Datastore and allows it to be
used by the Action Servers.

Page 13 of 23
Introduction to Opalis

Exercise 3
SQL Server Integration

Scenario
In this exercise, you will learn how to use SQL Query objects to connect to a SQL Server database and get
information based on a query string. You will then use the result (which is added to the Databus and available as
Published Data) in objects following in the workflow. This exercise also demonstrates how to use Update queries
to modify information stored in a SQL database.

Tasks Detailed Steps


Complete the following a. Click Start | Opalis Integration Server Client. The Client console opens.
task on: b. In the left hand Connections pane, expand to Policies | Lab | 01-09.
c. Right-click 01-09 and point to New, click Policy.
Opalis-demo-vm d. Right-click the New Policy tab and click Rename.
1. Database Scenario: e. At the Confirm Check out prompt, click Yes.
Extract and Update f. Type Task 5 in the input box and press Enter.
Data using SQL g. In the Objects Palette, click the Utilities module button to expand the category
and drag a Query Database Object into the Workspace.
h. Double-click the Query Database object to open the Properties dialog, and
configure the following settings:

Tab Name Property Value


General Name Get SalesPersonID
SELECT * from Sales.SalesPerson
Details Query
WHERE TerritoryID = 6
Connection Database Type SQL Server
Connection Authentication Windows Authentication
Connection Server 10.2.2.15
Connection Initial catalog Adventureworks
Published Data check Flatten and select Separate with
Run Behavior
Behavior line breaks

i. Click Finish to save the property settings.


j. In the Objects Palette, click the Notification module button to expand the
category and drag a Send Popup object to the Workspace.
k. Link Get SalesPersonID to the new object.
l. Double-click the Send Popup object to open the Properties dialog.
m. On the Details tab, enter 10.2.2.15 in the User or Computer field.
n. In the Message box, right-click and then point to Subscribe, then click on
Published Data.
o. In the Published Data dialog, ensure that Get SalesPersonID is selected in the
Object drop down, and then select Full line as a string with … in the list and click
OK. The properties should appear as shown below:

Page 14 of 23
Introduction to Opalis
Tasks Detailed Steps

p. Click Finish to save the property settings.


q. Click the Test toolbar button above the Workspace to launch the Policy Testing
Console.
r. Click Step Over and then click Next.
Note: the Run Time Properties Details shows the results of the query performed on
the database.
s. Click Next to step to the next object.

Note: the popup shows SalesPeronIDs 278 and 282, along with the associated data
delimited by semicolons (as shown below)

t. Click OK to close the popup.


u. Close the Policy Testing Console.
v. Right-click Get SalesPersonID and click Copy.
w. Right-click in the Workspace next to Send Popup and select Paste.
Note: Creating a copy of the Get SalesPersonID query database object will allow you
to just change the name and Query while preserving the connection information. This
speeds up the development process.
x. Link Send Popup to Get SalesPersonID (2).
y. Double-click the Get SalesPersonID (2) object and configure the following
settings:

Page 15 of 23
Introduction to Opalis
Tasks Detailed Steps
Tab Name Property Value
General Name Update TerritoryID
Update Sales.SalesPerson
Details Query Set TerritoryID = 6
WHERE SalesPersonID = 280

Note: the remaining settings are already set from copying the object.
z. Click Finish to save the property settings.
aa. Right-click in Workspace to the right of UpdateTerritoryID and click Paste.
bb. Link Update TerritoryID to Get SalesPersonID (2).
cc. Right-click Send Popup, click Copy.
dd. Right-click next to Get SalesPersonID (2) and select Paste.
ee. Link Get SalesPersonID (2) to the last Send Popup object.
ff. Double-click the last Send Popup object to open the Properties dialog.
gg. In the Message box, click on the blue underlined text to open the Published Data
dialog.
hh. In the Published Data dialog, ensure that Get SalesPersonID (2) is selected in the
Object drop down, and then select Full line as a string with … in the list and click
OK.
Note: the two Send Popup objects differ in that the data they display is from the Get
SalesPersonID object that is immediately before it. They do not display the same
data.
ii. Click Finish to save the settings.
jj. Click the Test toolbar button above the Workspace.
kk. Click Step Over and then click Next.

Note: the Run Time Properties Details now shows the return information from the
from the SQL Query command.
ll. Click Next
Note: the popup shows SalesPersonIDs 278 and 282.
mm. Click OK to close the popup.
nn. Click Next, Next, Next.
Note: that the popup now displays SalesPerson IDs 278, 280, and 282.
oo. Click Ok to close the popup.
pp. Close the Policy Testing Console.
qq. Click the Check In toolbar button.

Page 16 of 23
Introduction to Opalis

Exercise 4
WMI Integration

Scenario
In this exercise, you will learn how to use the Query WMI object to connect with a computer, query the WMI
database for data, and display the data returned.

Tasks Detailed Steps


Complete the following a. In Opalis Integration Server Client Connections pane, expand to Policies | Lab |
task on: 01-09.
b. Right-click 01-09 and point to New, click Policy.
Opalis-demo-vm c. Right-click the New Policy tab and click Rename.
1. WMI Scenario: d. At the Confirm Check out prompt, click Yes.
Connect to the e. Type Task 7 in the input box and press Enter.
Operating System f. In the Objects Palette, click the System module button to expand the category
and drag a Query WMI Object into the Workspace.
and gather data
g. Double-click the Query WMI object to open the Properties dialog, then configure
the following settings:

Tab Name Property Value

General Name Get Hard disks


Details Computer 10.2.2.15
Details Namespace root/cimv2
SELECT * FROM Win32_LogicalDisk
Details WMI query
WHERE DriveType = 3

h. Click Finish to save the properties settings.


i. In the Objects Palette, click the Notification module button to expand the
category and drag a Send Popup object to the workspace. Link the Get Hard
disks object to it.
j. Double-click the Send Popup object to open the Properties dialog.
k. On the Details tab, enter 10.2.2.15 in the User or Computer field.
l. In the Message text box, right-click, point to Subscribe, and click Published Data.
m. Ensure that the Get Hard disks object is selected, click on WMI Query Result as a
… and click OK.
n. Click Finish to save the property settings.
o. Click the Test toolbar button to open the Policy Testing Console.
p. Click Step Over and then click Next, Next.
q. Confirm that the popup message shows the Caption=C: at the top, and view the
WMI data corresponding to the drive.
r. Click OK to close the popup.
s. Close the Policy Testing Console.

Page 17 of 23
Introduction to Opalis
Tasks Detailed Steps
t. Click Check In to save your policy.
Note: This was a simple exercise to gather WMI data from the local computer using a
WMI query object. You can obviously create WMI queries that are more complex, with
advanced parsing to gather specific data about a machine, whether local or remote.
Note that when you use this object on remote machines, the Opalis service account
must have privileges on the remote machine to query WMI.

Page 18 of 23
Introduction to Opalis

Exercise 5
Command Line Application Integration

Scenario
In this exercise, you will learn how to use the Run Program object to run command line applications on a
computer.

Tasks Detailed Steps


Complete the following a. In Opalis Integration Server Client Connections pane, expand to Policies | Lab |
task on: 01-09.
b. Right-click 01-09 and point to New, click Policy.
Opalis-demo-vm c. Right-click the New Policy tab and click Rename.
1. CLI Scenario: Run d. At the Confirm Check out prompt, click Yes.
Command Line e. Type Task 8 in the input box and press Enter.
Interfaces to interact f. In the Objects Palette, click the System module button to expand the category
with the Operating and drag a Run Program Object into the Workspace.
System g. Double-click the Run Program object to open the Properties dialog and configure
the following settings:

Tab Name Property Value


Details Mode Program Execution
Details Computer 10.2.2.15
Details Program path C:\windows\system32\cmd.exe
Details Parameters
Details Working folder C:\Lab_Source
Advanced Execution Mode Interactive
Do not wait for the completion of the
Advanced Execution Mode
program

h. Click Finish to save the property settings.


i. Click the Test toolbar button to open the Policy Testing Console.
j. Click Step Over and then click Next.
Note: the command prompt opens and waits.
k. Close the command prompt and then close the Policy Testing Console.
l. Double-click the Run Program object to open the Properties dialog and
configure the following settings:

Tab Name Property Value


Details Mode Command Execution
Details Computer 10.2.2.15

Page 19 of 23
Introduction to Opalis
Tasks Detailed Steps
Details Command IPConfig /all
Details Working folder C:\Lab_Source
Execution
Advanced Background, normal Priority
Mode
Execution
Advanced Wait for the completion of the program
Mode
Execution
Advanced Terminate after 0 minutes
Mode

m. Click Finish to save the property settings.


n. In the Objects Palette, click the Notification module button to expand the
category and drag a Send Platform Event object to the Workspace.
o. Link the Run Program object to the Send Platform Event object.
p. Double-click the Send Platform Event object to open the Properties dialog.
q. On the Details tab select Information from the Type drop down.
r. Type IPConfig Info in the Summary field.
s. In the Details text box, right click, point to Subscribe, and click Published Data.
t. Ensure the Run Program object is selected, then click on Program output in the
list and click OK.
u. Click Finish to save the property settings.
v. Click the Test toolbar button to open the Policy Testing Console.
w. Click Step Over and then click Next.
x. Note the Run Time Properties Details now shows all of the information from the
IPconfig /all command.
y. Click Next.
z. Close the Policy Testing Console.
aa. Click Check In to save the Policy.

Page 20 of 23
Introduction to Opalis

Exercise 6
Opalis Quick Integration Kit

Scenario
In this exercise, you will learn how to use the QIK to encapsulate command line actions and use .NET class
methods in a Policy to run those actions.

Tasks Detailed Steps


Complete the following a. On the desktop double click the QIK CLI shortcut.
task on: b. On the Opalis QIK CLI welcome page, click Next.
c. On the Assembly Details page, enter the following information:
Opalis-demo-vm •Name: QIK_IPconfig
1. Quick Integration •Assembly file: C:\Lab_Source\QIK_IPConfig.dll
Kit (QIK) d. Click Next.
e. On the Commands page, click Add.
f. On the General tab, enter the following information.
• Name: QIK_IPconfig
• Mode: Run Command
• Description: IPConfig
g. Click the Arguments tab, then click the Add button to the right of Parameters.
h. On the Add/Edit parameter page, enter the following properties:

Property Value
Name Options
Usage Mode Command Argument
Display Style Text with Selection
Default Value /all
Options /all|/release|/renew|/flushdns|/regis
terdns|/displaydns|/showclassid|/set
classid|

i. Click OK.
j. In the Command Line text box above, type ipconfig (and add a space after it),
click the Insert button and then click $(Options).
k. Click the Published Data tab and click Add.
l. On the Add/Edit Published Data page enter the following information:

Property Value
Name IP Address

Page 21 of 23
Introduction to Opalis
Tasks Detailed Steps
Source Standard Output Stream
Mode Exact Group
(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-
Pattern 9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-
9][0-9]?)\b)
Description IP Address

Note: This property set enables extracting the IP address from the command output
using a regular expression (the Pattern property).
m. Click OK to save the properties and click Add again, and enter the following
properties:
Property Value
Name MAC Address
Source Standard Output Stream
Mode Exact Group
([0-9a-fA-F]{2}[:-][0-9a-fA-F]{2}[:-][0-9a-fA-
Pattern F]{2}[:-][0-9a-fA-F]{2}[:-][0-9a-fA-F]{2}[:-][0-
9a-fA-F]{2})
Description MAC Address

Note: This property set enables extracting the MAC address from the command
output using a regular expression (the Pattern property).
n. Click OK twice to save the property settings.
o. Click Next.
Note: The QIK builds a .NET assembly file named QIK_IPConfig.dll for the integration.
Now you will use the QIK Integration Pack to add this functionality to a Policy.
p. Click Finish.
q. In Opalis Integration Server Client Connections pane, expand to Policies | Lab |
01-09.
r. Right-click 01-09 and point to New, click Policy.
s. Right-click the New Policy tab and click Rename.
t. At the Confirm Check out prompt, click Yes.
u. Type Task 9 in the input box and press Enter.
v. In the Objects Palette, click the Quick Integration Kit 3.0 module button to
expand the category and drag an Invoke .NET Object into the Workspace.
w. Double-click the Invoke .NET object to open the Properties dialog, and configure
the following properties:
•Assembly: C:\Lab_Source\QIK_IPConfig.dll.
•Class: QIK_IPconfig.QIKIPconfig.
x. Click Finish to save the property settings.
y. Click the Test toolbar button to launch the Policy Testing Console.
z. Click Step Over and then click Next.

Page 22 of 23
Introduction to Opalis
Tasks Detailed Steps
aa. In the Log pane, click the Show Details link.
bb. Click IP Address and click the ellipsis button (…). You will note that the IP
addresses have been returned.
Note: If you do not see the IP Address or MAC Address properties in the details, then
an error occurred in setting these properties – most likely an error in entering the
regular expression string.
cc. Click OK to close the Published Data Browser
dd. Close the Policy Testing Console.

Page 23 of 23

Anda mungkin juga menyukai