public class MonitoringHandler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MonitoringHandler.MonitoringCallback |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACTIVE_QUEUE_COUNT_METRIC |
static java.lang.String |
DEQUEUE_METRIC |
static java.lang.String |
ENQUEUE_METRIC |
static java.lang.String |
LAST_USED_QUEUE_SIZE_METRIC |
static java.lang.String |
MARK |
static int |
MAX_AGE_MILLISECONDS
Deprecated.
|
static java.lang.String |
METRIC_ACTION |
static java.lang.String |
METRIC_NAME |
static java.lang.String |
PENDING_REQUESTS_METRIC |
static java.lang.String |
QUEUES_KEY_PREFIX
Deprecated.
|
static long |
REQUEST_PER_RULE_DEFAULT_EXPIRY |
static long |
REQUEST_PER_RULE_DEFAULT_SAMPLING |
static java.lang.String |
REQUEST_PER_RULE_EXPIRY_PROPERTY |
static java.lang.String |
REQUEST_PER_RULE_PREFIX |
static java.lang.String |
REQUEST_PER_RULE_PROPERTY |
static java.lang.String |
REQUEST_PER_RULE_SAMPLING_PROPERTY |
static java.lang.String |
REQUESTS_BACKENDS_NAME |
static java.lang.String |
REQUESTS_CLIENT_NAME |
static java.lang.String |
SET |
| Constructor and Description |
|---|
MonitoringHandler(io.vertx.core.Vertx vertx,
io.vertx.redis.RedisClient redisClient,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix)
Deprecated.
|
MonitoringHandler(io.vertx.core.Vertx vertx,
io.vertx.redis.RedisClient redisClient,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix,
java.lang.String requestPerRulePath)
Deprecated.
|
MonitoringHandler(io.vertx.core.Vertx vertx,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix) |
MonitoringHandler(io.vertx.core.Vertx vertx,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix,
java.lang.String requestPerRulePath) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMonitoringAddress()
Get the event bus address of the monitoring.
|
protected java.lang.String |
getRedisquesAddress()
Get the event bus address of redisques.
|
long |
getRequestPerRuleExpiry() |
java.lang.String |
getRequestPerRuleMonitoringPath() |
long |
getRequestPerRuleSampling() |
boolean |
isRequestPerRuleMonitoringActive() |
long |
startRequestMetricTracking(java.lang.String metricName,
java.lang.String targetUri)
Start the metric tracking for the requests defined with the metricName (routing rule)
|
void |
stopRequestMetricTracking(java.lang.String metricName,
long startTime,
java.lang.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(java.lang.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,
java.lang.String metricName) |
void |
updateRequestsMeter(java.lang.String target,
java.lang.String uri)
Update the meter values for requests.
|
public static final java.lang.String METRIC_NAME
public static final java.lang.String METRIC_ACTION
public static final java.lang.String MARK
public static final java.lang.String SET
public static final java.lang.String REQUESTS_CLIENT_NAME
public static final java.lang.String REQUESTS_BACKENDS_NAME
public static final java.lang.String PENDING_REQUESTS_METRIC
public static final java.lang.String ACTIVE_QUEUE_COUNT_METRIC
public static final java.lang.String LAST_USED_QUEUE_SIZE_METRIC
public static final java.lang.String ENQUEUE_METRIC
public static final java.lang.String DEQUEUE_METRIC
@Deprecated public static final java.lang.String QUEUES_KEY_PREFIX
@Deprecated public static final int MAX_AGE_MILLISECONDS
public static final java.lang.String REQUEST_PER_RULE_PREFIX
public static final java.lang.String REQUEST_PER_RULE_PROPERTY
public static final java.lang.String REQUEST_PER_RULE_SAMPLING_PROPERTY
public static final java.lang.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,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix)
MonitoringHandler(Vertx, ResourceStorage, String) instead@Deprecated
public MonitoringHandler(io.vertx.core.Vertx vertx,
io.vertx.redis.RedisClient redisClient,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix,
java.lang.String requestPerRulePath)
MonitoringHandler(Vertx, ResourceStorage, String, String) insteadpublic MonitoringHandler(io.vertx.core.Vertx vertx,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix)
public MonitoringHandler(io.vertx.core.Vertx vertx,
org.swisspush.gateleen.core.storage.ResourceStorage storage,
java.lang.String prefix,
java.lang.String requestPerRulePath)
protected java.lang.String getMonitoringAddress()
protected java.lang.String getRedisquesAddress()
public java.lang.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,
java.lang.String metricName)
public void updateRequestsMeter(java.lang.String target,
java.lang.String uri)
target - the target url of the requesturi - uripublic long startRequestMetricTracking(java.lang.String metricName,
java.lang.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(java.lang.String metricName,
long startTime,
java.lang.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(java.lang.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()