public class StackdriverWriter extends BaseOutputWriter
/v1/metrics
HTTP API.
Settings:
url": Stackdriver server URL. Optional, default value: "https://custom-gateway.stackdriver.com/v1/custom".token": Stackdriver API token. Mandatoryprefix": Prefix for the metric names. If present will be prepended to the metric name. Should be alphanumeric.
Optional, shouldn't be used at the same time as source or detectInstance. Different way of namespacing.source": Instance of the machine ID that the JMX data is being collected from. Optional.
detectInstance": Set to "AWS" if you want to detect the local AWS instance ID on startup. Optional.
timeoutInMillis": read timeout of the calls to Stackdriver HTTP API. Optional, default
value: 1000.enabled": flag to enable/disable the writer. Optional, default value: true.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STACKDRIVER_API_TIMEOUT_IN_MILLIS |
static String |
DEFAULT_STACKDRIVER_API_URL |
static String |
SETTING_DETECT_INSTANCE |
static String |
SETTING_PREFIX |
static String |
SETTING_PROXY_HOST |
static String |
SETTING_PROXY_PORT |
static String |
SETTING_SOURCE_INSTANCE |
static String |
SETTING_STACKDRIVER_API_KEY |
static String |
SETTING_STACKDRIVER_API_TIMEOUT_IN_MILLIS |
static String |
SETTING_STACKDRIVER_API_URL |
static int |
STACKDRIVER_PROTOCOL_VERSION |
BINARY_PATH, BOOLEAN_AS_NUMBER, DEBUG, HOST, OUTPUT_FILE, PORT, TEMPLATE_FILE, TYPE_NAMES| Constructor and Description |
|---|
StackdriverWriter(com.google.common.collect.ImmutableList<String> typeNames,
boolean booleanAsNumber,
Boolean debugEnabled,
String gatewayUrl,
String apiKey,
String proxyHost,
Integer proxyPort,
String prefix,
Integer timeoutInMillis,
String source,
String detectInstance,
Map<String,Object> settings) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApiKey() |
String |
getDetectInstance() |
String |
getGatewayUrl() |
String |
getPrefix() |
String |
getProxyHost() |
Integer |
getProxyPort() |
String |
getSource() |
int |
getTimeoutInMillis() |
void |
internalWrite(Server server,
Query query,
com.google.common.collect.ImmutableList<Result> results)
Implementation of the base writing method.
|
void |
validateSetup(Server server,
Query query)
Sets up the object and makes sure all the required parameters are available
Minimally a Stackdriver API key must be provided using the token setting |
close, create, doWrite, firstNonNull, getConcatedTypeNameValues, getSettings, getTypeNames, isDebugEnabled, start, toStringpublic static final int STACKDRIVER_PROTOCOL_VERSION
public static final int DEFAULT_STACKDRIVER_API_TIMEOUT_IN_MILLIS
public static final String DEFAULT_STACKDRIVER_API_URL
public static final String SETTING_STACKDRIVER_API_URL
public static final String SETTING_PROXY_PORT
public static final String SETTING_PROXY_HOST
public static final String SETTING_STACKDRIVER_API_KEY
public static final String SETTING_SOURCE_INSTANCE
public static final String SETTING_DETECT_INSTANCE
public static final String SETTING_STACKDRIVER_API_TIMEOUT_IN_MILLIS
public static final String SETTING_PREFIX
public StackdriverWriter(com.google.common.collect.ImmutableList<String> typeNames, boolean booleanAsNumber, Boolean debugEnabled, String gatewayUrl, String apiKey, String proxyHost, Integer proxyPort, String prefix, Integer timeoutInMillis, String source, String detectInstance, Map<String,Object> settings) throws MalformedURLException
MalformedURLExceptionpublic void validateSetup(Server server, Query query) throws ValidationException
ValidationExceptionpublic void internalWrite(Server server, Query query, com.google.common.collect.ImmutableList<Result> results) throws Exception
internalWrite in class BaseOutputWriterExceptionpublic String getGatewayUrl()
public String getProxyHost()
public Integer getProxyPort()
public String getPrefix()
public String getApiKey()
public int getTimeoutInMillis()
public String getSource()
public String getDetectInstance()
Copyright © 2010-2017 JmxTrans team. All Rights Reserved.