1.27. Release Notes 1.0.4

NetSpyGlass v1.0.4

1.27.1. New features

  • This version adds support for alerts. Alerts are created by calling function nw2functions.alert() in your Python hook “rules” script. This function takes several arguments, among them input monitoring variable, condition function and parameters that describe alert timing. Each alert creates new monitoring variable with the name of the alert which appears in Graphing Workbench, can be graphed and used in other parts of the system as all other variables. NetSpyGlass provides JSON API that can be used to get lists of active and cleared alerts for external scripts and dashboards. Alert notifications can be sent to multiple streams, currently log, Slack, PagerDuty and email are supported. NetSpyGlass supports alert “silences”, which are rules that can be used to block notifications for alerts. At this time we provide Python script that can be used to list, add or update silences in the system via JSON API. See documentation here: Alerting

  • This cersion introduces support for external unit testing. User can now write test scripts in Python to test their rule processing Python script, including alerts. See Testing Framework.

  • This version adds ability to set HTTP header lines in the response generated by NetSpyGlass server using configuration file. Configuration parameter is ui.headers, its value is a list of dictionaries of three items with the following keys:

    • operation : can be append, set or copy.
    • name : the name of the header to be added
    • value : the value to use with this header

    If operation is “set”, then new header is set with provided value even if header with the same name already exists. If header with the same name existed, its value will be replaced with the string taken from the config.

    If operation is “append”, then new header value is added to the value of the header with given name if it exists. If it does not exist, the header with this name and value is added.

    If operation is “copy”, then the value of the header with the name provided as parameter value is added to the header with the name name

    Operations are processed in the order they are defined in the config, top-down. You can add header in one operation and then append different value in the next.

    Example:

    headers = [
        { operation : "copy", name : "Access-Control-Allow-Origin", value : "Origin" },
    ]
    
  • Python function mvar_zip() has been renamed to nw2functions.join()

  • Device name shown at the top of the device details panel is now chosen “smartly”:
    • if configuration file specifies this device by name rather than bare ip address, this name is used
    • if user entered ip address in the configuration and device responds to SNMP queries so we could discover it, its host name is shown
    • if device does not respond and we could not discover, the address entered in the configuration file is shown

    Finally, the name chosen according to this algorithm is filtered to strip common domains defined in the configuration parameter network.display.commonDomains

  • Beginning with this version, administrator can configure HTTP proxy that the server will use for outgoing HTTP connections, such as “phone home”, connections to Slack and PagerDuty. Use configuration parameters httpProxy.address and httpProxy.port:

    httpProxy {
       address = "10.0.14.10"
       port = 3128
    }
    

    Note that this is a top-level configuration parameter, i.e. it is not part of the ui or any other top level configuration block.

  • This version intrudoces support for alerting rules and integration with Slack, where NetSpyGlass can send alert notifications

  • MonitoringVariable now has attribute statistics which is an object that provides functions that can be used to perform basic statistical calculations over the time series: mean(), median(), sigma()