Exemplo n.º 1
0
func (p *HeartbeatProcessor) ProcessHeartbeatEventsErrorCount(e *events.Heartbeat, origin string) *metrics.WMetric {
	stat := "ops." + origin + ".heartbeats.eventsErrorCount"
	metric := metrics.NewPerintervalCounterMetric(stat, int32(e.GetErrorCount()))

	return metric
}
func (p *HeartbeatProcessor) ProcessHeartbeatEventsReceivedCount(e *events.Heartbeat, origin string) *metrics.GaugeMetric {
	stat := "ops." + origin + ".heartbeats.eventsReceivedCount"
	metric := metrics.NewGaugeMetric(stat, int64(e.GetReceivedCount()))

	return metric
}