L - the type of the protocol specific location, typically a subclass of NodeLocationpublic interface SamplingService<L>
MonitoredEndpoint.| Modifier and Type | Method and Description |
|---|---|
default String |
generateAssociatedMetricId(MeasurementInstance<L,? extends MeasurementType<L>> instance)
Given a measurement instance, this will generate the key to be used when
storing that measurement instance's collected data to storage.
|
Map<String,String> |
generateAssociatedMetricTags(MeasurementInstance<L,? extends MeasurementType<L>> instance)
Given a measurement instance, this will generate the tags to be added to the
associated Hawkular Metrics metric definition.
|
MonitoredEndpoint<MonitorServiceConfiguration.EndpointConfiguration> |
getMonitoredEndpoint() |
void |
measureAvails(Collection<MeasurementInstance<L,AvailType<L>>> instances,
Consumer<AvailDataPoint> consumer)
Checks the availabilities defined by
instances and reports them back to the given consumer. |
void |
measureMetrics(Collection<MeasurementInstance<L,MetricType<L>>> instances,
Consumer<MetricDataPoint> consumer)
Collects the metrics defined by
instances and reports them back to the given consumer. |
MonitoredEndpoint<MonitorServiceConfiguration.EndpointConfiguration> getMonitoredEndpoint()
Map<String,String> generateAssociatedMetricTags(MeasurementInstance<L,? extends MeasurementType<L>> instance)
the endpoint configuration which contains
the metric tags.instance - the measurement instance whose tags are to be generateddefault String generateAssociatedMetricId(MeasurementInstance<L,? extends MeasurementType<L>> instance)
the endpoint configuration which contains a
metric ID template.
If this method is not implemented, the default behavior is to return the ID of
the measurement instance itself.instance - the measurement instance whose key is to be generatedMeasurementInstance#getAssociatedMetricId(String),
MeasurementInstance.setAssociatedMetricId(String)void measureAvails(Collection<MeasurementInstance<L,AvailType<L>>> instances, Consumer<AvailDataPoint> consumer)
instances and reports them back to the given consumer.
If the relevant Endpoint is unreachable all instances are reported as Avail.DOWN.instances - the availabilities to checkconsumer - the consumer to send the results tovoid measureMetrics(Collection<MeasurementInstance<L,MetricType<L>>> instances, Consumer<MetricDataPoint> consumer)
instances and reports them back to the given consumer.instances - the metrics to checkconsumer - the consumer to send the results toCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.