IBM Support

Netcool Impact Operator View "search field"

Technical Blog Post


Abstract

Netcool Impact Operator View "search field"

Body

 

The following is a simple example that illustrates how to configure a search using operator views.

 

The basic concept can be adapted adding complexity to serve enterprise application requirements.

 

Step 1:

A  search field can be created by editing NCICLUSTER-blank.

Adding form and input box

 

<!DOCTYPE html>
<html>
<!-- *************************************************** {COPYRIGHT-TOP-RM} ***
* Licensed Materials - Property of IBM
* "Restricted Materials of IBM"
* 5724-S43
*
* (C) Copyright IBM Corporation 2009, 2014. All Rights Reserved.
*
* US Government Users Restricted Rights - Use, duplication, or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
******************************************************** {COPYRIGHT-END-RM} -->
<head>
    <title>Blank Page</title>
</head>
<body>
<form action="/opview/displays/NCICLUSTER-mySearch.html">Search Manager:<br>
<input type="text" name="searchstring">
<br>
<input type="submit" value="Submit">
</form>
</body>
</center>
</body>
</html>

 

The action of this page is to call an operator view, mySearch.html"

 

Step 2:

 

Create an operator view e.g mySearch

 

Edit the operator view policy code Opview_mySearch:

 

After:

// INFO PANEL - START

Add the policy code that will handle the search. (adapt according to your install)

 

DataType = "myDT";
Filter = "Manager = '" + @searchstring + "'";
CountOnly = False;
ResultsArray = GetByFilter(DataType, Filter, CountOnly);


Log("FILTER: " + Filter);
Log("searchstring: " + @searchstring); 


resultscount = Length(ResultsArray);
Log("RESULTS NUMBER: " + resultscount);

 

Step 3:

Test the configuration by opening the search page:

 

https://XXX:16311/opview/displays/NCICLUSTER-blank.html

image

 

 

 

 

 

 

 

 

Enter a string that matches some values.

In this case the Manager field in the alerts.status table in an object server is being searched.

Click submit.

As the action of the page is the operator view, the operator view policy code will be executed.

 

Check logs, confirm that the searchstring is being passed to the operator view and that the datatype is being queried correctly.

 

November 24, 2015 10:18:11 AM EST[PolicyLogger][Opview_mySearch][pool-3-thread-14]Parser log: FILTER: Manager = 'SecurityWatch'
November 24, 2015 10:18:11 AM EST[PolicyLogger][Opview_mySearch][pool-3-thread-14]Parser log: searchstring: SecurityWatch
November 24, 2015 10:18:11 AM EST[PolicyLogger][Opview_mySearch][pool-3-thread-14]Parser log: RESULTS NUMBER: 4

 

 

 

 

 

 

 

 

 

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11080093