Class MetricsImpl

java.lang.Object
com.eqixiac.equinix.fabric.client.implementation.MetricsImpl
All Implemented Interfaces:
Metrics

public class MetricsImpl extends Object implements Metrics
Default Metrics implementation over POST /fabric/v4/metrics/search.
Author:
ianjones
  • Constructor Details

    • MetricsImpl

      public MetricsImpl()
  • Method Details

    • search

      public PaginatedFilteredList<Metric> search(MetricQuery query)
      Description copied from interface: Metrics
      Searches metrics with a filter built by a MetricQuery.
      Specified by:
      search in interface Metrics
      Parameters:
      query - the query (one subject, at least one metric name)
      Returns:
      a paginated, filtered list of matching metrics
    • search

      Description copied from interface: Metrics
      Searches metrics with a hand-built filter.
      Specified by:
      search in interface Metrics
      Parameters:
      filter - the filter; it must contain one /subject and a /name expression
      sort - the sort criteria, or null
      Returns:
      a paginated, filtered list of matching metrics
    • forConnection

      public List<Metric> forConnection(String connectionUuid, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Description copied from interface: Metrics
      Returns every page of the named metrics of one connection over a time range.
      Specified by:
      forConnection in interface Metrics
      Parameters:
      connectionUuid - the connection uuid
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.connection.bandwidth_tx.usage
      Returns:
      the metrics
    • forPort

      public List<Metric> forPort(String portUuid, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Description copied from interface: Metrics
      Returns every page of the named metrics of one port over a time range.
      Specified by:
      forPort in interface Metrics
      Parameters:
      portUuid - the port uuid
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.port.bandwidth_rx.usage
      Returns:
      the metrics
    • forMetro

      public List<Metric> forMetro(String metroCode, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Description copied from interface: Metrics
      Returns every page of the named metrics of one metro over a time range.
      Specified by:
      forMetro in interface Metrics
      Parameters:
      metroCode - the metro code, for example SV
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.metro.sv_dc.latency
      Returns:
      the metrics
    • getMetricsByName

      public List<Metric> getMetricsByName(String name, String value)
      Description copied from interface: Metrics
      Retrieves metrics by wildcard metric name (GET /fabric/v4/metrics). Only the wildcard metro metric types are supported (for example equinix.fabric.metro.*.latency or equinix.fabric.metro.*.jitter_avg). This endpoint does not support time-range filtering.
      Specified by:
      getMetricsByName in interface Metrics
      Parameters:
      name - the wildcard metric name (required)
      value - which value to retrieve (for example last; required)
      Returns:
      the list of matching metrics