In ENA, you can customize context menus to add extra items that are not there as standard. This means that you can customize the ENA UI to better suit the way in which you manage your network.

You can customize a context menu with two types of action:

launch URLs to access new pages in the UI, typically in a new tab.

cause actions to happen on the relevant server, e.g. if you are in a multi-server environment, the context menu action would cause an action to happen on whichever server the selected component/s is/are on.

Customizing context menu items for a View is more complicated than for other types of managed object, because Views can be spread across multi-server environments. Typically, these would be invoked within the Data Management Kernel.

Because the process of customizing context menus requires back-end file editing, it is recommended that you contact Entuity Support if you would like to customize them.

To customize a context menu:

Context menus are determined by configuration files in entuity_home/etc.

Create a new configuration file (see below) and save it to entuity_home/etc.

Open sw_menu_def_site_specific.cfg and add the name of the file containing the custom context menu configuration. You must prepend the file name with a "!".

Open the ENA UI. ENA automatically discovers new menu configuration files, which means that you don't need to shut down and restart ENA. Note, there may be a delay of several minutes before the changes are reflected in the UI, and it may help to log out and then log back in again.

Note, in a multi-server deployment, you will need to apply the menu configurations to the consolidation server and all the remote servers.

To create a new configuration file that customizes a context menu:

Each action of a context menu item is specified through its own individually-named section in a configuration file. For example, the Ping_Device_Client section defines a custom menu that runs from the Entuity server and pings the device selected from ENA (note, this example is only for use on a Windows server):

must be unique within the Entuity server, i.e. in all configuration files included to ENA.

is a mandatory parameter.

must not contain any spaces

displayName

menu item name displayed in the context menu UI.

parentMenuItem

references the menu item below which this current menu item is displayed.

if there is no parent menu item, leave blank.

if there is a parent menu item, enter the parent menu item's MenuItem value.

Note, a parent menu item must not have an associated action. It must only be used to hold child menu items (to improve the organization of your menu structure).

selectionLimit

maximum number of UI selections supported by a single invocation of a menu item action. E.g., some commands, such as ping or SNMPwalk, only act on one object at a time, and so the user should only be able to select one device from the web UI.

itemPosition

position of the menu item within the list of menu items. When two items are given the same position, ENA will sort them alphanumerically.

Class - actionMethod is an Entuity Java class that will be instantiated and a method executed on it. This is performed on the server.

Exec - actionMethod requires the system exec function. This is performed on the server.

Echo - actionMethod command string is echoed to display and is not executed. The displayed text is shown in a pop-up dialog.

actionTimeoutc

maximum elapsed time, in milliseconds, allowed for the action to execute. ENA terminates the action process, and releases all associated resources, when the timeout period is exceeded.

supportedTypes

comma-separated list of StormWorks object types supported by item- and instance-based menu items. Type hierarchy is taken into account such that further derived types are included unless their exclusion is specifically listed. E.g., the list port, !wanPort includes all the port types, i.e. port, portEx, llport, frport, atmport, with the exception of wanPorts.

<event group>:<event id> which includes support for wildcards. E.g.: 10:*, 1:9 includes all events in event group 10, but from event group 1 only event 9.

i# to specify the entered number as an incident identifier, for example i804 identifies the AP Antenna Host Count High incident.

e# to specify the entered number as an event identifier, for example e804 identifies the AP Antenna Host Count High event.

e* where the asterisk wild-card specifies All events.

i* where the asterisk wild-card specifies All incidents.

Types of menu items:

Type - these items are associated with StormWorks object types. They are only available when the selected object(s) corresponds with their supported object type list. For example, a type menu item can be configured to display only when the current context is a device.

Instance - these items are linked to specific instances of a StormWorks object type. They are only available when the selected object(s) match the supported object(s). For example, an instance menu item can be configured to display only when the current context is that of the particular device specified.

Event - these items are associated with specific event types. When events of those types are raised in EMS and selected, then these Event-based menu items are available.

Entuity recommend placing Instance based menu items under a parent item. Whether an Instance based item is available is dependent on the current context matching the supported objects. Applying this filter can cause a slight delay as the Entuity server must perform the check, so placing it within a parent menu item ensures it is only called when required.

Example custom context menu files:

Create services

Description: creates a hierarchy of services for a View.

Context: View.

Details: when executed for a View, a service called "<VIEW_NAME> on <SERVER_NAME>" is created in that View.

Description: create an snmpdump file that can be sent to Entuity Support when requesting a device to be certified

Context: SNMP managed device

Details: the snmpdump utility is executed on the server that is managing the device. The dump is performed using SNMPv2c and the same community string used to manage it is used. The output file is written to the log directory using the name of the device and the “.txt” extension.

Capabilities demonstrated: on command running an executable on the Entuity server. Using a shell or command prompt to allow a file to be written to. Using the completion popup to indicate when an operation that can take several seconds/minutes has completed. A timeout of 5 minutes (300,000 ms) is used and will auto-terminate the operation if it is exceeded.

Description: obtains and displays the routing table contents directly from a router

Context: fully managed device

Details: performs an on-demand SNMP walk of the routing table and displays the contents in an HTML formatted table in a popup dialog. Long tables are handled using a combination of pagination and an SNMP getnext capability to continue the walk if the table is extremely long.

The ping example from the sample configuration file sw_menu_example.cfg includes a ping advanced action. The action is available as a menu item grouped within the parent Ping menu item.

Setting parent menu items

This section defines a menu item that acts as the parent to the ping action that is included in the sample configuration file. As the parent item, it does not reference its child menu items. parentMenuItem is left blank, so it is set against the root menu. It does not include any actions of its own.

uses the snmpwalk executable with ENA, specified through actionMethod.

provides an SNMP walk of the current device from the Entuity server, as configured through actionArguments.

is available on devices that meet the set filter, i.e. a system OID equal to .1.3.6.1.2.1.2.2.1.2

you can amend the filter to another system OID, or set it to be available against all devices: filter=simple;1

outputs the SNMP dump results to a separate result window. Because selectionLimit is set to 1, you cannot run another user action until it is closed (ENA displays an appropriate information message if you attempt to do so).