Before moving ahead, go to Deploying an expert and then Deploying a policy manager to create a counter expert sample and deploy a policy manager, which will be used in this example.
In the steps below, you will create a policy that will evaluate how long it takes you to setup the expert and create the policy. The rules you will create will determine if you took too long, went too fast or completed within the right amount of time.
- Launch the business view editor.
- Create a new Policy (a Business Service View). To do this, click on the icon under the menu bar that looks like a little blue cube.
- A window opens with a folder icon marked Untitled. You’ll notice that the title bar of the dialog
box contains the text, Untitled – untitled.bsv [unknown]. Click on the Properties icon. - In the Name field, enter the name of the Business Service View (BSV): Counter_Policy.
Click Apply. - Before going any further with the definition of this BSV, save your work. Click on the Save as button.
- Go to the Domain Server tab. Select the ds:// tree and click the new folder icon. Change New Folder name to My Business Views. Within the File name field, enter counter_policy.
Click Save. - Notice that the title bar has changed to reflect the name of the saved business view file:
DEMO – Server Monitor – ds://My Business Views/ counter_policy.pxml [unknown]. Please note, the word, [unknown], appears in the title because the current state of the BSV is unknown. Our BSV is just an empty container for the moment - we haven’t yet created a policy or evaluation rules.
Next, right-click on the folder and click New…,or click the New Sensor icon on the right-hand side. - The first window, General Sensor Options, of the BSV Wizard appears. Within the Name field, enter Minutes_to_Complete. A good practice is to set Initial severity from Unknown to Success. You can also enter a short description within the Description field, for example: This sensor is used to monitor whether the value of counter is just right. Click Next.
- The next window, Select Facts to Monitor, of the BSV Wizard appears. In the bottom section of this window, scroll down to AutoPilot M6 Domain and drill down to Counters > Facts. Click on the fact labeled counter. When you click on this fact, you will notice that the fact name appears within the Fact: field located in the middle of the screen. Click the Include button then Next.
If the alert dialog below appears, you forgot to click the Include button. - The next window, Sensor Evaluation Rules, of the BSV Wizard appears. There will be two severity expressions located at the bottom of this window. To add a third expression, click the + sign located to the left of the second expression.
Complete the expressions (from top to bottom) as shown below, noting there are spaces around the * 3 / and 60.
- Error When %f0:Value is less than 100:
Set Show value field to: %f0:Value * 3 / 60 - Warning When %f0:Value is greater than 600:
Set Show value field to: %f0:Value * 3 / 60 - Success For all other conditions:
Set Show value field to: %f0:Value * 3 / 60
Click Next > when finished.
- Error When %f0:Value is less than 100:
- The next window, Define Alerts and Actions, of the BSV Wizard appears. Click Finish.
- Click Save and then Run . The Deploy As Policy dialog window appears. Select the manager: My_Policy_Manager. You can also set the name of the policy within the Policy name field. For this example, set it to Results. Click OK.
- The policy will start and will look similar to the example below.
So what did this policy do? It evaluated how long it took you to setup the expert and create this policy. The counter expert adds 1 to the counter fact every 3 seconds. The rules you created above determined that if you completed this task in:
- Under 5 minutes, you went too fast and it flagged as an error (red)
- Longer than 30 minutes, you went too slow and it flagged as a warning (yellow)
- Anywhere in between and you were just right (green)