public class ResourceInformationCollector extends Object
ContainerManager using the given DockerClient.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private ContainerManager |
manager |
static String |
PROMETHEUS_HOST_DEFAULT |
static String |
PROMETHEUS_HOST_KEY |
static String |
PROMETHEUS_PORT_DEFAULT |
static String |
PROMETHEUS_PORT_KEY |
private String |
prometheusHost |
private String |
prometheusPort |
| Constructor and Description |
|---|
ResourceInformationCollector(ContainerManager manager) |
ResourceInformationCollector(ContainerManager manager,
String prometheusHost,
String prometheusPort) |
| Modifier and Type | Method and Description |
|---|---|
org.hobbit.core.data.usage.ResourceUsageInformation |
getSystemUsageInformation() |
org.hobbit.core.data.usage.ResourceUsageInformation |
getUsageInformation(com.spotify.docker.client.messages.swarm.Task.Criteria criteria) |
protected org.hobbit.core.data.usage.ResourceUsageInformation |
requestCpuAndMemoryStats(String taskId) |
private String |
requestPrometheusValue(String taskId,
String metric) |
private static final org.slf4j.Logger LOGGER
public static final String PROMETHEUS_HOST_KEY
public static final String PROMETHEUS_PORT_KEY
public static final String PROMETHEUS_HOST_DEFAULT
public static final String PROMETHEUS_PORT_DEFAULT
private ContainerManager manager
private String prometheusHost
private String prometheusPort
public ResourceInformationCollector(ContainerManager manager)
public ResourceInformationCollector(ContainerManager manager, String prometheusHost, String prometheusPort)
public org.hobbit.core.data.usage.ResourceUsageInformation getSystemUsageInformation()
public org.hobbit.core.data.usage.ResourceUsageInformation getUsageInformation(com.spotify.docker.client.messages.swarm.Task.Criteria criteria)
protected org.hobbit.core.data.usage.ResourceUsageInformation requestCpuAndMemoryStats(String taskId)
private String requestPrometheusValue(String taskId, String metric) throws IOException, MalformedURLException
IOExceptionMalformedURLExceptionCopyright © 2017–2018. All rights reserved.