On This Page

Visit the Nexus Forums
Have some suggestions? Need some help? Visit the Nexus forums.

How to Build an Extension

No matter what you want accomplish, creating an extension starts the same way: come up with an idea. Once you have an idea of a new feature, a modification to an existing feature, or just a new format to an existing output, you can create an extension in a few, basic steps:

1. Create the extension skeleton.

Each extension should be created in its own directory. This directory must contain these three files at a minimum:
  • Model file: Model.xml
    This XML file defines everything about the extension. Most importantly, it gives every extension a unique identifier so that FireMon Security Manager knows about it and shows it in the UI. Additionally, the user inputs for the extension are defined here.
  • Controller file: Controller.js
    This file is a JavaScript file that contains the logic of the check. Important functions include loading the configuration file, loading user inputs, conditional logic and sending the appropriate information to be rendered in the output.
  • View file: View.vm
    This file contains the HTML and logic to render the output of the extension.

2. Define the extension

Determine the name of the extension, how it will be available in the GUI, and what properties can be edited by the user by modifying the Model.xml file.

3. Create the extension logic.

Write the JavaScript in Controller.js to create the analysis logic of the extension. Depending on the purpose of the extension, its functionality can be as simple as searching for a string of text or as complex as consuming external data and matching it to policy behavior.

4. Format the output.

Any output that you want to display should be formatted using HTML in the View.vm file.


Download an Example

Now that you know the basics, the best way to start building your own Extension is to check out this documented example. You can download it and use it as a template to build your own Extension.

Additionally, several example extensions are shipped with FireMon Security Manager and there are a lot of good examples on this site. Simply download any published extension to see how it was created.

Get the Developer’s API Guide

Once you have a grasp of the basic steps of building an extension, make sure to review the Developer’s API guide. This document provides a good description of the different components in an Extension and all of the options.


How to Deploy an Extension on Your Server

1. To deploy an Extension that you find on Nexus, start by downloading the Extension.

Each Extension is packaged as a ZIP file and is available in the Repository. Simply click the download link next to each Extension and accept the license to download the ZIP package. Then, skip to Step 3.

2. To deploy an Extension that you built, first package the Extension into a ZIP file.

To package the Extension, simply ZIP the directory containing the Extension contents. Make sure that only the single directory is in the path; this directory will be unzipped into the appropriate destination on the server. The package must contain:
  • Model.xml
  • View.vm
  • Controller.js
Make sure the Model.xml file has a unique KEY.
Continue to step 3.

3. Deploy the Extension to Your FireMon Server.

  • Open your FireMon GUI and click the Compliance button in the left navigation.
  • In the menu bar, go to Tools > Upload Extension.
  • Select the Extension that you downloaded or packaged earlier and upload it in .zip format. This step will place the Extension on your Application Server.
  • After the Extension is uploaded, it will be available in the Compliance section. Just right-click Audit Checks and select New > Audit Check. The Extension appears in the folder category that was specified by the Extension developer in the Extension files.

NOTE: If you don't see the new Extension, disconnect from (File > Disconnect) and then reconnect to the server (File > Connect to Server) in the FireMon GUI.