WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick...

91

Transcript of WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick...

Page 1: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse
Page 2: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Table of Contents

QUICK TOUR .......................................................................................................3

4.1.1 About Eclipse........................................................................................................ 4 4.1.2 Getting Started with Eclipse.................................................................................. 5 4.1.3 Technical Support................................................................................................. 6

4.2 SETTING UP DEVELOPMENT ENVIRONMENT ...........................................7

4.2.1 Creating a Project in Eclipse................................................................................. 8 4.2.2 Working with CVS.............................................................................................. 10 4.2.3 Viewing Project Details ....................................................................................... 12 4.2.4 Working with Files............................................................................................... 15 4.2.5 Working with External Tools ............................................................................... 16 4.2.6 Integrating WebNMS Studio help ....................................................................... 17

4.3 CUSTOMIZING SERVICES ..........................................................................18

4.3.1 Modeling Resource............................................................................................. 19 4.3.1.1 Creating Managed Resource...................................................................................... 20 4.3.1.2 User-Object Modeling ................................................................................................. 26

4.3.2 Discovery ............................................................................................................ 27 4.3.2.1 Configuring Discovery - An Introduction ..................................................................... 28 4.3.2.2 Creating Basic Discovery Filter................................................................................... 29 4.3.2.3 Introduction: Advanced Discovery Filter .................................................................... 31

4.3.3 Maps................................................................................................................... 36 4.3.3.1 Creating Map Filter ..................................................................................................... 37 4.3.3.2 Creating Custom Maps ............................................................................................... 39

4.3.4 Fault Management.............................................................................................. 40 4.3.4.1 Extending Events........................................................................................................ 41 4.3.4.2 Extending Alerts.......................................................................................................... 42 4.3.4.3 Creating Custom Notification for Alert Filter and Event Filter..................................... 43 4.3.4.4 Creating Trap Filter..................................................................................................... 46 4.3.4.5 Configuring Trap Ports................................................................................................ 48 4.3.4.6 Creating Status Poller................................................................................................. 49

4.3.5 Provisioning ........................................................................................................ 51 4.3.5.1 Customizing Provisioning Capabilities........................................................................ 52 4.3.5.2 Accessing Provisioning Extensions ............................................................................ 53

4.3.6 Performance Management ................................................................................. 54 4.3.6.1 Creating Poll Filter ...................................................................................................... 55 4.3.6.2 Configuring Threshold ................................................................................................ 57 4.3.6.3 Configuring Polling Object .......................................................................................... 58

1

Page 3: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7 Server Configuration Introduction ....................................................................... 59 4.3.7.1 Editing NmsProcessesBE.conf ................................................................................... 60 4.3.7.2 Editing NmsProcessesFE.conf ................................................................................... 61 4.3.7.3 Configuring Threads ................................................................................................... 62 4.3.7.4 Editing Server Parameters.......................................................................................... 63

4.3.8 Configuring Policies ............................................................................................ 64 4.3.9 Setting Logging Parameters ............................................................................... 65 4.3.10 Configuring Backup Service ............................................................................. 66 4.3.11 Setting Failover Parameters ............................................................................. 67 4.3.12 Debugging Applications Built in Eclipse............................................................ 68 4.3.13 Rebranding WebNMS....................................................................................... 69

4.4 DEPLOYING ECLIPSE APPLICATIONS .....................................................70

4.4.1 Importing Client Nar............................................................................................ 71 4.4.2 Packaging the Project......................................................................................... 73 4.4.3 Integrating Command Line Packager with Build Script....................................... 75 4.4.4 Installing Eclipse Project in WebNMS................................................................. 77 4.4.5 Uninstalling Eclipse Project from WebNMS....................................................... 80

4.5 GLOSSARY - LIST .......................................................................................81

4.5.1 Glossary.............................................................................................................. 83

4.6 UPGRADING THE PROJECT ......................................................................86

4.7 FREQUENTLY ASKED QUESTIONS ..........................................................87

4.8 KNOWN ISSUES & LIMITATIONS...............................................................89

4.9 TUTORIALS..................................................................................................90

2

Page 4: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse Plugin is arranged in a manner that makes information easily accessible and understandable in the following way.

• Quick Tour section provides an introduction to the Eclipse Plugin.

• Setting up Development Environment provides the basics of working with the Eclipse such as creating and working with Projects, multi user environment, modifying the generated Source to the requirements, etc.

• Customizing Services section provides all the details required by developers to customize their WebNMS using the Eclipse Plugin.

• Deploying Eclipse Application section provides information on how to deploy the application created using Eclipse over WebNMS

• Eclipse Glossary section provides definitions for the terms and acronyms that are used in Eclipse.

• FAQ section provides frequently asked questions about the Eclipse Plugin.

• Known Issues and Limitations section provides known problems and associated workarounds for the Eclipse Plugin.

• Tutorial section is to guide the developer through designing an EMS, and provide working examples with step-by-step approach,helping to understand the choices to be made during development.

• EMS as a Craft Interface document provides details on how to build a Craft Interface from an EMS.

As always, we welcome your feedback on the product and will be happy to resolve any technical queries that you may have with the product. Just send us a mail to WebNMS Support at [email protected]

3

Page 5: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.1.1 About Eclipse Introduction Eclipse, Integrated Development Environment is a widely used open source development environment. WebNMS now provides WebNMSEclipsePlugin which will seamlessly plug into the Eclipse IDE and provide you with a powerful suite of Wizards and Tools that help you to develop your management application very fast. What does the Eclipse Studio Plugin consist of ? The Plugin comes with an intuitive set of wizards and tools for customizing the various services offered by WebNMS. These tools support the entire development cycle of an EMS from modeling the device as a managed resource to customizing services to finally packaging and installing the application over WebNMS Framework. Some of the salient functions offered by the Plugin are:

• Modeling the device as a resource that can be managed by WebNMS

• Defining the necessary filters for WebNMS to discover the device and add its representation in the Topology map

• Defining the Fault management for the device such as filtering traps from the device and processing them based on the required criteria to generate events or alarms

• Creating the representation of the device chassis for integration with WebNMS Client

• Creating screens for performing configurations on the device

• Defining performance management for the device in terms of data collection, status polling

• Packaging the application as a downloadable NAR (NMS Archive) that can be installed on any WebNMS

The Eclipse Plugin is built on the extensible and platform-independent Java Technology and has a highly intuitive graphical user interface. This is sure to enhance the productivity of the EMS building teams. The Plugin has been designed keeping in mind the developer and domain expert who normally form part of the EMS building teams of telecom vendors or large enterprises. Take a peep into WebNMS's latest offering for creating management applications easily and quickly. We are confident you will find it of immense use. To make your task easier, the documentation bundled will help you walk you through the various features offered in the Plugin along with real-time illustrations of the key features and services. As always, we welcome your feedback and will be very glad to support you throughout your evaluation of the product and the development of your applications.

4

Page 6: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.1.2 Getting Started with Eclipse

• Pre requisites for Eclipse IDE o Software requirements

• Procedure to start Eclipse IDE

Pre requisites for Eclipse IDE The pre requisites for WebNMS application development using Eclipse.

Software requirements

• Eclipse version 3.5

• JDK version 1.5 or 1.6

• WebNMS 5

• WebNMS Eclipse Plugin version 1.1.0 To develop WebNMS application using Eclipse IDE, follow the procedure given below: Procedure to start Eclipse IDE

• Install the Eclipse version 3.5 in your machine.

• Get the latest Web NMS - Eclipse plugin (WebNMSEclipsePlugin.jar file) from <Web NMS Home>/StudioTools/Studio/jars directory and unzip this jar file in the <Eclipse Installed directory.>

• Start Eclipse IDE. Use the script with the - vm option as given below:

Command for Linux machine

./eclipse -vm <JDK 1.5 Home>/bin/java Command for Windows machine

eclipse -vm <JDK 1.5 Home>\bin\java If you are installing a newer version of our plugin over, please use the "-clean" option in the commandline while starting Eclipse IDE:

Example: ./eclipse -vm <JDK 1.5 Home>/bin/java -clean

5

Page 7: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.1.3 Technical Support Technical Support provides answers to your technical questions about the WebNMSEclipse plugin . We provide the best support and specialize in resolving the most complex problems encountered during the process of working with the plugin . The hallmark of our support is, rapid and knowledgeable response to customer queries, from our product developers-cum-support specialists. For support and bug-report, please send e-mails to [email protected] Please provide the following information while sending support mails:

1. Eclipse Project Details 2. Details of MIBs used. 3. Logs and Debug messages. (Eclipse logs contained in a ".logs" file can be found in <Eclipse

Workspace>/.metadata directory) Tell us also what you think of the plugin. We value your feedback and will use it to provide better services and products for our customers.

6

Page 8: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2 Setting up Development Environment The first step in building an application is setting up the development environment. The Eclipse supports concurrent project development whereby many people in a team can work together on development environment. Please follow the steps below to setup the development environment for working with the Eclipse.

• Creating a New project

• Working with CVS

• Viewing Project Details

• Working with Files

• Working with External Tools

• Integrating Help

7

Page 9: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.1 Creating a Project in Eclipse

• Overview

• Creating the EMS Development Project

• Working with Source Folders o Existing default source folders in the project o Procedure to create new source folder in the project

Overview

The first step in working with the Eclipse is creating a Project. A Project created in Eclipse copies the necessary source files and configuration files from the reference WebNMS to the workspace where the project will be stored. The Eclipse workspace is created to separate the development environment from the runtime WebNMS and make it easier for grouping the necessary information while packaging the project. To create WebNMS application development project in Eclipse follow the procedure given below:

Creating the EMS Development Project

• In the Eclipse IDE screen, select File > New > Create EMS Project menu. Alternatively, you can click the Create EMS Project toolbar button.

• EMS Development Project Wizard screen pops up. • In the Project Properties screen, enter a name for the project in Project Name text field and

use the Browse button to select the WebNMS Home directory. WebClient support can also be enabled in the same wizard.

• Click the Finish button.

• You will find the created project under the Package Explorer tree.

8

Page 10: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Working with Source Folders

Existing default source folders in the project

By default the following source folders will be available in the EMS Development Project:

• SERVER

• CLIENT You can also create new source folders using the procedure given below:

Procedure to create new source folder in the project

• Select your project in the Package Explorer.

• Right-click and select File > New > Source Folder menu. • "New Source Folder" wizard screen pops up. • In the screen, project name is pre-filled in Project Name text field and enter a name

for the folder in Folder Name text field or use the Browse button to select from the existing directories.

• Click Finish button.

• You will find the new source folder created under your project in the Package Explorer tree.

The output folder for the newly created source folders will be automatically set to the default output folder configured for the project. The default output folder is classes folder present in the project. You can use the existing default source folders of the project or new source folders created by you to create source files.

9

Page 11: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.2 Working with CVS CVS can be integrated to the Eclipse IDE and you can get source files CVS synchronized for your project. Linking the CVS repository in Eclipse IDE

• Enable viewing the CVS Repositories in the Eclipse right bottom tab using Show View menu.

• Add the CVS Repository in the view using tool bar icon. Working with CVS

• Checking out the source files into your project.

• Modify the source code as required.

• Check in the modified source files. You can link the CVS repository with the project using the procedure given below: View the CVS repository

• Select Window > Show View > Other menu. • "Show View" wizard screen pops up. • In the screen, select the CVS > CVS Repositories in the tree. • Click OK button.

• You will find new tab CVS Repositories appearing at the right side bottom panel of the Eclipse screen.

You can add CVS repository to the project using the procedure given below: Add the CVS repository

• Click Add CVS Repository icon available in the top right corner of the CVS Repositories tab.

• "Add CVS Repository" wizard screen pops up. • In the screen, enter the following details:

Location section o Host - Enter name of the CVS Host machine. o Repository Path - Enter path of the CVS repository in Host machine.

Authentication section o User - Enter user name of the CVS account. o Password - Enter password of the CVS account.

Connection section o Connection Type - Enter connection of the CVS server. Default value will be 'pserver'. Allow

default Connection Type value to remain. o Use Default Port / Use Port - Allow the Use Default Port selection to remain.

• Click Finish button.

• You will find added CVS Repository appearing at the right side bottom panel of the Eclipse screen.

10

Page 12: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Working with CVS In case you are storing the entire project in the CVS Repository, you can follow the below procedure to checkout the project.

• Select the required <Project Folder> in the CVS repository tree.

• Right -click and select the Check Out menu.

• You will find the whole project checked out under the <Workspace root> In case you choose to store only the source folders and resources in the CVS. You can check out the source files from CVS repository into your project using the procedure given below: Check out the source files from CVS repository into your project

• Select the required <Source Folder> directory in the CVS repository tree. Right-click and select Check Out As menu.

• Select the "Checkout into an existing project" option. Click Next.

• Here all the currently open projects are listed. Select the appropriate project and click Finish.

• You will find the source files checked out under the source folder in your project. You can check in / update / get CVS Diff of the modified source file using the procedure given below: Check in the modified/new source files into CVS repository from the project

• Double-click on the source file to open it. Modify the source code as required.

• Test the source code changes as explained.

• Select the modified source file in the project tree.

To Commit the source file o Right-click and select Team > Commit menu.

To Update the source file

o Right-click and select Team > Update menu.

To get CVS Diff for the source file o Right-click and select Compare With > Latest from HEAD menu

11

Page 13: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.3 Viewing Project Details Overview Properties for the project created in Eclipse are set based on the information provided in the New Project Wizard. The properties are applied for the complete project. To modify/edit the WebNMS Home Details, invoke the Project Properties dialog. By default, the Project Properties dialog displays all the information set in the Project Wizard at the time of the creation of the Project.

• Project Properties

• Modifying WebNMS Home Details

• Deployment Jar Configuration Project Properties is used to view the Project Details. Project Properties Select the project in the Package Explorer , you can notice Project Properties menu and icon get enabled.

• Select WebNMS > Project Properties menu. Alternatively, you can click the Project Properties toolbar button. o EMS Project Properties screen pops up. o In the EMS Project Properties screen, Project Details such as Project Name ,

WebNMS Installation Directory, WebNMS Context , WebNMS Version, ServicePack Version are displayed.

• Click OK. Modifying WebNMS Home Details

• Click Browse to modify the WebNMS Installation Directory. Classpath/Buildpath for the project will be automatically updated with the newly specified WebNMS Home.

12

Page 14: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

• Click the Edit button to configure the deployment jar and type for the source folder.

• Click the OK button to save the changes in the ProjectDetails.xml file.

Deployment Jar Configuration The Deployment Jar Configuration option is also available in the Project Properties dialog. To change the deployment jar and type of the source folder, select the Source folder row and click the Edit button. From the dialog, select the jar and type from the drop down list boxes. The deployment jar and type can be modified for SOURCE and CLIENT. Follow the steps given below to create a new jar:

1. In the Select jar and type for source folder dialog, click the Create New Jar button. The Create New Jar dialog will be displayed.

2. Enter the name of the jar to be created.

3. Click OK. The jar name gets added to the combo box.

4. Click OK in the Select jar and type for source folder dialog. The details will be updated in the row of source folder.

13

Page 15: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Note: While packaging the project, the class files present in the output class of the source folder will be packaged with the newly created jar name.

Note: In the Deployment Jar Configuration, if the Common.jar is selected as the deployment jar for the source folder, the class files present in the output classes of the source folder will get packaged into the Server.jar and Client.jar. Therefore, when there is requirement to have the class file in both the server and client classpath, then the Common.jar option can be selected.

14

Page 16: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.4 Working with Files

• Overview

• Steps to import WebNMS configuration files to Eclipse

Overview In Eclipse, files (xml, java, conf, txt, etc.) can be created and edited. All source files generated in the Project and configuration files copied to the workspace can be viewed, edited and user code can be added as required. Steps to import WebNMS configuration Files to Eclipse In Eclipse, it is possible to Import a file from the local file system into the workspace. To Import the WebNMS Configuration files to Eclipse, it is necessary to follow the following steps.

• Right Click the Package Explorer Window and select Import option. "Import" Dialog screen is displayed

• In the "Import" Dialog screen, Select Import WebNMS Conf File from Conf File Import

• Click Next button to view the " WebNMS Conf File Import " wizard.

• In the Import WebNMS Conf File screen , import a file from the given WebNMS installation directory into the EMS Development project.

• In the Select File text field , Click Browse to select the file that is to be imported.

• Select the Parent Folder to where the files are to be imported. (By default the file will be placed inside the "<projName>/resources" directory in the same directory structure as present in WebNMS.)

• Click Finish button. The file gets imported to the Parent Folder in the Package Explorer Window.

15

Page 17: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.5 Working with External Tools You can develop Configuration Management and Chassis applications and deploy the applications from the Eclipse IDE itself.

• Deploy the developed application on WebNMS using Deployment Wizard menu.

• Create a configuration management application using Configuration Wizard menu.

• Create a device chassis application using Chassis Wizard menu. Deploy the Developed Application on WebNMS After developing the EMS application and packaging it as a NAR file, you need to deploy it in WebNMS. Use the Deployment Wizard to install the NAR file over WebNMS. The Deployment Wizard automatically takes care of conf files and resource related changes. You can also use the Deployment Wizard tool to deploy Chassis and Configuration applications. You can invoke the Deployment Wizard by using the WebNMS > Tools > Deployment Wizard menu. For details on deploying developed Application read to the section Developer Guide > Designer Tools > Deployment Tool. Building Configuration Management Application Configuration Management is one of the functional areas of network management, concerned with setting or modifying values for managed element attributes. This enables the control of managed resources, including ensuring the commence operation in the desired states, possess the proper parameter values and form the desired relationship with other network components. You can invoke the Configuration Management Wizard by using the WebNMS > Tools > Configuration Wizard menu. For details on building Configuration Management Application read to the section Building Configuration Management Applications. Building Chassis Management Application A chassis is a representation of the physical frame or structure of a multi-component device. A chassis management application is typically used to monitor the ups and downs of the device, configure ports, or manage fault in the device. You can invoke the Configuration Management Wizard by using the WebNMS > Tools > Chassis Wizard menu. For details on building Chassis Management Application read to the section Building Chassis Management Applications. Performing Security Administration Operations The Security Administration User Interface can be invoked from Eclipse, and used to configure the security information in the WebNMS. You can invoke the Security Administrations UI by using the WebNMS > Tools > Security Admin Tool menu. For more details on Security Administration, please refer to the Security Services section in the Developer Guide.

16

Page 18: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.2.6 Integrating WebNMS Studio help The Eclipse InfoCenter offers an actively maintained output for WebNMS EclipsePlugin Help. It enable users to access the WebNMS Eclipse Plugin help contents. For this the WebNMS Eclipse Plugin help contents have to be integrated into Eclipse InfoCenter. This helps the customers (developers) to view the information at offline or at a remote client site. It guides the user to work with Eclipse Plugin and other related external tools. Follow the below steps to integrate WebNMS Eclipse Plugin help into Eclipse InfoCenter.

• Apply the WebNMSEclipsePlugin in your eclipse installation by unzipping the WebNMSEclipsePlugin.jar in the <Eclipse Install Home>. Please refer Procedure to start Eclipse IDE for more details.

• Inside the <Eclipse Install Home>/plugins directory the help plugin archive (com.adventnet.nms.EMSDevelopment.help_1.0.0.jar) will be available. Extract this jar file into a folder with name as 'com.adventnet.nms.EMSDevelopment.help_1.0.0'. Now the help plugin is converted from Archive format to exploded format.

• Download the Eclipse Plugin Help documentation Zip from http://www.webnms.com/webnms/documentation.html. Rename the zip as "doc.zip" and place it in the <Eclipse installed directory>/plugins/com.adventnet.nms.EMSDevelopment.help_1.0.0

Now Restart Eclipse with the "-clean" option. To invoke Eclipse InfoCenter in Eclipse Plugin, Click Help->Help Contents.

17

Page 19: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3 Customizing Services In order to build a complete EMS solution, you need to customize the various services offered by WebNMS. In this section, you will see how Eclipse Plugin helps you customize each of these services and what are the various tools Eclipse Plugin offers to customize each of these services. To start customizing the various services, the first step is modeling the resources to be managed. Accordingly, this section starts with modeling resources and goes on to customizing the management services of WebNMS. The topics are arranged in a fashion that is typical of the order in which Services are customized in an EMS building cycle.

• Resource Modeling

• Discovery

• Map

• Fault Management

• Provisioning

• Performance Management

• Server Configuration

• Configuring Policies

• Setting Logging Parameters

• Configuring Backup Service

• Setting Failover Parameters

• Debugging Applications Built in Eclipse

• Rebranding

18

Page 20: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.1 Modeling Resource Modeling your resources is made very easy and comprehensive with the Model Managed Object Wizard. With the Wizard, you can model your device as a managed resource for WebNMS in four easy steps. The Managed Object Wizard generates the hibernate mapping file for the managed resource. The Generate Java Source menu can be used to auto-generate the java code for the Managed Object. From the Model Managed Object Wizard, you can

• Extend Base Objects from a set of parent resources.

• Add attributes from MIB files.

• Configure field sizes for attributes depending on the database. To work with the Managed Object Wizard for creating managed resources, please read Creating Managed Resource. To model other resources such as extended Alert, Event, and User-Object (that do not extend any of the ManagedObject base classes) also the same Model Managed Object Wizard cab be used. Please refer the following sections for more details:

• Extending Events

• Extending Alert

• User-Object Modeling

19

Page 21: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.1.1 Creating Managed Resource

• Overview

• Model a Managed Object

• Generate a Java Source Code

• Actions for Modifying and Deleting the MO

Overview

The first step in creating an EMS application is Modeling the Managed Resources, this is done using the Model Managed Object Wizard. This wizard will guide you through the steps of defining the ManagedObject properties. The final output of this wizard is the hibernate mapping file. This file can in turn be used to generate the bean class using the Generate Java Source menu. The key feature of the wizard is the MIB support provided to simplify the task of defining unique properties for the Managed Resource

Model a Managed Object

Select the project or source folder in the Package Explorer , you can notice Model Object menu and icon get enabled.

• Select WebNMS > Modeling > Model Object menu. Alternatively, you can click the Model Object toolbar button. Package Structure Editor screen pops up.

• In the Package Structure Editor screen, enter the package name of the managed object in the Package Name text field and enter modeled or extended object name in the Modeled/Extended Object Name text field.

• Click Next button. Component MO Table Details screen pops up.

• In the Component MO Table Details screen, select Topo for the Select Module option, select com.adventnet.nms.topodb.ManagedObject (or other default ManagedObject class) from the drop down list for the Parent MO/Extended Object Name option. Refer to the topic WebNMS Default Managed Objects in NMS Developer Guide for more details.

• Fill the Discriminator Value. This is a string that uniquely represents this object. By default, this is the same as the Managed Object name.

• The Generate Java Source option will be selected by default. On completing the wizard, the java source will be automatically generated for the modeled MO with this option selected. If the option is de-selected, the java source will not be generated. The generated source file will be placed under the SERVER source folder. To store the file in a different source folder in the project, select the folder from the drop down box.

• Hibernate advanced properties that corresponds to each of the extended managed resource is shown below. The default value is false. You can enable these properties only if you need to configure some advanced fetching strategy at the hibernate persistence level.

o Is dynamic update required: This corresponds to "dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated at runtime and contain only those columns whose values have changed."

o Is select before update required : This corresponds to "select-before-update (optional, defaults to false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. In certain cases

20

Page 22: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

(actually, only when a transient object has been associated with a new session using update()), this means that Hibernate will perform an extra SQL SELECT to determine if an UPDATE is actually required."

o Enable lazy fetching: This corresponds to "lazy (optional): Setting lazy="true" is a shortcut equivalent to specifying the name of the class itself as the proxy interface.The optional proxy attribute enables lazy initialization of persistent instances of the class. Hibernate will initially return proxies which implement the named interface. The actual persistent object will be loaded when a method of the proxy is invoked."

o Is dynamic Insert required:"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null."

o Mark superclass as abstract:If your superclass is abstract, map it with abstract="true". Of course, if it is not abstract, an additional table is needed to hold instances of the superclass. Refer the section 9.1.5. Table per concrete class for more details.

• Click the Configure other Mapping Properties button to configure additional mapping properties for the MO. When the button is clicked, Join-SubClass Attribute Viewer screen pops up. For more details regarding the hibernate properties refer the hibernate documentation

• In the Join-SubClass Attribute Viewer screen, enter the Attribute Value against the Attribute Name for the required attributes. The attributes are given below:

entity-name node subselect persister check catalog batch-size schema proxy

• In the Join-SubClass Attribute Viewer screen, click the Save button to save the additional attributes for the MO and Cancel button to cancel the additional attribute configuration.

21

Page 23: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

• Click Next button to view the MO Property Details screen

• In the MO Property Details screen, click Add button to add properties for the MO. The columns name, type, column, length will become editable. Enter the appropriate values. Select the row of the property and click Delete button to delete the property.

• Alternatively, the properties of the managed object can also be selected from a MIB file. Click Attribute Selection button, to select attributes for MO from a MIB.

o In the Attribute Selection screen, to load the required MIB, click Load MIB button. Open the MIB tree and select the required MIB tree node. Once the required node is selected, Add button in the center of the screen will be enabled and the description about the selected node will be displayed in the Description text box. Now Click Add Button and then click on Save Button.The selected MIB node will appear in the Selected Attributes text box. To remove the attributes from the Selected Attributes list, select the attribute(s) in Selected Attributes list and click Delete button.

o When selecting the desired node in the MIB as the property, the java value for the selected snmp datatype will be set in the type column of the table. This mapping is configured in the SnmpDataTypes.txt file present in the <Project Home> folder. Users can configure additional datatype mapping in the SnmpDataTypes.txt as per the requirement.

• While modelling the MO, hibernate specific properties can be added as column to the table. On clicking the Additional Property button, the hibernate specific properties will be listed. To add a property to the table, select the check box for the property and click the Save button. To remove the added property from the table, de-selected the property and click the Save button.

Note: The additional hibernate specific properties is not mandatory, and the wizard can be completed by providing values for the default columns (PropertyName,Column,Type,Length).

• Click Finish button to complete MO Modeling.

22

Page 24: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

You will find the modeled MO under <Your Project>/Referenced Libraries/resources/classes/hbnlib/<Package of MO>/ <Modeled MO> in the Project Explorer window. The next step is to generate the Java source code for the Modeled MO using Java Source Generator. Generate a Java Source Code Generate Java Source is to create the source code for the Modeled MO from the Xml file. Select the project or source folder in the Package Explorer, you can notice Generate Java Source menu and icon get enabled.

• Select WebNMS > Modeling > Generate Java Source menu. Alternatively, you can click the Generate Java Source toolbar button. Java Source Generator screen pops up.

• In Java Source Generator screen , select the Xml file (multiple Xml files can also be selected) for Generating Java Source and click >> button.

• Select the source folder to generate the Java source.

• Click OK.

It will generate the Java source code for the hibernate mapping files that are selected. Modifying an Managed Object There are two ways in which an Managed Object can be modified.

• Directly from the Project Tree • Using the Modify Object Wizard

Directly from the Project Tree

o Edit the <Modeled MO>.hbm.xml generated under <Your Project>/Referenced Libraries/resources/classes/hbnlib/<Package of MO> in the Project Explorer window.

o Modify/Add the required properties and save the changes.

23

Page 25: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

o Now generate the Java Source using WebNMS > Modeling > Generate Java Source menu for the modified XML.

o Select the modified <Modeled MO>.hbm.xml file and click OK. It will ask a prompt message to replace the file.

o Click OK. It will generate the Java source code for the hibernate mapping file that is modified.

Using the Modify Object Wizard

o Select WebNMS > Modeling > Modify Object from the main menu. Alternatively, you can click the Modify Object toolbar button. Modify XML file screen pops up.

o Select the XML file and click the >> button.

o Click the Modify button. The MO Modeling wizard will be invoked with the populated values.

o The Package Name and Modelled/Extended Object Name text field will be non-editable.

o In the MO table details page ,the Module Selection will be non-editable. All the other fields will be editable and the values can be modified.

o Click the Next button to go to MO Property Details page. The properties can also be edited.

o Click the Modify button to complete the Modify Object Wizard.

Deleting an Managed Object

• Directly from the Project Tree • Using the Delete Managed Object Wizard

Directly from the Project Tree To Delete the Managed Object, delete the generated .java file and <Modeled MO>.hbm.xml file in the Package Explorer window in the eclipse. Remove the corresponding entry from the <Your Project>/Referenced Libraries/resources/classes/hbnlib/<Package of MO>\hibernate.cfg.xml file. For Example, The steps to delete managed object say Card is shown below,

24

Page 26: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

o Right Click Card.java file present in Package Explorer window under <Your Project>/SERVER/<Package of MO>/Card.java and select delete.

o Right Click Card.hbm.xml file present in Package Explorer window under <Your Project>/Referenced Libraries/resources/classes/hbnlib/<Package of MO>/Card.hbm.xml and select delete.

o Remove the entry Card.hbm.xml from the <YourProject>/ReferencedLibraries/resources/classes/hbnlib/<Package of MO>\hibernate.cfg.xml file. Before deleting the Managed Object Card, the entry in hibernate.cfg.xml file will be as shown below

<mapping resource="com/adventnet/nms/tutorials/ems/AccessPort.hbm.xml"/><mapping resource="com/adventnet/nms/tutorials/ems/Card.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Port.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Shelf.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Slot.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Trunk.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/TrunkPort.hbm.xml"/>

After deleting the Managed Object Card, Card.hbm.xml entry will not be present in hibernate.cfg.xml.

<mapping resource="com/adventnet/nms/tutorials/ems/AccessPort.hbm.xml"/><mapping resource="com/adventnet/nms/tutorials/ems/Port.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Shelf.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Slot.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/Trunk.hbm.xml"/> <mapping resource="com/adventnet/nms/tutorials/ems/TrunkPort.hbm.xml"/>

Using the Delete Managed Object Wizard

1. Select WebNMS > Modeling > Delete Object menu. Alternatively, you can click the Delete Object toolbar button. The Delete Managed Object dialog pops up.

2. Select the XML file that needs to be deleted.

3. Click the Delete button.

Note: When all the Managed Objects under a particular package <Package of MO> are deleted, the package <Package of MO> will also be deleted from the Project Explorer window .

25

Page 27: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.1.2 User-Object Modeling The Procedure to Model a User Object is similar to the steps followed in Modelling a Managed Object except that in the Component MO Table Details screen, select user-storage for the Select Module option instead of topo. Once the user-storage is selected , Parent MO/Extended Object Name gets disabled. For further details, refer to the section , Model a Managed Object. In the case of user-storage option, it is necessary to specify the primary key. If single property is selected as Primary key, then select the Generator types from the list.

• Native

• Assigned

• Sequence

• User-defined By default , Native type is selected. only in the case of User-defined type , it is necessary to Specify the User class. If more than one property ( composite key) is selected as Primary key , then it is necessary to enter the Composite Identifier Class Name. Click Finish Button.

To generate the Java source code for the Modeled user object from the Xml file, refer to the section Java Source Generator for more details.

Note: When the data type is String for a column, the Generator types available in the list are Assigned and User-defined only. For other data types all four Generator types will be displayed for selection.

26

Page 28: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.2 Discovery The discovery engine of WebNMS discovers devices and network components and adds them to the database. By configuring the discovery process of WebNMS, you can define the devices that have to be discovered / ignored and the criteria for adding them to the database so that they are subsequently managed by WebNMS. Discovery Filter: During the discovery process, the NMS discovery engine passes each network element through the discovery filter. The devices that satisfy the filter criteria is added to the database. Using Eclipse , you can define Discovery filters for the resources to be managed. You can define either a Custom Discovery Filter or Discovery filter. Significance of Basic Discovery Filter : The discovery filter is useful for discovering only devices in the network. The Shallow Discovery Filter adds the discovered device as Managed Resource to the database. The user can set the properties for the Managed Resource based on the criteria defined in the wizard Significance of Advanced Discovery Filter : The Advanced Discovery Filter supports all the functions provided in discovery filter and additionally provides the logic for discovering devices having multiple parallel level hierarchies and pluggable components. The filter also enables adding user code to define properties of the components of the device. When the NMS discovery engine discovers a device and the device passes through the filter satisfying the filter requirements, the components and parallel level of hierarchies of the device are discovered in the order specified in the filter wizard. Discovery Configuration: Apart from writing discovery filters for discovering specific devices, you can also specify the network details so that the discovery engine will discover / ignore the specified networks. This is achieved using the Discovery Configurator tool. This section is organized into the following topics where the various possibilities for customizing discovery are discussed. These are followed by examples of defining discovery filters.

• Configuring Discovery using Discovery Configurator Tool

• Creating Discovery Filter

• Creating Advanced Discovery Filter For further concepts regarding WebNMS Discovery process, refer to the topic Discovery in WebNMS Documentation.

27

Page 29: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.2.1 Configuring Discovery - An Introduction

• Overview

• Invoking the Discovery Configurator

Overview The discovery process can be configured to force the discovery of remote networks/nodes or to prevent the discovery of specific networks/nodes/local network. This is done by invoking the Discovery Configurator tool. The general properties of the seed.file/tl1seed.file can be configured from the Discovery Configurator. The properties of the seed.file are updated with the values set in the wizard. Invoking the Discovery Configurator The seed.file configuration has to be done directly in the WebNMS installation. For this you can invoke the DiscoveryConfigurator tool from the <WebNMS Home>/bin/admintools directory. The seed.file present in the <WebNMS Home>/conf directory will be loaded by this tool. Alternatively this file can be imported into the Eclipse Project using the Import WebNMS Conf File Wizard. Please refer the Working with files section for more details on importing the file. Then it can be opened in Eclipse and be edited manually

Warning: It is better to use Discovery Configurator to carry out configuration changes in seed.file. Incase seed.file is manually configured, please ensure that XML format is not violated as it will throw parse exceptions. In such an event, exception message is printed in logs and discovery engine will start with default seed configurations and also new seed.file will be overwritten with default configurations.

For more details on the working of the Discovery Configurator Tool, please refer to the section Configuring Discovery

28

Page 30: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.2.2 Creating Basic Discovery Filter

• Overview

• Creating a Basic Discovery Filter

Overview The WebNMS discovery engine is geared towards discovering the IP networks and their elements. The discovery engine associates a discovered resource with one of the default ManagedObjects and adds it into the database. By default, the discovery process only finds new elements on managed networks which are normally the networks directly attached to the WebNMS system. Discovery filter is a user-defined class which allows you to specify custom rules for filtering discovered objects before adding them to the database. The discovery filter can perform the following :

• Stop the object from getting added into the database by returning null.

• Modify some properties of the object.

• Perform deep discovery where discovery of one object leads to recursive discovery. The Discovery Filter adds the discovered device as Managed Resources. This simple discovery filter will generate only stub code for discovering a single device and adding to database. It aslo generates some utility methods for querying the SNMP device for properties of the ManagedObject. Creating Basic Discovery Filter Use the Create Discovery Filter wizard to discover a single device, which is modelled as a managed object. With the filter created using this wizard, you can discover a device, which is not having any sub components. The generated filter will have the stub code to discover, to instantiate a modelled MO and add it to the database. You have to modify the generated code to fetch and add more properties to the MO and modify the existing properties. Select the project or source folder in the Package Explorer, you can notice Create Basic Discovery Filter menu and icon get enabled.

• Select WebNMS > Filters > Discovery > Create Basic Discovery Filter menu. Alternatively, you can click the Create Basic Discovery Filter toolbar button. "DiscoveryFilter Creation Wizard" screen pops up. o In the Discovery Filter Properties screen, enter the package name of the discovery filter

in the Package Name text field, enter the discovery filter class name in the Filter Class Name text field.

• Click Finish button. You will find the <Discovery Filter class> under <Your Project>/source folder in the Project Explorer window.

29

Page 31: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Refer to Associating Discovered Resources to Managed Objects in WebNMS Developer Guide for further details The corresponding entry for this Discovery Filter implementation class will be inserted in the discovery.filters file present in <Your Project>/resources/conf directory. You can rearrange the order of the discover filter entry in this file as per your requirement as each Managed Object discovered in WebNMS will be passed through all the discovery filters listed in the discovery.filters conf file.

30

Page 32: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.2.3 Introduction: Advanced Discovery Filter

• Advanced Discovery Filter - An Overview

• Prerequisites

• Final Output

• How the Advanced Discovery Filter works

Advanced Discovery Filter - An Overview Eclipse provides the option of creating a discovery filter for devices having either one or all the following features:

• Parallel Level Hierarchy In Device

• In Devices Where the MIB Does Not Capture the Actual Device Hierarchy

• Pluggable Components in Device Parallel Level Hierarchy in Device and where components in the device are of multiple types: The Advanced Discovery Filter supports parallel level multiple hierarchies in a single device. For example, a filter can be defined for a device which has the following hierarchy:

Device | |____Card | | | |____Port | |____Fan | |____SwitchFabricCard | |____PowerSupplyModule

In Devices, Where the MIB Does not Capture the Actual Device Hierarchy: The Advanced Discovery Filter is not MIB specific and supports capturing of parent-child relationship through the UI. This Advanced Discovery Filter encapsulates the device hierarchy which is common across all devices independent of the protocol it supports. The user code is added only for querying the device hierarchy parameters. Pluggable Components in a Device : The Advanced Discovery Filter supports defining components in a device which are pluggable at runtime. The discovery of the device and its sub-components does not depend on the plugged out component. For example, the discovery of the device such as the Dsalm Device continues even if a Card plugged in the device is plugged out at runtime. Prerequisites

• It is necessary to model your device and its sub-components as a managed resources before creating the discovery filter for WebNMS to discover the device and its sub components.

31

Page 33: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

• A good deal of knowledge about the hierarchy of all the sub components of the device is essential.

• It is necessary to know about the protocol and how to query the device for each property of the managed resource representing the device or component of the device.

The next section Creating Advanced Discovery Filter will explain more about the Advanced Discovery Filter. Final Output The files that are generated as the final output of the Advanced Discovery Filter are: DiscoveryFilter.java: The device hierarchy as modeled by the user is encapsulated in the java file. The class takes care of instantiating and adding the managed resource (device and its sub-components) to the database. DiscoveryFilterAdapter.java : It permits users to plugin his/her own implementation for device contact queries (such as getting index information, getting the number of components, filling the properties for the instantiated Managed Resource). DiscoveryFilter class will instantiate DiscoveryFilterAdapter class and invoke all the method to fill the properties of the Managed Object and sub-componenets. Adapter class has only skeleton code. User should implement the business logic for quering the device for different properties of the managed object. How the Advanced Discovery Filter Works The Advanced Discovery Filter for devices having parallel hierarchies, discovers objects in the first level along with its children components. It then proceeds to discover the second set of components in the next hierarchy along with its children components. The loop continues until all the components in different hierarchies are discovered. The process in which the Advanced discovery filter works is explained below. For example for a Device having the following hierarchy DslamDevice |-DslamSlot (15 slots) - DslamCard (ATMCard, CPU Card) -Dslam Port -FanTray where the DslamSlot and FanTray are in the same hierarchy, the discovery engine discovers the objects in the following order.

• Discovers DslamDevice

• Discovers all the 15 DslamSlots

• Discovers ATM/CPU Card

• Discovers DslamPort

• Discovers FanTray

32

Page 34: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.2.3.1 Creating Advanced Discovery Filter

• Overview

• Creating Advanced Discovery Filter

Overview The Advanced discovery filter provides the logic for discovering devices having multiple parallel level hierarchies and pluggable components. The generated filter essentially contains stub code, where users can add code to define properties of the components of the device. When WebNMS discovery engine discovers a device and the device passes through the filter satisfying the filter requirements, the components and parallel level hierarchies are discovered in the order specified in the filter wizard. Creating a Advanced Discovery Filter Select the project or source folder in the Package Explorer, you can notice Create Advanced Discovery Filter menu and icon get enabled.

• Select WebNMS > Filters > Discovery > Create Advanced Discovery Filter menu. Alternatively, you can click the Create Advanced Discovery Filter toolbar button. "Create Advanced Discovery Filter" wizard screen pops up. o In the Advanced Discovery Filter Properties screen, enter the package name of the

advanced discovery filter in the Package Name text field, enter the discovery filter class name in the Discovery Filter Class Name text field, and in the Adapter Class Name non-editable field you will find the value <Discovery Filter Class Name>Adapter.

o Click Next button to view the Device Properties screen. o In the Device Properties screen, enter the type of the device in the Device Type field

and enter the modelled MO class name in the Modelled MO Resource Class Name text field (The MO class name should be a fully qualified class name modelled to represent this component).

o Click Next button. The Component Hierarchy Properties screen is displayed. o Component Hierarchy Properties screen is used to define the hierarchy of all the sub

components of the device being modelled. Once the device is discovered, these details will be used to discover the sub components as per the hierarchy defined in this screen.

o Component Name text field: Enter a unique name to identify the sub component. Please refer to the below screenshot for more details.

o Parent Component Name field: For the first level component the device will be the parent component. For the subsequent level components, components one level higher will be the parent component. Example: for a Port component, the respective card will be its parent component. Once a component (e.g., ATM, CPU card) is added to the hierarchy, it will be listed in the combo box of this field. When defining the next level of sub component (e.g., DSLAM Port), select the parent component from the combo box.

o Is No. of Components contained in parent > 1?: Select the check box, if the parent component can contain multiple components. A single card can have many number of ports (16-32 ports). While adding the port component, set the value as True.

o Component MO Class Name text field: Enter the fully qualified class name of the MO modelled to represent this sub component.

33

Page 35: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

o Is component of multiple types?: In some devices, a component can be of multiple types. For example, a Card component, which will be fitted into Slot (DslamSlot), can be two types i.e., CPU and ATM. The two different types of cards will have different values for certain properties. Select this check box if the sub component can be of multiple types. Discovery filter will try to identify which type of managed object should be placed inside the parent component. There should be provision in your device which specifies the type of card that should be placed in the parent component. So this value got from the device is the Type Identifier.

o If you select Is component of multiple types? check box, you will find Type Name and Type Identifier text fields appearing below the check box. Type Name is the Unique string representing each type or sub-component. Refer the values shown in the table (in the screenshot) for clear understanding. Enter the sub component type name in the Type Name text field and the corresponding sub component type identifier in the Type Identifier text field. The Type Identifier will be used for identifying the type of component being discovered. Suppose, If we have 10 slots, slot 1 contains ATM Card and slot 2- 9 contains TrunkCards. In our example, ATM Card will be identified by Type Identifier 1 and Trunk Card will be identified by Type Identifier 2. One of the properties of the component should match this identifier value.

o Click Add button to add the sub components in the Components table. o If you want to modify a particular sub component, select the row in the Components table.

The details will be displayed above the table. Modify the values as required and click Modify button. Now the modified values of the sub component will appear in the Components table.

o If you want to delete a particular sub component, select the row in the Components table and click Delete button.

• Click Finish.

34

Page 36: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

You will find the <Advanced Discovery Filter class> and <Advanced Discovery Filter adapter class> under <Your Project>/source folder in the Project Explorer window. The corresponding entry for this Discovery Filter implementation class will be inserted in the discovery.filters file present in <Your Project>/resources/conf directory. You can rearrange the order of the discover filter entry in this file as per your requirement as each Managed Object discovered in WebNMS will be passed through all the discovery filters listed in the discovery.filters conf file.

35

Page 37: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.3 Maps Map is a symbolic representation of the network topology which NMS manages. A map consists of one or more of the following objects:

• Symbols that represent managed resources

• Map links that represent the connection between resources

• Groups that represent a set of resources grouped logically, eg. all SNMP nodes can be an SNMP group

• Containers that contain resources within them From the Eclipse Project, you can customize Map service by defining a Map Filter, creating custom Maps, defining renderers and layouts for the maps. Map Filter: When you define a Map filter, the filter is called when a managed resource is added to the database. If the managed resource satisfies the filter criteria, a map object (one of the above four objects) will be created and added to the map database. Once this object is added to the database, it will be propagated to the client where it will be displayed in the Map. From the Map filter, you can define the extra properties that you want your map object to have, so that when the same is displayed in the Map, these properties are reflected. Creating Custom Maps: You can define your own maps using the maps.conf configuration file. More details regarding defining your own map can be found in the section on creating Custom Maps. Apart from these, you can define your own Map Layouts and Renderers from the Eclipse . These are additional java files that you have to create to specify the map layout and rendering characteristics. More information on layouts and renderers can be found in the WebNMS Developer Guide in Maps -> Customizing Map Client.

• Creating a Map Filter

• Creating Custom Maps

36

Page 38: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.3.1 Creating Map Filter

• Overview

• Creating a Map Filter

Overview Map filter is a powerful mechanism to create maps and map symbols. The discovered Managed Objects are displayed in the client as map symbols. Manipulation of these map symbols can be done using Map filter, which is a user-defined class which allows you to customize the map objects by adding / updating the properties before they are added into the database. Map filters are invoked by the map server whenever a notification for an update is received from the topology module. Map Filter is the interface through which you are given access to the map symbols before they get added to the map database. Using the map filter, you can add/update/delete map symbols or their properties. Filter Creation Wizard will help you define a Map filter for Managed Objects. You can create Map, Map Containers, Map Symbols, and Map Links for your Managed Object. The final output of the Map Filter tool is the stub code implementing the MapFilter interface. You have to write implementation code for the filterSymbols method where you can manipulate the mapSymbol properties, create new symbols or create and add new maps to the database

Creating Map Filter Select the project or source folder in the Package Explorer, you can notice Create Map Filter menu and icon get enabled. Alternatively, you can click the Create Map Filter toolbar button.

• Select WebNMS > Filters > Map > Create Map Filter menu. o "MapFilter Creation Wizard" screen pops up. o In the Map Filter Properties screen, enter the package name of the map filter in the

Package Name text field, enter the map filter class name in the Filter Class Name text field.

• Click Finish button. You will find the <Map Filter class> under <Your Project>/source folder in the Project Explorer window.

37

Page 39: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Also the entry for this MapFilter implementation class will be appended to the map.filters configuration file present in <Your Project>/resources/conf directory. You can rearrange the entries as per your requirement as the filters will be invoked based on the order in which they are listed in this file. For more details on Creating a Map Filter, refer to Creating Maps and Map Objects in WebNMS Developer Guide.

38

Page 40: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.3.2 Creating Custom Maps A custom map shows objects that satisfy a specific match criterion (i.e., You choose custom maps when you are able to specify a common criterion, say isSNMP="true" or type="windowsNT" etc.) The input control for creating maps is provided by the entries in the maps.conf file, which determine how the network elements will be modelled. The output of the Topology service, that is the managed objects, can be manipulated by using the maps.filter or mapIcon.data files. These files contain configuration details to add or modify managed objects before they are added to the database. To create custom maps use the file maps.conf. The entries specified in maps.conf file are read when the Map Server starts. If an entry with criteria has been added in maps.conf to create a Map, the ManagedObject satisfying the criteria is added to the Map automatically by the MapServer. To add entries in the maps.conf file, first import the maps.conf file present in <WebNMS Home>/conf directory into your Eclipse project using the Import WebNMS Conf file Wizard. To Import maps.conf file , please refer to the section Working with Files. Then open the file in eclipse and add the entry for custom map specifying the match criteria. For detailed explanation to create custom maps, refer to Customizing Map Client in WebNMS Developer Guide.

39

Page 41: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4 Fault Management Fault management focuses on problem detection, diagnosis and rectification. WebNMS offers comprehensive fault management services such as trap processing, event and alert management, alarm correlation etc. From Eclipse, it is possible to customize Fault service to specific requirements. Using the Model Managed Object Wizard, you can define your own event object extending NMS event. Similarly you can define your own alert object extending NMS alert. The relevant hibernate mapping file and the bean source are generated automatically. Once these objects are defined, you can write the Trap Filter that will filter the incoming traps and generate the required events. Please read the topics Extending Events and Extending Alerts to know more. For further details regarding extending Events and Alerts, please refer the section Fault Management in WebNMS Documentation. Trap processing is an important aspect of fault management. This involves filtering the incoming traps based on certain criteria and generating events based on the result. In Eclipse, the Trap filter wizard helps to define the filter criteria and process traps of various kinds. The output can be generation of an NMS event or an extended event or modified Trap PDU. More details on how to define Trap filter in Eclipse can be found in Creating Trap Filter section. Once events, alerts are defined and trap filter written, you have to configure the port where traps will be received for processing. You can know more about this from the topic Configuring Trap Ports. Apart from trap processing, Status Polling is another important activity in Fault management. This is defined as 'periodically verifying the status of objects by polling them for certain parameters'. From Eclipse, you can write your own Status Poller using the Status Poller wizard. As a prerequisite, you have to define your resources to be managed, so that you can define the parameters to be polled and the polling interval. Read the topic Creating Status Poller.

40

Page 42: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.1 Extending Events Events are the basic units of fault management. The event object has certain properties defined to identify the events. Users can have additional user properties for their convenience. More number of user properties degrade performance as database queries increases with the number of user properties. Users should understand the fact that user properties feature is provided for adding a few properties in the event object without extending the event object. If the user wishes to have more number of user properties, then it is better to extend the event object and add the desired properties. Need to Extend Events Based on the device types and the need for additional properties, the decision whether to extend the events or not is to be taken. If the networked environment includes specific devices which need more properties to represent an event object, then it is recommended to extend the events. Extending Event Object The Procedure to Extend Event Object is similar to the steps followed in Modelling a Managed Object except that in the Component MO Table Details screen, select event for the Select Module option instead of topo, select com.adventnet.nms.eventdb.Event from the drop down list for the Parent MO/Extended Object Name option. The generated source for the Event object has the parent resource extending an event class. For more details, refer to Model a Managed Object. Extending the Event Class While extending the Event class, the following points are to be noted:

• The id is the primary key in the Event table.

• All extended Events will have id as primary key. Refer to Writing Extended Event Class in WebNMS Developer Guide for further details.

41

Page 43: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.2 Extending Alerts An Alert represents a failure or fault in a network element with a condition, that may need attention. Alerts can be extended for incorporating additional properties. Users can have additional user properties for their convenience. More number of user properties may result in lesser performance as database queries increases with the number of user properties. Users should understand the fact that user properties feature is provided for adding a few properties in the alert object without extending the alert object. If the user wishes to have more number of user properties, then it is better to extend the alert object and add the desired properties. Steps Involved in Extending Alerts The Procedure to Extend Alert Object is similar to the steps followed in Modelling a Managed Object except that in the Component MO Table Details screen, select alert for the Select Module option instead of topo and select com.adventnet.nms.alertdb.Alert from the drop down list for the Parent MO/Extended Object Name option. The generated source for the Alert object has the parent resource extending an alert class. For more details, refer to Model a Managed Object Extending the Alert class While extending the Alert class the following points are to be noted.

• The id is the primary key in the Alert table.

• All extended Alerts will have id as primary key. Refer to Extending Alerts in WebNMS Developer Guide for further details.

42

Page 44: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.3 Creating Custom Notification for Alert Filter and Event Filter

• Overview

• Creating Event Filter

• Creating Alert Filter

Overview Event / Alert filters allow the users to perform some action when a event / alert matching the specified criteria is received. In WebNMS there are pre-defined actions like:

• Suppress Action: Suppress all or some of the Events / Alerts matching this criteria.

• Run Command Action: Run a system command on the WebNMS server.

• Send Trap Action: Send v1 or v2c trap.

• Send E-mail Action: Intimate the Network Administrator through e-mail.

• Custom Filter: Invoke your own Java class for addressing application specific needs. In case of Event Filters, the Filter entry specifying the match criteria and the action to be performed is configured in the event.filters configuration file present in the <WebNMS Home>/conf directory. For defining the first 4 pre-defined actions, the Event Filter Configuration Tool can be used. Please refer the documentation Configuring Event Filters. In case of Alert Filters, the configuration details are persisted in the alert.filters file persent in the <WebNMS Home>/conf directory. The pre-defined actions can be configured using the Alert Filter Admin Tool. For more details regarding using this tool, please refer the Configuring Alert Filters documentation. When a custom action / notification is to be configured, the custom filter class needs to be created. Please refer the sections below for creating custom notification class for Event and Alert filters. Creating Event Filter Select the project or source folder in the Package Explorer, you can notice Create Event Filter menu and icon get enabled. Alternatively, you can click the Create Event Filter toolbar button.

• Select WebNMS > Filters > Fault > Create Event Filter menu. o "EventFilter Creation Wizard" screen pops up. o In the Event Filter Properties screen, enter the package name of the event filter in the

Package Name text field, enter the event filter class name in the Filter Class Name text field.

• Click Finish button. You will find the <Event Filter class> under <Your Project>/source folder in the Project Explorer window.

43

Page 45: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Creating Alert Filter Select the project or source folder in the Package Explorer, you can notice Create Alert Filter menu and icon get enabled. Alternatively, you can click the Create Alert Filter toolbar button.

• Select WebNMS > Filters > Fault > Create Alert Filter menu. o "AlertFilter Creation Wizard" screen pops up. o In the Alert Filter Properties screen, enter the package name of the alert filter in the

Package Name text field, enter the alert filter class name in the Filter Class Name text field.

• Click Finish button. You will find the <Alert Filter class> under <Your Project>/source folder in the Project Explorer window.

44

Page 46: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Note: The entry for the custom class created will be appended in the event.filters and alert.filters file for the Event Filter and Alert Filter respectively.

45

Page 47: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.4 Creating Trap Filter

• Overview

• Creating a Trap filter

Overview The trap requires processing before converting it into an Event. In this case, trap filters can be used to modify the SNMP PDU or construct an event object from the trap, before it is converted into an Event. This can be done by defining a Trap Filter. The Eclipse will help you to define Trap Filters. The Trap filter can function in any of the following ways:

• It can construct an Event object (or an extended event) from the trap PDU passed to it and return the Event object. In this case, the Event object will be passed through the event parsers and event filters, but not through trap parser.

• It can process and modify the Trap (SNMP PDU) and return the SNMP PDU passed to it. After successful modification of the properties, if the PDU properties match any of the remaining filter criteria, then the returned SNMP PDU will try to match with the remaining Trap Filters in the order defined, if any.

• It can drop the trap by returning "null". This restricts the trap from further processing by WebNMS.

Creating Trap Filter Select the project or source folder in the Package Explorer, you can notice Create Trap Filter menu and icon get enabled. Alternatively, you can click the Create Trap Filter toolbar button.

• Select WebNMS > Filters > Fault > Create Trap Filter menu. "TrapFilter Creation Wizard" screen pops up. o In the Trap Filter Properties screen, enter the package name of the trap filter in the

Package Name text field, enter the trap filter class name in the Filter Class Name text field.

o Enter the Match Criteria for filtering the trap. It includes V1 Trap, V2 Trap. For V1 Trap , enter the Enterprise OID , Generic Trap Type and Specific Trap Type. For V2C Trap , enter the Trap OID.

Parameter Values Allowed Generic Trap Type Integer value (range as specified in the MIB). Specific Trap Type Integer value (range as specified in the MIB), applicable only for

SNMP v1 and v2 Agents. Enterprise OID OID from MIB. Trap OID OID from MIB and applicable only to SNMP v2 and v3 Agents.

.

• Click Finish button.

46

Page 48: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

You will find the <Trap Filter class> under <Your Project>/ source folder in the Project Explorer window. Also the appropriate entry for this trap filter will be appended in the trap.filters file in the <Your Project>/resources/conf folder. You can rearrange the entries in this file as per your requirement to change the order in which the trap.filters are invoked. Refer to Configuring Trap Filters in WebNMS Developer Guide for further details.

47

Page 49: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.5 Configuring Trap Ports The port through which Traps are listened for or received is called a Trap Port. Port(s) can be configured to listen for traps, by making appropriate entries in the trapport.conf file. For this the trapport.conf file needs to be first imported into eclipse to the <Your Project>/resources/conf directory. Then it can be edited to change the value of the trap port. To Import trapport.conf file , please refer to the section Working with Files Refer to Configuring Trap Ports in WebNMS Developer Guide for further details.

48

Page 50: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.4.6 Creating Status Poller

• Overview

• Creating the Status Poller

Overview Polling can be defined as the sequential interrogation of devices for various purposes such as determining operational status or determining the readiness of the device to send or receive data. When polling is performed to determine the up/down status of any device at regular interval, it is called Status Polling. By default, in any network management system, status polling is done by pinging the device. Packets are sent, which are intended to trigger a response. Based on the confirmation response, the status of the device can be determined. If the status polling yields negative results, i.e., if the device is not responding, provisions are made to report the condition, which requires attention. The result of Status Polling acts as one of the inputs for Fault Management. It is very useful for devices that do not have the capability of sending notifications, when a failure occurs. Status Poller will be invoked when the status of a device is to be checked. Creating the Status Poller Select the project or source folder in the Package Explorer, you can notice Create Status Poller

menu and icon get enabled. Alternatively, you can click the Create Status Poller toolbar button.

• Select WebNMS > Filters > Fault > Create Status Poller menu. o "Status Poller Creation Wizard" screen pops up. o In the Status Poller Properties screen, enter the package name of the status poller in

the Package Name text field, enter the status poller class name in the Filter Class Name text field.

• Click Finish button. You will find the <Status Poller class> under <Your Project>/source folder in the Project Explorer window.

49

Page 51: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Note: In order to invoke your status poller for a ManagedObject in WebNMS, you need to set 2 properties for the ManagedObject in the DiscoveryFilter. (i) Set the 'tester' property to 'usertest', (ii) Set the classname of the Status Poller to the 'uClass' property.

Refer to Status Polling in WebNMS Developer Guide for further details.

50

Page 52: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.5 Provisioning The Provisioning Framework meets the needs of many Telecom Equipment Vendors and other equipment providers for provisioning and configuration of their devices, in a multi-vendor network. It enables service providers and system integrators to rapidly customize provisioning capabilities and add new support for multi-vendor networks. The Provisioning service is XML template approach using WebNMS's multi-protocol configuration engine that makes building solutions much simpler. The Provisioning Framework is an extensible server that enables application and domain specific extensions to be rapidly developed for specific needs, so that these extensions get all the power and benefits of the existing capabilities. Using Provisioning Framework, many different provisioning operations like configuring devices, updating database, activating a service etc. can be supported with minimal effort, and by simply creating and editing XML templates. Provisioning Framework provides 3 level filters Template, PreProvision, PostProvision to define the business rules. For more details on provisioning framework refer to section Provisioning Framework in WebNMS Developer Guide. The following topics are covered in this section

• Customizing Provisioning Capabilities

• Accessing Provisioning Extensions

51

Page 53: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.5.1 Customizing Provisioning Capabilities

• Overview

• Template Filters

• PreProvisioning Filters

• PostProvisioning Filters

Overview To enable custom processing of configuration data at each stage of provisioning, provisioning filters are supported which process the template data at various stages of the provisioning flow. The filters are Java code classes that get invoked during template processing. There will be one instance of each configured filter for each template. Provisioning Filters can be used to gather additional network and inventory data or from any other source. This allows complete extensibility for specific needs not met by the provisioning flow. It also allows to parameterize the template, so that many service provisioning needs can be met by setting up service templates that require only necessary user input. These provisioning filters will read XML rule files to determine how to process specific template. There are three kinds of provisioning filters, based on when these filters are applied.

• Template Filters

• PreProvisioning Filters

• PostProvisioning Filters Template Filters For detailed explanation on using template filters, refer to Using Template Filters in WebNMS Developer Guide. PreProvisioning Filters For detailed explanation on using PreProvisioning Filters, refer to Using PreProvisioning Filters in WebNMS Developer Guide. PostProvisioning Filters For detailed explanation on using PostProvisioning Filters, refer to Using PostProvisioning Filters in WebNMS Developer Guide.

52

Page 54: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.5.2 Accessing Provisioning Extensions Provisioning extensions can be used to build provisioning module extensions and expose that functionality via the provisioning APIs. The user written extensions can also work with the templates and extends the template processing capabilities in three ways.

• Extensions can support special processing of template data as part of every client interaction, i.e., sending and initializing template to client, initializing the provisioning activities after user input and sending the results back to the client. This includes bypassing some or all the template-based provisioning functions on the server.

• Extensions can implement special parameters in the template, which will be processed by the application extensions.

• Extensions can implement special configuration or other tags, so that these tags are processed by the application extensions at any of the stages of processing. For example, all the network configuration can be done in the application extension by bypassing the regular configuration and processing the new tags defined for this purpose in the XML templates.

For more details refer to the section Writing Provisioning Extensions.

53

Page 55: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.6 Performance Management Performance module is made up of three main functional components, namely Data collection and storage, Monitoring, and Reporting. All these are controlled from a single point which is called Polling Engine. The Polling Engine is responsible for applying data collection configuration, collecting data, applying thresholds on collected data and monitoring,sending notifications on threshold rule violation, and controlling Report generation. The performance related code generation / configuration that can be done in Eclipse are as follows:

• A Tool to create Poll Filter. Poll Filter allows manipulation of PolledData objects before they are added to the database. The manipulations will be of addition, modification, or deletion of PolledData objects.

• An XML editor to edit the configuration files, Polling.conf, Thresholds.conf, and Reports.conf. Follow the links to get details on what can be defined in each of these conf files. o Polling.conf contains data collection configuration details. o Thresholds.conf contains definition of Thresholds to be applied over collected data.

The following section contains documents explaining how to use the above mentioned tools.

• Creating Poll Filter

• Configuring Thresholds

• Configuring Polling Object

54

Page 56: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.6.1 Creating Poll Filter

• Overview

• Creating a poll Filter

Overview Poll Filter is used to fine-tune the Data collection configuration. When Managed Objects are discovered, user can configure collection of performance data by using Poll Filter. Poll Filter essentially allows you to add/modify/delete PolledData which are created as a result of polling objects creation. Poll Filters can perform the following :

• Existing PolledData can be modified.

• New PolledData can be added for the Managed object.

• Existing PolledData can be removed. The Poll Filter Creation Wizard allows you to generate the stub code for the poll filter and will place the appropriate entry in the polling.filters file for invoking this filter in WebNMS For more details on need for Poll Filter, refer to Writing Poll Filter in WebNMS Developer Guide. Creating a poll Filter Select the project or source folder in the Package Explorer, you can notice Create Poll Filter menu and icon get enabled. Alternatively, you can click the Create Poll Filter toolbar button.

• Select WebNMS > Filters > Performance > Create Poll Filter menu. o "Poll Filter Creation Wizard" screen pops up. o In the Poll Filter Properties screen, enter the package name of the poll filter in the

Package Name text field, enter the poll filter class name in the Filter Class Name text field.

• Click Finish button.

55

Page 57: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

You will find the <Poll Filter class> under <Your Project>/source folder in the Project Explorer window. This generated class is just the stub code implementing the PollFilter interface. The applyPollFilter method needs to be overwritten to manipulate the polled data as per your requirement. Also the appropriate entry for invoking this filter class is appended to the poll.filters file placed in <Your Project>/resources/conf directory.

56

Page 58: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.6.2 Configuring Threshold Thresholds are baselines established to monitor data collection. If collected data goes beyond the Threshold value, it indicates that the collected value is not a recommended value. Threshold.conf file stores the definition of Threshold objects, with a minimum or maximum value to be compared with the collected network data. To Import Threshold.conf file , please refer to the section Working with Files For detailed explanation on defining thresholds refer to Defining Threshold in WebNMS Developer Guide.

57

Page 59: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.6.3 Configuring Polling Object

• Setting Polling Object Properties

• Setting Match Criteria

• Setting Common Data Collection Criteria

• Specifying Protocol Provider

To Import Polling.conf file , please refer to the section Working with Files Setting Polling Object Properties For detailed explanation on setting polling object Properties, refer to Setting PollingObject Properties topic in WebNMS Developer Guide. Setting Match Criteria For detailed explanation on setting match criteria of the polling objects, refer to Setting Match Criteria topic in WebNMS Developer Guide. Setting Common Data Collection Criteria The criteria common to all the PolledData are specified in <DATA_COLLECTION> tag present in Polling.conf. This is to avoid repetitive entries in each of the <DATA_TO_POLL> tags. For detailed explanation on setting common data collection criteria, refer to Setting Common Data collection criteria topic in WebNMS Developer Guide Specifying Protocol Provider You can add a protocol for data collection service. Multiprotocol support for data collection service is provided . You have to specify the protocol name in Polling.conf inside the <PROVIDER> tag. For detailed explanation on specifying protocol provider, refer to Specifying Protocol Provider topic in WebNMS Developer Guide.

58

Page 60: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7 Server Configuration Introduction This section provides an overview of Server Configuration files. For configuring the new processes or modifying the parameters to existing processes and for changing server parameters, following Server Configuration files can be edited in Eclipse by importing them into the project. The files discussed are

• NMSProcessBE.conf

• NMSProcessFE.conf

• threads.conf

• serverparameters.conf

59

Page 61: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7.1 Editing NmsProcessesBE.conf NmsProcessesBE.conf is the main configuration file which contains the list of all the processes (also called "modules") that get started when WebNMS BE Server is started. The values for the various parameters of the modules are also specified in this file. When you want to add your own module into Web NMS BE, you can do so by specifying the fully qualified class name of your implementation of com.adventnet.nms.util.RunProcessInterface and the parameters to be passed to it in the NmsProcessesBE.conf. Import the configuration file NmsProcessesBE.conf from <WebNMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. For more details, read WebNMS Module Dependency in WebNMS Developer Guide.

60

Page 62: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7.2 Editing NmsProcessesFE.conf This is the main configuration file which contains the list of all the processes (also called as"modules") that get started when Web NMS FE Server is started. The values for the various parameters of the modules are also specified in this file. When you want to add your own module into WebNMS FE, you can do so by specifying the fully qualified class name of your implementation of com.adventnet.nms.util.RunProcessInterface and the parameters to be passed to it in the NmsProcessesFE.conf . If a value is not given for a parameter in NmsProcessesFE.conf file, then the same is taken from serverparameters.conf file. Overall functioning of FE Server can be configured by changing some of the command line parameters for the process "NmsMainFE". This has to be specified in NmsProcessesBE.conf file, if FE Server is started in the same JVM as that of BE Server. Otherwise, these parameters can be specified in startnmsFE.bat/sh file. Import the configuration file NmsProcessesFE.conf from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. For more details, read WebNMS Module Dependency in WebNMS Developer Guide.

61

Page 63: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7.3 Configuring Threads You can configure the number of threads allocated for a particular scheduler in the threads.conf file. Entries are present for all the schedulers employed in Scheduling Service. Import the configuration file threads.conf from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. For more details read the section Scheduling Service in WebNMS Developer Guide.

62

Page 64: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.7.4 Editing Server Parameters The serverparameters.conf is a common file where all the configuration information related to WebNMS server are kept. By default, this file contains the server-related configuration details of various modules present in WebNMS. When you add your own module into WebNMS and if you wish to provide some configuration information relating to the server, you may do so by making entries in serverparameters.conf. The parameter and its value have to be entered as a Key-Value pair. Import the configuration file serverparameters.conf from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details For more details, read Server Parameters in WebNMS Developer Guide.

63

Page 65: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.8 Configuring Policies Policies are tasks that are executed by WebNMS at a system level, at a specified time. This policy framework enables scalable administration of the WebNMS server and the network elements managed by it. The primary goal of the policy engine is to enable administration of complex functions easily. In WebNMS, policies are used to customize the behavior of the NMS and to provide a framework for adding policies for different network elements. WebNMS policies can be broadly classified into two categories :

• Periodic Policies : Policies are triggered periodically by the server at the specified time interval. By default, the periodic policies are configured to be executed in the interval of 10 seconds.

• Nonperiodic Policies : Policies are executed at the specified time. In this case, there is no fixed time interval. You need to specify the time at which the policy has to be executed. No default value is assigned for nonperiodic policies.

Import the configuration file serverparameters.conf from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. Refer to Policy in WebNMS Developer Guide for more details.

64

Page 66: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.9 Setting Logging Parameters Logging acquires paramount importance in a development cycle as it help in debugging purposes. The Logging Service can be used to pinpoint bugs, display configuration errors, identify performance blockades etc. The log4j.xml file will have entries for all the default LOG_USER entries. If you have added some custom LOG_USER entries in your application, make sure the corresponding entries are added to log4j.xml. It is possible to change the LogLevel in log4j.xml file. Import the configuration file log4j.xml from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. Also refer to Logging Service in WebNMS Developer Guide for more details.

65

Page 67: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.10 Configuring Backup Service During any development cycle, the data relating to the application stored in the database acquires importance. The importance of data becomes multifold in data-centric applications such as WebNMS Framework. Human error, system crash, and other disasters can result in the loss of valuable data which could prove costly. To overcome any such eventuality, WebNMS provides Backup Service. As the name itself indicates, backup refers to the process of taking a copy of the data and keeping it separately. In case, any data loss occurs, the backup contents can be restored to the database and made use of. The backup of the database can be taken during any of the following scenarios :

• Taking backup when the WebNMS Server is not running

• Taking backup (once or at periodic intervals) when the WebNMS Server is running When WebNMS Server is running, backup can be taken by specifying the time at which backup is to be taken, in the BackUp.conf file. At the time when backup is scheduled to be taken, the runBackup() method in BackupInterface is internally invoked. You are actually scheduling when the backup has to be taken. Import the file BackUp.conf from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. Refer to Backup Service in WebNMS Developer Guide for more details.

66

Page 68: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.11 Setting Failover Parameters WebNMS Framework is designed to run in mission-critical environments which require continuous and uninterrupted access to WebNMS. Generally, sudden failure of the server is quite often the reason for interruption of service. Failover mechanism provides a solution for this. "Failover" refers to the process in which all the functions being performed by the primary server (i.e., currently active-server) are automatically assumed by a redundant or standby server upon the failure or sudden termination of the primary server as a result of which uninterrupted access is ensured. Failover makes the WebNMS systems fault-resilient. The process of switching has been designed to be highly smooth and automatic that the end user does not feel the impact of the failure of the primary server or the subsequent taking over by the standby. For the failover process to take effect, you need to make some entries in the FailOver.xml file. Import the file FailOver.xml from <Web NMS Home>/conf directory into the Eclipse Project. Open the file in the project. Edit the file and click Save to save the changes. Read the section Working with Files for more details. Refer to FailOver in WebNMS Developer Guide for more details.

67

Page 69: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.12 Debugging Applications Built in Eclipse Testing the EMS Management Application Eclipse IDE has a provision to start the WebNMS server and Application client within the environment. This provision can be used to test the code while developing. You can test the newly added classes and you can modify some of the files and restart the WebNMS server to reflect the changes made in the source. This can be effectively used to test the code during development of the project itself.

• Start the server using WebNMS > Launch > Start WebNMS Server menu.

• Start the client using WebNMS > Launch > Start WebNMS Client menu.

• Once the server and the client are started, you can debug your sources with the server / client using Run > Debug History > Start WebNMS Server_<Project name> / Run > Debug History > Start WebNMS Client_<Project name> menus.

• You can also run your sources with the server / client using Run > Run History > Start WebNMS Server_<Project name> / Run > Run History > Start WebNMS Client_<Project name> menus.

Once the project is Compiled successfully, it is necessary to bundle all the modified application and files of your project into a single file called a NAR. This can be done by Packaging the Project. To Package the Project , refer to the section Packaging the Project for more details. To view the changes in WebNMS, the NAR should be installed over WebNMS. This task can be performed using the Nar Installer present in the Deployment Wizard. You can invoke the Deployment Wizard by using the WebNMS > Tools > Deployment Wizard menu. For more details , refer to the section Installing Eclipse Project in WebNMS

68

Page 70: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.3.13 Rebranding WebNMS Overview WebNMS framework is highly customizable and permits rebranding to cater to the end user requirements. Rebranding is typically done after customizing WebNMS and before deployment. Rebranding denotes changing the following using the Rebranding Tool:

• WebNMS references in the product

• Release Version reference

• WebNMS icon, logo

• All images with either AdventNet or WebNMS references

• WebNMS URL Invoking the Tool Rebranding cannot be done with respect to Eclipse Project. It has to be done directly in the WebNMS Installation. To do Rebranding, invoke <Web NMS Home>\bin\developertools>startRebrandingTool.bat For more details read the section Rebranding Tool in WebNMS Developer Guide.

69

Page 71: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4 Deploying Eclipse Applications After creating your project, you will need to package it for installing it over WebNMS. The Client Application Import Wizard enables you to import all Client side customizations made using Client Builder. The Package Project Wizard in the Eclipse packages all the resources of a Project (any customized, generated or edited files) into a .nar file, with the Application name. Packaging utility is also available in Command Line Mode The .nar file created in the Package Properties Wizard should be installed over WebNMS using the Installer Wizard of the Deployment Tool. Nar installed over WebNMS can also be uninstalled using the Uninstaller Wizard of the Deployment Tool.

70

Page 72: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4.1 Importing Client Nar Client NARS can be imported for customization of client, using the Client Application Import Wizard. Select the project in the Package Explorer, you can notice Import Client Nar menu and icon get enabled.

• Select WebNMS > Import Client Nar menu. Alternatively, you can click the Import Client Nar toolbar button. "Client Application Import Wizard" screen pops up. o In the Client Application Import Wizard screen, enter the path of the Nar file that has to

be imported (Alternatively, you can use Browse button to select the Client Nar file )

o Click Next button to view the Users Information page. o In the " Users Information" page , select the users for whom the Nar has to be installed.

Then click on >> button (Multiple Users can also be selected).

71

Page 73: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

o Click Next button to view the Menu Details page. o In the "Menu Details" screen configure the Map Menu details. Provide the name of the

Map Menu File (xml file present in <WebNMS Home>/mapdata/menus) in which the new menu for invoking the client screen should be included. Also enter the Menu Item name and the name of the Map Icon File (i.e. image file) that should represent this device in the Map.

o Also configure the List Menu Details in the "Menu Details" page. Here enter the name of the ListMenu file(the xml menu file that is present in <WebNMS Home>/listmenus directory) in which the new menu item to invoke the client screen from the List View should be included. Also enter the Menu Item name for the ListMenu file entry and the name of the List Icon file (image file) that should represent this device in the List view.

• Click Finish button.

The <Nar File and Xml File (which contains the details that were entered in the wizard) > will be found under <Your Project>/ resources/NetMonitor/build in the Project Explorer window The Image Files will be copied to the <your project>/ resources/images directory in the Project Explorer window

72

Page 74: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4.2 Packaging the Project Overview The Package Project enables you to bundle all the customized/ modified application and files of your Project into a single file called a NAR ( NMS archive). To view the changes in WebNMS, the NAR should be installed over WebNMS.

Prerequisites for Packaging a Project

• All Client Applications/ screens created using Client Builder should be imported using the Client Application Import Wizard.

• The Eclipse Project should be complete.

• The Eclipse Project should be Saved.

• The Eclipse Project should be Compiled successfully. To Start Select the project in the Package Explorer , you can notice Package Project menu and icon get enabled.

• Select WebNMS > Package Project menu. Alternatively, you can click the Package Project toolbar button. "Package Project" screen pops up. • In the Package Properties screen, enter the name with which the NAR file should be

created in the NAR File Name text field, enter the directory name/path in which the generated NAR file should be stored (Alternatively, you can use Browse button to select the output directory and path) and enter the version of the NAR file in the NAR File Version text field.

• Click Finish button. You will find the NAR file <Your Project><NAR File Version>.nar in the output directory.

73

Page 75: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

74

Page 76: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4.3 Integrating Command Line Packager with Build Script Overview The following section will guide you to package your Eclipse Project in command line mode. The final output is a NAR of the Project. The NAR file can be installed over WebNMS using the Installer Tool of the Deployment Wizard. To Start Follow the steps given below to integrate command line Packager with the scripts for Build at Build time

• In the Build machine, set up NMS 5 inclusive of the Eclipse Project. Say for example the Eclipse project can be placed under <Web NMS Home>/StudioTools/Studio/projects directory.

• Proceed to <Web NMS Home>/ StudioTools/Studio directory to edit the file setCommonEnv.bat/sh to set up required classpath. Please note that the plugin jar com.adventnet.nms.EMSDevelopment_1.0.0.jar is required in the classpath for CommandLine Packager.

• Create two directories - classes and clientClasses under <Eclipse Project> directory. This is mandatory. Compile the server classes and put them under <Eclipse Project>/classes directory and compile the client side java files and put them under <Eclipse Project>/ clientClasses directory.

Step 1 For CommandLinePackager, you need a Packager.xml file. This file is generated by eclipse when the project is packaged from the GUI using the Package Project. In order to generate the packager.xml , you have to package the project using Package Project wizard atleast once. The Package Project wizard will create packager.xml file and place it in <Eclipse Project>.This xml fle has to be given as a command line parameter for the CommandLinePackager script. Step 2 To modify values of the properties of the Project before creating the NAR, edit the Packager.xml file located in <Eclipse Project> directory. For example for the Project "myproject" the existing Entry is as follows outputDir=C:/projects/NARDestination The above can be changed to outputDir=./newNARDest If the directory "newNARDest" does not exist a new directory will be created in the same name. In the Packager.xml file the path of other files can also be made relative to the project home to facilitate commandLinePackaging.

75

Page 77: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Step 3 To create a NAR run the java.com.adventnet.studio.framework.CommandLinePackager with arguments -conf and provide the path to the configuration file Packager.xml. java.com.adventnet.studio.framework.CommandLinePackager -conf ./projects/eBon/Packager.xml In case of using the absolute path for the configuration file, all path entries in the Packager.xml configuration file must be absolute or relative to the working directory of the commandlinePackager. The NAR file for the Project will be available in the output directory specified in the Packager.xml file.

76

Page 78: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4.4 Installing Eclipse Project in WebNMS

• Overview

• Getting Started

• Step 1 : Locating Eclipse Nar

• Step 2 : Selecting Installation location

• Step 3 : Installing NAR

• Command Line Nar Installation

• Developer Tips

Overview

The nar for Project created using the Package Project Wizard in the Eclipse Plugin has to be installed over Web NMS. This task can be performed using the Nar Installer present in the Deployment Wizard. The Installer wizard with an easy- to- use interface helps you walk through the process of installing the nar.

Getting Started

You can invoke the Deployment Wizard by using the WebNMS > Tools > Deployment Wizard menu. Alternatively you can Invoke the Deployment Wizard from <Web NMS Home>/ bin/developertools/DeploymentWizard.bat/sh file. An intuitive GUI comes up.

Provide the following information at each step in the Wizard.

Note: Before installing a Eclipse NAR ensure the WebNMS Server is shut down before proceeding with the NAR Installation

Step 1 : Locating Eclipse Nar

• Click on the NarInstall/UnInstall tab of the Deployment Tool.

• Click on the Install button.

• Select the Eclipse nar file to be installed using the Browse option. Click on the OK button. Step 2 : Selecting Installation Location

• Check the ReadMe for more details about the nar.

• Click Next to proceed. Step 3 : Installing NAR

• In the final screen click Install to install the nar.

77

Page 79: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Note: The NAR Installer of the Deployment Wizard allows only one nar (created in Eclipse) to be installed over WebNMS. To install the second nar in the same WebNMS, uninstall the first nar using the Un-Installer wizard and then install the second nar. In short

WebNMS Allows

1. Installation of one NAR for one copy of WebNMS Reason

1. Configuration files are copied from the WebNMS into the Project workspace. After installing a Eclipse NAR over WebNMS the configuration files of WebNMS are overwritten by the NAR installed. If you have created a second NAR in Eclipse, the NAR when installed will have the configuration files of the previous version of WebNMS. Hence the Eclipse will not allow the NAR to be installed because of the difference in Version of the configuration files in WebNMS

Command Line Eclipse Nar Installation Follow the steps give below to Install a Eclipse NAR in Command Line Mode Step 1 To install a deployed Eclipse NAR run the script CommandLineStudioNarInstaller.bat\sh located in <Web NMS Home>/bin/developertools directory. Step 2 Specify as argument the absolute path of the Eclipse NAR. To provide the relative path as argument, the path specified has to be relative to WebNMS Home and not relative to the current directory. Step 3 Specify the database for your Resource to be stored after specifying the absolute path of the Eclipse NAR. Example For example if the absolute path of the application nar is c:\WebNMS\Archive.nar and the database is Oracle the argument of the Eclipse NAR to be installed should be CommandLineStudioNarInstaller.bat C:\WebNMS\Archive.nar oracle For details regarding uninstalling a Eclipse NAR in the command line mode read the section Uninstalling Eclipse Project in WebNMS Developer Tips Issue: If you have installed Eclipse NAR, in Windows OS there is a possibility of "Input line too long" error while starting WebNMS Server, Tip: The above issue occurs as Eclipse NAR file has new JARs, and, when they are added to WebNMS, the classpath settings are eventually lengthened. Hence, use the WebNMS NmsMainBootstrap class loader mechanism. For more details read the section Troubleshooting Tips - Input Line too Long and add the Eclipse related jars, to the NMS_EXT_DIRS variables.

78

Page 80: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Example: For adding a jar set NMS_EXT_DIRS= NetMonitor/build/EclipseProject.jar Example: For adding all the Eclipse related jars set NMS_EXT_DIRS= %MOPATH%;%CUSTOMPATH%

79

Page 81: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.4.5 Uninstalling Eclipse Project from WebNMS

• Overview

• Getting Started

• Uninstallation of Eclipse NAR using Deployment Wizard

• Command Line Eclipse NAR Uninstallation

Overview In the deployment scenario, the nar is created by the Package Project Wizard in Eclipse and installed/uninstalled over WebNMS using the NAR Installer/Uninstaller of the Deployment Wizard. Getting Started You can invoke the Deployment Wizard by using the WebNMS > Tools > Deployment Wizard menu. Alternatively you can Invoke the Deployment Wizard from <Web NMS Home>/ bin/developertools/DeploymentWizard.bat/sh file. An intuitive GUI comes up. Uninstallation of Eclipse NAR using Deployment Wizard To uninstall, click on the Eclipse Nar in the main screen of the Installer/Uninstaller Wizard. A dialog appears. Click on the Uninstall button to uninstall the Eclipse Nar.

Note: 1. Before Uninstalling the NAR, it is necessary to Reinitialize the Database. 2. The Uninstaller wizard allows un-installation of one nar at one instance.

Command Line Eclipse NAR Uninstallation To uninstall a Eclipse NAR run the script CommandLineStudioNarUninstaller.bat\sh located in <Web NMS Home>/bin/developertools directory and specify as argument the Eclipse NAR name. For example if the name of the Eclipse NAR is Archive.nar the argument should be CommandLineStudioNarUninstaller.bat Archive.nar

80

Page 82: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.5 Glossary - List The following list contains definitions for the terms and acronyms that are used in Eclipse. $ A C D E F I M N P R V W

$ $WEBNMSHOME

A Advanced Discovery Attribute Type

Attribute Name

C Customizing Services CVS Configure Tools

Client NARS Command Line Installer Command Line Packager

D

Distributed Development Environment

E Extended Alerts Extended Events

F Files

I Installing Project

M Map Filter Criteria

N NAR

P Project Home Projects (.proj)

R Rebranding

81

Page 83: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

V

Version Control System

W Workspace

82

Page 84: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.5.1 Glossary $WEBNMSHOME $WEBNMSHOME refers to the location of Web NMS that is referenced by Eclipse. Advanced Discovery Eclipse provides an intuitive GUI to define a Custom Discovery Filter for discovering devices having multiple, parallel-level hierarchies and pluggable components. The filter also enables adding user code to define properties of the components of the device. For more details, read the section Advanved Discovery Filter. Attribute Name Device properties to be managed are referred to as Attribute while modeling the ManagedObject using the Model Managed Object Wizard. Attribute Type The data type of the property to be modeled is referred to as the Attribute Type. The attribute has to be specified in the Model Managed Object Wizard while modeling ManagedObject. Customizing Services Eclipse as an IDE offers WebNMS modules for customization. The modules are :Discovery, Map, Fault, Configuration, Provisioning, Performance, Security, Policy, Failover, Backup, Logging, Server Configuration, and Rebranding. These modules are referred to as Services in Eclipse. CVS CVS is an open-source, network-transparent program that allows developers to track various development versions of source code. CVS does not maintain multiple versions of source code files. It keeps a single copy and records of all of the changes that are made. Eclipse provides CVS as the default versioning system. Configure Tools Configure Tool refers to the option wherein the menu bar can be configured to run a third-party tool. For more details, read the section Working with External Tools. Client NARs Any Client Application built using Client Builder ( Chassis/ Configuration Wizard) are referred to as Client NARs. All Client NARs can be imported into the Eclipse project using the Client Application Import Wizard. Command Line Installer Eclipse provides the option to use the command line mode for installing NARs created using Eclipse. The NARs can also be installed in the GUI mode using the Nar Installer option in the Deployment Tool.

83

Page 85: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Command Line Packager Eclipse projects can be packaged in the command line mode. The command line packager script can be integrated with the Build script for automating the process of packaging Eclipse projects. Distributed Development Environment Eclipse provides a concurrent project development environment wherein multiple users can work on the same Eclipse project. This concept is also referred to as Distributed Development Environment. Discovery Eclipse provides an intuitive UI to define a Discovery Filter for discovering only devices in the network. The Discovery Filter adds the discovered device as Managed Resource to the database. Extended Alerts Alerts generated in WebNMS have unique properties. These properties can be extended to have additional properties and are referred to as Extended Alerts. For more details, read the section Extending Alerts. Extended Events Every Event generated is associated with some basic properties that uniquely identify it. In addition to these properties users can add properties to suit their needs. This is referred to as Extended Events. For more details, read the section Extending Events. Files In Eclipse, files (xml, java, conf, txt, etc.) can be created and edited. All source files generated in the Project and configuration files copied to the workspace can be viewed, edited and user code can be added as required. For more details, read the section Working with Files. Installing Project A project built in Eclipse has to be converted to a NAR format for installing in WebNMS. The NAR Installer in WebNMS enables installing the NAR in WebNMS. Map Filter Criteria Eclipse provides an intuitive GUI for defining a MapFilter where users can specify required criteria to check whether the incoming ManagedObject is the one that is needed for them. This is referred to as the Map Filter Criteria. NAR NMS Archive. NAR is a set of compressed files and is an input for customizing NMS. The NAR can be created using the Package Properties Wizard. The NAR can be installed over or un-installed from WebNMS using the NAR Installer/Uninstaller option in Deployment Wizard in WebNMS. Project Home Refers to the location of the Eclipse project. .proj Refers to the file extension of all projects created in Eclipse. To open an existing project, select the .proj file from the file chooser.

84

Page 86: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

Rebranding Rebranding refers to changing WebNMS references, release version reference, WebNMS icon, logo, all images, and WebNMS URL using a simple GUI. Version Control System Eclipse by default provides CVS as the version control for all files developed and customized for the project. Eclipse also provides the hook to plug in third-party Version Control Systems. Workspace Workspace refers to the location where the WebNMS configuration files are copied from the reference WebNMS for the Eclipse Project under development. The Eclipse workspace is created to separate the development environment from the runtime WebNMS.

85

Page 87: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.6 Upgrading the Project The eclipse project created in a previous version of WebNMS can be upgraded using the Upgrade Project option under WebNMS menu. Follow the below steps to upgrade the project.

• Select the project.

• Select WebNMS > Upgrade Project menu item. The Configuration Updater dialog will be displayed.

• Use the Browse button to select the new WebNMS Home directory. The Product Version and the Service Pack Version will be displayed.

• Click the Update button. Confirmation dialog is displayed. Click the OK button to upgrade the project.

86

Page 88: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.7 Frequently Asked Questions This document answers frequently asked questions about the Eclipse Plugin. Contents:

• How do I install the plugin

• Can we have the Plugin in the WebNMS 4.7 (without or with Service Pack)

• which version of Eclipse does WebNMS support?

• What version of JDK can be used to start WebNMS from Eclipse ?

• Where can i find the XXX.hbm.xml file?

• How to debug NMS project in eclipse?

• How to configure the users and group in WebNMS? How do I install the plugin? (or) Where can I download the Eclipse plugin for WebNMS? (or) How to use Eclipse with WebNMS 5.0? (or) where i can get the latest plugin version?

• Install the Eclipse version 3.3(or higher) in your machine.

• Install WebNMS 5 in your machine.

• The WebNMS Eclipse plugin JAR (WebNMSEclipsePlugin.jar) is available in the <WebNMS Home>/StudioTools/Studio/jars directory and unzip this jar in the <Eclipse Installation Directory>

• Start Eclipse IDE. Use the script with the - vm option as given below: Command for Linux machine ./eclipse -vm <JDK 1.5 Home>/bin/java Command for Windows machine eclipse -vm <JDK 1.5 Home>\bin\java If you are installing a newer version of our plugin over, please use the "-clean" option in the commandline while starting Eclipse IDE: Example: ./eclipse -vm <JDK 1.5 Home>/bin/java -clean

Can we have the Plugin in the WebNMS 4.7 (without or with Service Pack) WebNMS 5 beta plugin is applicable for WebNMS 5 and above. It can't be used with WebNMS 4.7 Sp3 or any lower versions. WebNMS 4.7 sp3 does not have any out of box plugin for modeling the devices. But you can develop a java project and run WebNMS Server and Client in Eclipse. In that, you can do your WebNMS based development. which version of Eclipse does WebNMS support? Eclipse 3.3.X and Eclipse 3.4 (or higher) are supported by WebNMS.

87

Page 89: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

What version of JDK can be used to start WebNMS from Eclipse ? WebNMS 5 supports JDK 1.5 . So JDK 1.5 version must be installed to start NMS from Eclipse. The command should be as follows, eclipse -vm <jdk1.5_installDir>/bin/java Where can i find the XXX.hbm.xml file? When a MO is modeled, <Modeled MO>.hbm.xml is generated under <Your Project>/Referenced Libraries/resources/classes/hbnlib/<Package of MO> in the Project Explorer window. How to debug NMS project in eclipse? You can debug Nms Project as Java Project in Eclipse. Refer to Debugging Applications Built in Eclipse section in Eclipse Document for more details. How to configure the users and group in WebNMS? Eclipse doesnot support the Security configurations directly. So Security Administration features for Eclipse project have to be configured using Security Administrator Tool bundled in WebNMS installation. Before deploying the application NAR file in the WebNMS installation, Start the server using WebNMS > Launch > Start WebNMS Server menu. and Start the client using WebNMS > Launch > Start WebNMS Client menu. In the Client Screen , Click Tools->Security Administration. Security Administration Dialog Box is opened.It helps to create a new users, groups and a opertions. It also helps to associate the permissions to the users and groups. Different authorization levels can also be created. For more details, refer to Security Administrator Tool.

88

Page 90: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.8 Known Issues & Limitations This section describes known problems and associated workarounds for the Eclipse Plugin. Limitations: When two projects uses the same WebNMS installation, the problem will occur. when the first project is closed and trying to create a second project with the same WebNMS installation home as the closed EMS Development project. Workaround: While creating the new Project with same WebNMS home, keep the first project open. Eclipse will use some linked resources (class folders) from the first project instead of re-creating them. So closing the project will restrict the linked resource from being accessed and will raise the problem <ProjName>_Conf_Link resource is missing and <ProjName>_Link resource is missing. Limitations: The below two exceptions occurs when there is a space in the directory path where WebNMS is installed and trying to install a NAR file in WebNMS. This is a JDK bug which occurs in some scenarios where Xalan parsing of XML file is done. Scenario 1 : javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Program%20Files\WebNMS\NetMonitor\build\uninstall.xml (The filename, directory name, or volume label syntax is incorrect) at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler (TransformerIdentityImpl.java:260) at org.apache.xalan.transformer.TransformerIdentityImpl.transform (TransformerIdentityImpl.java:291) Scenario 2 : java.net.MalformedURLException: unknown protocol: c Workaround : Kindly install the WebNMS in a directory which does not have space characters in its path.

89

Page 91: WebNMS Framework 5.0 :: Ecipse Guide · 2017-07-09 · WebNMS Framework 5.0 :: Eclipse Guide Quick Tour 4.1 Welcome to WebNMS Framework Eclipse Plugin The documentation for Eclipse

WebNMS Framework 5.0 :: Eclipse Guide

4.9 Tutorials WebNMS Framework is vast in its capability to serve its different class of users. It would be hard for anyone to understand all of its features at one time. We strongly recommend you to go through of our EMS and EBon tutorial to get a feel of what could be done on our WebNMS. These tutorials guide the developers through designing an EMS and provide them with illustrative examples. EMS Tutorial This tutorial models a generic network device with many components to build a sample EMS application using WebNMS tools and design techniques. In this tutorial, the design aspects on Modelling and mapping a Network Element has been dealt in detail. The various features of WebNMS like writing ManagedObject sub classes,using map layouts, rendering of map symbols, trap handling, device configuration and security have been described in detail. This tutorial acts as a building block and guides the developer in designing and developing a superior EMS. For detailed information about EMS Tutorial, refer to the following link. WebNMS Framework Element Management System. eBon Tutorial This tutorial guides the developer to manage a DSLAM Device . Various features like discovery, mapping, fault and performance management have been dealt in detail. The tutorial will walk through a series of steps, which will help you understand how a unique EMS solution can be built using WebNMS Framework EclipsePlugin to suit your needs. Using WebNMS Framework EclipsePlugin the EMS application is just a few clicks away requiring you to incorporate only your network specific business logic. This makes the development faster. For detailed information about eBon Tutorial, refer to the following link. WebNMS Framework eBON Element Management System.

90