1.23. Release Notes 1.2.0

NetSpyGlass v1.2.0

1.23.1. New features

  • this version adds support for modularized Python hook scripts

  • it is now possible to use operator print in Python scripts; the output goes to the server log with log level INFO or ERROR when printing to stderr.

  • we have improved the behavior of the system in case of errors in Python hook scripts:

    • View builder script: In the case of the view builder script, the server aborts updating views and maps if it detects any error in the script. This includes syntax errors that prevent it from loading the script and run time errors that happen when it tries to execute it to build views and match devices. Views and maps are rebuilt only if the script loads cleanly and then executes without Python exceptions. Run time error in any view matching function aborts reloading all views and the server continues to run with then-current set of views and maps. Note that if the error in the view builder script does not cause exception but make one or more views disappear accidentally, the views will be removed. In addition to this, if a view is deleted (intentionally or accidentally) and then restored, corresponding database object is found and un-deleted instead of creating new one. This preserves layout of corresponding map.
    • Variable builder script: rebuilring of monitoring variables is aborted in case of any exceptions raised when this script is loaded or executed and the server continues to run with then-current set of variables. If this script causes error when the server runs it for the very first time, then it ends up with no monitoring variables at all,
    • Tags selector script: as before, tags assignment is aborted if this script raises any exception when the server tries to load it and then execute it. All objects retain their old tags
    • Monitoring data processing rules: the server retains previously loaded rules if it detects any exceptions when it tries to load this script. If the script loads cleanly, the server will run it on the next polling cycle. If the script raises exceptions then, they will affect processing of the monitoring data.
    • Report scripts: if these scripts raise exception when the server tries to load them, corresponding report is not updated and continues to run with then-current version of the script. Run-time exceptions are caught and abort generation of the report, as well as cancel rotation of already existing output files of the report.
  • NSGDB-31: support for monitoring of packet flow rate through interfaces has been implemented. NetSpyGlass can configure itself to monitor unicast, multicast and broadcast packet rates (in- and out-) through interfaces. These metrics appear in the Graphing Workbench and in maps as variables with the following names:

    • ifInUcastPktsRate
    • ifOutUcastPktsRate
    • ifInMulticastPktsRate
    • ifOutMulticastPktsRate
    • ifInBroadcastPktsRate
    • ifOutBroadcastPktsRate


Packet rates monitoring is disabled by default.

  • To activate monitoring of packet rates, add a call to function self.make_packet_counter_vars() inside of your overridden function make_variables() as described in How to override the defaults. Here is how your variable builder hook script should look like:

    class BulkInterfaceVarBuilder(InterfaceVariableBuilder):
        This class overrides checks implemented in InterfaceVariableBuilder to make
        NetSpyGlass monitor packet rates on all interfaces of all devices.
        def make_variables(self, device, intf):
            mvars = super(BulkInterfaceVarBuilder, self).make_variables(device, intf)
            return mvars
    class BulkVariableBuilder(VariableBuilder):
        This class is based on the standard VariableBuilder class but substitutes
        class used to build interface-related variables.
        def __init__(self, log):
            super(BulkVariableBuilder, self).__init__(log)
            # Override interface builder object with our class
            self.interface = BulkInterfaceVarBuilder(log)
  • This version offers ability to control set of tag facets that appear in the “Tag filter” input field in the Graphing Workbench. To limit those, add parameter graphingWorkbench.tagFacets to your nw2.conf file at the top level. Here is an example:

    graphingWorkbench.tagFacets = [

    Words in this list are names of the tag facets that are allowed to appear in the “Tag filter”. Note that tag filter is further restricted to facets and tag words that are actually present in the selected variables, so, for example, if you select category “Interface” and variable “ifInRate”, you will see tags n facets “ifAdminStatus”, “ifOperStatus”, “ifRole” etc, but not those in facets “PDUPhaseNumber” or “PolicyName” because the latter are not used with interfaces. If any item in the list graphingWorkbench.tagFacets is “*”, then all tags are allowed to appear in the “Tag filter” (this is the default).

  • NSGDB-34: default rules that govern generation of the monitoring variables have changed to include aggregation ports on Cisco, Arista and other platforms. Previously aggregation interfaces were monitored only on Juniper devices by default.

  • NET-1112: NSG monitors do not run rpc server anymore; they open rpc connections to servers and all communications between servers and monitors goes over these connections. This allows us to run monitors behind firewalls and NAT.

1.23.2. Bug fixes

  • NSGDB-29: tags added by the Python hook script to devices or interfaces in the primary server were not added to monitoring variables if these variables were created in secondary servers and then pushed to the primary. This includes most of the variables computed by secondary servers, e.g. ifInRate, ifOutRate and so on. The bug did not affect single server installations.
  • NET-1110: this bug covers specific corner case with view and map generation that happened when the server ran network discovery while view builder hook script was broken. In a situation like this, the server could not restore views even after the script was fixed and required new discovery to build views. Version 1.2.0 fixes this problem. Even if views fail to build after discovery, they get restored when script is fixed without the need to run discovery again.
  • NSGDB-33: data type for each monitoring variable can now be set in the variable builder python hook script and is then enforced when we collect snmp response. This version properly parses snmp response that returns octet string value in the form of the binary byte array. This takes care of the corner case where SNMP library returns value of the oid dot3adAggPortActorOperState as binary byte instead of octet string.
  • NET-1114: protect against invalid cluster configuration that defines no monitors (this also happens when the name of the monitor cluster member used in the file cluster.conf differs from the name assigned to the monitor via its command line arguments)