public class MonitoringHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MonitoringHandler.MonitoringCallback |
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_QUEUE_COUNT_METRIC |
static String |
DEQUEUE_METRIC |
static String |
ENQUEUE_METRIC |
static String |
LAST_USED_QUEUE_SIZE_METRIC |
static String |
MARK |
static int |
MAX_AGE_MILLISECONDS
Deprecated.
|
static String |
METRIC_ACTION |
static String |
METRIC_NAME |
static String |
PENDING_REQUESTS_METRIC |
static String |
QUEUES_KEY_PREFIX
Deprecated.
|
static long |
REQUEST_PER_RULE_DEFAULT_EXPIRY |
static long |
REQUEST_PER_RULE_DEFAULT_SAMPLING |
static String |
REQUEST_PER_RULE_EXPIRY_PROPERTY |
static String |
REQUEST_PER_RULE_PREFIX |
static String |
REQUEST_PER_RULE_PROPERTY |
static String |
REQUEST_PER_RULE_SAMPLING_PROPERTY |
static String |
REQUESTS_BACKENDS_NAME |
static String |
REQUESTS_CLIENT_NAME |
static String |
SET |
| Constructor and Description |
|---|
MonitoringHandler(io.vertx.core.Vertx vertx,
io.vertx.redis.RedisClient redisClient,
ResourceStorage storage,
String prefix)
Deprecated.
|
MonitoringHandler(io.vertx.core.Vertx vertx,
io.vertx.redis.RedisClient redisClient,
ResourceStorage storage,
String prefix,
String requestPerRulePath)
Deprecated.
|
MonitoringHandler(io.vertx.core.Vertx vertx,
ResourceStorage storage,
String prefix) |
MonitoringHandler(io.vertx.core.Vertx vertx,
ResourceStorage storage,
String prefix,
String requestPerRulePath) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getMonitoringAddress()
Get the event bus address of the monitoring.
|
protected String |
getRedisquesAddress()
Get the event bus address of redisques.
|
long |
getRequestPerRuleExpiry() |
String |
getRequestPerRuleMonitoringPath() |
long |
getRequestPerRuleSampling() |
boolean |
isRequestPerRuleMonitoringActive() |
long |
startRequestMetricTracking(String metricName,
String targetUri)
Start the metric tracking for the requests defined with the metricName (routing rule)
|
void |
stopRequestMetricTracking(String metricName,
long startTime,
String targetUri)
Stop the metric tracking for the requests defined with the metricName (routing rule)
|
void |
updateDequeue() |
void |
updateEnqueue() |
void |
updateIncomingRequests(io.vertx.core.http.HttpServerRequest request) |
void |
updateLastUsedQueueSizeInformation(String queue)
Reads the size from the last used Queue from redis and stores it to JMX
|
void |
updateQueueCountInformation()
Update the count of active queues.
|
void |
updateQueuesSizesInformation(int numQueues,
boolean showEmptyQueues,
MonitoringHandler.MonitoringCallback callback)
Updates the information about the sizes of the top (numQueues) sized queues.
|
void |
updateRequestPerRuleMonitoring(io.vertx.core.http.HttpServerRequest request,
String metricName) |
void |
updateRequestsMeter(String target,
String uri)
Update the meter values for requests.
|
public static final String METRIC_NAME
public static final String METRIC_ACTION
public static final String MARK
public static final String SET
public static final String REQUESTS_CLIENT_NAME
public static final String REQUESTS_BACKENDS_NAME
public static final String PENDING_REQUESTS_METRIC
public static final String ACTIVE_QUEUE_COUNT_METRIC
public static final String LAST_USED_QUEUE_SIZE_METRIC
public static final String ENQUEUE_METRIC
public static final String DEQUEUE_METRIC
@Deprecated public static final String QUEUES_KEY_PREFIX
@Deprecated public static final int MAX_AGE_MILLISECONDS
public static final String REQUEST_PER_RULE_PREFIX
public static final String REQUEST_PER_RULE_PROPERTY
public static final String REQUEST_PER_RULE_SAMPLING_PROPERTY
public static final String REQUEST_PER_RULE_EXPIRY_PROPERTY
public static final long REQUEST_PER_RULE_DEFAULT_SAMPLING
public static final long REQUEST_PER_RULE_DEFAULT_EXPIRY
@Deprecated public MonitoringHandler(io.vertx.core.Vertx vertx, io.vertx.redis.RedisClient redisClient, ResourceStorage storage, String prefix)
MonitoringHandler(Vertx, ResourceStorage, String) instead@Deprecated public MonitoringHandler(io.vertx.core.Vertx vertx, io.vertx.redis.RedisClient redisClient, ResourceStorage storage, String prefix, String requestPerRulePath)
MonitoringHandler(Vertx, ResourceStorage, String, String) insteadpublic MonitoringHandler(io.vertx.core.Vertx vertx,
ResourceStorage storage,
String prefix)
public MonitoringHandler(io.vertx.core.Vertx vertx,
ResourceStorage storage,
String prefix,
String requestPerRulePath)
protected String getMonitoringAddress()
protected String getRedisquesAddress()
public String getRequestPerRuleMonitoringPath()
public boolean isRequestPerRuleMonitoringActive()
public long getRequestPerRuleSampling()
public long getRequestPerRuleExpiry()
public void updateIncomingRequests(io.vertx.core.http.HttpServerRequest request)
public void updateRequestPerRuleMonitoring(io.vertx.core.http.HttpServerRequest request,
String metricName)
public void updateRequestsMeter(String target, String uri)
target - the target url of the requesturi - uripublic long startRequestMetricTracking(String metricName, String targetUri)
metricName - the name of the metric. This name will be used as name of the JMX MBean. metricNames are defined in routing rules with the property "metricName"targetUri - targetUripublic void stopRequestMetricTracking(String metricName, long startTime, String targetUri)
metricName - the name of the metric. This name will be used as name of the JMX MBean. metricNames are defined in routing rules with the property "metricName"startTime - start timetargetUri - target uripublic void updateQueueCountInformation()
public void updateLastUsedQueueSizeInformation(String queue)
queue - the name of the queue the last update was madepublic void updateQueuesSizesInformation(int numQueues,
boolean showEmptyQueues,
MonitoringHandler.MonitoringCallback callback)
numQueues - the number of queuesshowEmptyQueues - show empty queues or notcallback - the callback returning the resultpublic void updateEnqueue()
public void updateDequeue()
Copyright © 2016–2018. All rights reserved.