Class OpenTsdbHttpQueryClient
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.opentsdb.client.impl.OpenTsdbHttpQueryClient
-
- All Implemented Interfaces:
OpenTsdbQueryClient
public class OpenTsdbHttpQueryClient extends java.lang.Object implements OpenTsdbQueryClient
A OpenTSDB query client that can be used to pose queries against an OpenTSDB server according to the OpenTSDB HTTP API. TheOpenTsdbHttpQueryClientallows "raw" queries to be posed against OpenTSDB.
-
-
Constructor Summary
Constructors Constructor Description OpenTsdbHttpQueryClient()Constructs aOpenTsdbHttpQueryClientthat uses a defaultLoggerinstance.OpenTsdbHttpQueryClient(org.slf4j.Logger logger)Constructs aOpenTsdbHttpQueryClientwith a specifiedLoggerinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>query(java.lang.String queryUrl)Executes a query against an OpenTSDB server.
-
-
-
Constructor Detail
-
OpenTsdbHttpQueryClient
public OpenTsdbHttpQueryClient()
Constructs aOpenTsdbHttpQueryClientthat uses a defaultLoggerinstance.
-
OpenTsdbHttpQueryClient
public OpenTsdbHttpQueryClient(org.slf4j.Logger logger)
Constructs aOpenTsdbHttpQueryClientwith a specifiedLoggerinstance.- Parameters:
logger- ALoggerthat log output will be written to.
-
-
Method Detail
-
query
public java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue> query(java.lang.String queryUrl) throws java.lang.ExceptionDescription copied from interface:OpenTsdbQueryClientExecutes a query against an OpenTSDB server. The returnedMetricValues are sorted in order of increasing time stamp.- Specified by:
queryin interfaceOpenTsdbQueryClient- Parameters:
queryUrl- A complete OpenTSDB query URL. The query URL must adhere to the OpenTSDB HTTP API.- Returns:
- The list of metric values that the query generated, sorted in order of increasing time.
- Throws:
java.lang.Exception- If the query execution failed.
-
-