public class GangliaRequestMessage extends AbstractGangliaMessage implements IGangliaRequestMessage
Ganglia sends out request messages when a service wants to obtain fresh metrics. The gmond instances handle the request by clearing the timestamp associated with the metric. This causes the metric to be retransmitted soon thereafter (a ZERO (0) timestamp is interpreted as the metric having never been transmitted).
In order to prevent multicast storms, a service will conditionally clear the timestamp associated with a metric if it has been running for at least some minimum period of time (e.g., 10 minutes).
In order to generate request messages, a service needs to notice the first time any given metric name is declared (including metrics which it is self-reporting) and then multicast a request for that metric in order to obtain its value from all participating ganglia services. There is no means for a service to request a metric which it is neither self-reported nor observed.
It appears that ganglia actually tracks the age of metric groups as well as individual metrics and will reset the timestamp on the group if a request is received for any metric in that group.
The request record itself does not have any additional fields. It is just the metric_id header with the appropriate byte code for the record type.
Constructor and Description |
---|
GangliaRequestMessage(String hostName,
String metricName,
boolean spoof) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isMetricMetadata()
Return
true iff this message contains the metadata for a
metric (the metric declaration). |
boolean |
isMetricRequest()
Return
true iff this message is a request for a metric. |
boolean |
isMetricValue()
Return
true if this message represents a metric value. |
String |
toString() |
getHostName, getMetricName, getRecordType, isSpoof
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getHostName, getMetricName, getRecordType, isSpoof
public boolean isMetricValue()
IGangliaMessage
true
if this message represents a metric value.isMetricValue
in interface IGangliaMessage
public boolean isMetricRequest()
IGangliaMessage
true
iff this message is a request for a metric.isMetricRequest
in interface IGangliaMessage
GangliaMessageTypeEnum.REQUEST
public boolean isMetricMetadata()
IGangliaMessage
true
iff this message contains the metadata for a
metric (the metric declaration).isMetricMetadata
in interface IGangliaMessage
GangliaMessageTypeEnum.METADATA
public boolean equals(Object o)
equals
in class AbstractGangliaMessage
public int hashCode()
hashCode
in class AbstractGangliaMessage
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.