Home
  • RapidOSS
  • Support
  • About Us
Home » Blogs » uysal's blog

Integrating configuration change history into RapidOSS

Posted September 9th, 2007 by uysal
in
  • change management
  • configuration management
  • Integration
  • RapidInsight
  • RapidOSS
  • web interface

RapidOSS is typically used to provide web based access to events and service status information from management tools such as EMC Smarts and IBM Netcool. However RapidOSS really shines when data from multiple sources gets integrated to provide a consistent, unified, easy to use web interface for all relevant information without the hassle of single signon systems, clients conflicts and having to train users to use different user interfaces of each tool.

In IT operations management, access to data from configuration/change management, and ticketing systems along with events from monitoring systems is often needed. RapidOSS is a great fit to bring all the relevant information to the interested users.

To demonstrate this concept I've added integration with a configuration/change management system (CMS) in our live demo. In this example, users will be able to see the configuration change history of the devices by executing a tool from the right click menu in context. The configuration history data (we've created some mock data) is stored in a relational database.

Here is everything I've done to integrate configuration history into RapidOSS. The process can be considered an example of how to integrate any data from a relational database or other external data source using in context menu actions:

Define the data source

First, I've defined a new database data source that specifies the access details of the database containing configuration change history data for the devices. In this example, I've used the embedded derby database but it could have been any database with a JDBC driver. The datasource is defined in the RapidOSS Admin UI.

The user interface

RapidOSS user interface is driven from an xml based configuration file. In order to add the “Get configuration history” feature to the user interface, I've defined the UI component to show the data (grid), the right click menu item, the action to execute when the user selects the menu item, and how to link the tree component that shows the devices to grid component that will show the configuration history.

First, I've added a new menu item to the context menu which enables the user to see the configuration history of a device when he right-clicks on it and chooses the “Get Configuration History ” option.

<ContextMenu>
.....
        <MenuItem Label="Get Configuration History" Expression='data["RIType"] == "Device"' ActionId="DeviceConfHistoryAction">
        </MenuItem>
</ContextMenu>

After that, in order for the dialog to be opened when the selection from the context menu is made, I've defined a window action as described below.

<Actions>
.....
                <WindowAction Id="DeviceConfHistoryAction" WindowId="DeviceConfHistoryDialog" DynamicTitleAttribute="Identifier">
                        <Params>
                                <Param Name="Identifier" AttributeName="Identifier"/>
                        </Params>
                </WindowAction> 
</Actions>

Next I've created a new dialog box to display the data in it. We set the value of “width” in accordance with the total size of the columns initialized in the grid part. The other parameters were set according to personal preferences.

<Dialogs>
.....
        <Dialog Id="DeviceConfHistoryDialog" ComponentId="confHistory" Width="730" Height="450" Title="Configuration History">
        </Dialog>
</Dialogs>

Having created a dialog box, the time for adding a new grid to display the data in a well-formed way has come. In this grid, we initialize the parameters so that it will get the data by calling the “getConfHistory” script, and also we set the columns of the table appropriately to let the data fit well.

<Components>
.....
<Grid Url="getConfHistory"
                        RootTag="ManagedObjects"
                        RefreshRate="0"
                        Id="confHistory"
                        ContentPath="ManagedObject"
                        KeyAttributeName= "Identifier"
                        TitlePrefix="Configuration History of "
                        DynamicTitle = "true"
                        Title = "Configuration History List"
                        >

                       
                        <Columns>                            
                                <Column Type="Text" Header="Comments" Width="250" AttributeName="Comment"/>
                                <Column Type="Text" Header="Who" Width="150" AttributeName="Who"/>                             
                                <Column Type="Text" Header="ChangeRequest" Width="100" AttributeName="ChangeRequest" SortType="Int"/>
                                <Column Type="Text" Header="Date" Width="100" AttributeName="Date" SortType="Date" SortBy="true"/>
                                <Column Type="Text" Header="RevisionNumber" Width="100" AttributeName="RevisionNumber" SortType="Int"/>
                                                                       
                        </Columns>
                        <Tools>
                                <ErrorTool/>
                        </Tools>       
        </Grid>
.....
</Components>

Next I've inserted the following line to URLs section. Hence, the script for getting configuration history becomes runnable through the url or a reference to it.The UI component executes the script specified in the URL every time the UI component is launched.

<Urls>
.....
        <Url Name="getConfHistory" Address="/RapidInsight/ManagedObject/invoke?Operation=getConfHistory"/>
</Urls>

Finally, I've added a link from the data tree to the display grid. Thus, the user doesn't need to close and open the dialog box each time he wants to see the configuration history of a different device. Instead, just clicking to a device will be enough to change the data displayed in the dialog box.

<Links>
.....
        <Link From="moTree" To="DeviceConfHistoryDialog" DynamicTitleAttribute="Identifier">
                <Params>
                        <Param Name="Identifier" AttributeName="Identifier"/>
                </Params>
        </Link> 
.....
</Links>
The server side groovy script

As I've mentioned above, the groovy script getConfHistory is executed to provide the data that will be displayed by the UI component. getConfHistory script connects to the configuration history database via the data source defined above, executes an SQL query to retrieve the data for the specified device (device name is passed from the tree component as specified in the Link section of the UI configuration), and generates the XML consumed by the grid component.

import groovy.sql.Sql;
import groovy.xml.*;
if(PARAMS.Identifier)
{
        identifier = PARAMS.Identifier; 
}
else
{
        throw new Exception("Identifier parameter is missing.");
}

def writer = new StringWriter();
def builder = new MarkupBuilder(writer);
def conn = ExtProxy.connectToDB("rasDB");
logger.debug("Connection to rasDB is established.");
def sql = new Sql(conn);

logger.debug("Building xml statements for the record history of " + identifier);

builder.ManagedObjects(){
        sql.eachRow("select * from CMS where IDENTIFIER=${identifier}"){
                def comment ="";
                def who="";
                def date="";
                def changeRequest="";
                def revisionNumber="";
                if (it.COMMENT != null) comment =it.COMMENT;
                if (it.WHO != null) who= it.WHO;
                if (it.DATE != null) date=it.DATE;
                if (it.CHANGEREQUEST != null) changeRequest=it.CHANGEREQUEST;
                if (it.REVISIONNUMBER != null) revisionNumber=it.REVISIONNUMBER;
                builder.ManagedObject(Comment:comment, Who:who, Date:date, ChangeRequest:changeRequest, RevisionNumber:revisionNumber);  
        }
}
return writer.toString();

And that's it; the integration is completed. User can see the configuration history of the devices as needed, quickly, without having to launch another application. Of course, this is just a beginning. Integration can be extended to launch the configuration change management application, or show other information, etc. You can see the integration in action as it is implemented in our live RapidOSS demo available on this website.



  • Login or register to post comments

 Social Bookmark

  • Mobile IT management comes to town
  • Simple consistent interfaces to external systems
  • RapidOSS: what is it good for? - Integration in the presentation layer
  • RapidOSS: what is it good for? - The broken client
  • Automated acceptance test example for Netcool event enrichment solution

  • Create new account
  • Request new password