All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.synedge.oss.client.QueryClient Maven / Gradle / Ivy

Go to download

This client allows you to easily connect to the Synedge API with any language running on the JDK

The newest version!
package com.synedge.oss.client;

import com.synedge.oss.client.query.Target;
import com.synedge.oss.client.query.TargetNode;

import java.util.List;

/**
 * Interface for making queries to the Synedge backend
 * @author Paul van Assen
 *
 */
public interface QueryClient {
    /**
     * Query a backend metric, from start to end. Start and end are in Graphite notation. Granuality can be 5m, 1h, 1d, 1w, 1mon or 1y. 
     * Targets are metrics to be queried. Some simple functions are available:
     * 
    *
  • min
  • *
  • max
  • *
  • sum
  • *
  • avg
  • *
*
* One special function is alias. This allows you to alias a target. It will in the results then not use the target as identifier but the alias.
* Sample method defines how data points should be treated when packed together in a bigger time frame. By default http metrics are stored in a 5 minute interval. If a * granularity of 1 hour is requested * data will be aggregated/packed. This can be done by adding it up, or taking the average. The methods are the same as the previously mentioned simple functions.
* Possible values granularity: *
    *
  • finest
  • *
  • hour
  • *
  • day
  • *
  • week
  • *
  • month
  • *
  • year
  • *
*
* Possibel values for agregation are: *
    *
  • min
  • *
  • max
  • *
  • sum
  • *
  • avg
  • *
* * @param customerId Customer id * @param start Start, this may be an absolute date (ISO 8601 date) or relative: -1w for one week ago * @param end End time. Same rules apply as for start time * @param query Query to send. * @return List of targets received */ List query(String customerId, String start, String end, String query); /** * Metrics are stored in paths similar to Graphite. Each part is separated by a '.'. This allows for easy adding of new metrics. You can query each of the nodes or request a list of child nodes: *
    *
  • <distributiongroup>.http will return a list of one TargetNode containing the name http and leaf will be false.
  • *
  • <distributiongroup>.http.* will return a list of nodes containing all children of http, at this moment it will contain europe and/or north_america and possibly south_america or asia. Each of the nodes will have the leaf set to false
  • *
* * If leaf is set to true, it means data can be queried on it. * * @param customerId Customer id * @param parentNode Parent node. * @return List of target nodes */ List find(String customerId, String parentNode); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy