(requestContext, seriesList, func, operator, threshold)
return [series for series in seriesList if operatorFunc(consolidationFunc(series), threshold)]
Takes one metric or a wildcard seriesList followed by a consolidation function, an operator and a threshold.
  Draws only the metrics which match the filter expression.

  Example:

  .. code-block:: none

    &target=filterSeries(system.interface.eth*.packetsSent, 'max', '>', 1000)

  This would only display interfaces which has a peak throughput higher than 1000 packets/min.

  Supported aggregation functions: ``average``, ``median``, ``sum``, ``min``,
  ``max``, ``diff``, ``stddev``, ``range``, ``multiply`` & ``last``.

  Supported operators: ``=``, ``!=``, ``>``, ``>=``, ``<`` & ``<=``.
Takes one metric or a wildcard seriesList followed by a consolidation function, an operator and a threshold.
  Draws only the metrics which match the filter expression.
Takes one metric or a wildcard seriesList followed by a consolidation function an operator and a threshold . Draws only the metrics which match the filter expression .
def filterSeries(requestContext, seriesList, func, operator, threshold):
  """
  Takes one metric or a wildcard seriesList followed by a consolidation function, an operator and a threshold.
  Draws only the metrics which match the filter expression.

  Example:

  .. code-block:: none

    &target=filterSeries(system.interface.eth*.packetsSent, 'max', '>', 1000)

  This would only display interfaces which has a peak throughput higher than 1000 packets/min.

  Supported aggregation functions: ``average``, ``median``, ``sum``, ``min``,
  ``max``, ``diff``, ``stddev``, ``range``, ``multiply`` & ``last``.

  Supported operators: ``=``, ``!=``, ``>``, ``>=``, ``<`` & ``<=``.
  """
  consolidationFunc = getAggFunc(func)

  if operator not in operatorFuncs:
    raise InputParameterError('Unsupported operator: %s' % (operator))
  operatorFunc = operatorFuncs[operator]

  # if seriesList is empty then just short-circuit
  if not seriesList:
    return []

  return [series for series in seriesList if operatorFunc(consolidationFunc(series), threshold)]
def filterSeries ( requestContext , seriesList , func , operator , threshold ) : consolidationFunc = getAggFunc ( func ) if operator not in operatorFuncs : raise InputParameterError ( 'Unsupported operator: %s' % ( operator ) ) operatorFunc = operatorFuncs [ operator ] # if seriesList is empty then just short-circuit if not seriesList : return [ ] return [ series for series in seriesList if operatorFunc ( consolidationFunc ( series ) , threshold ) ]