fix(capacity): accept dedicated fields projector
This commit is contained in:
@@ -2786,7 +2786,7 @@ func findingsForTopicFlow(parsedByService map[string]parsedMetricSet, thresholds
|
||||
var findings []string
|
||||
findings = append(findings, findingsForGatewayFieldFlow(parsedByService["gateway"], thresholds)...)
|
||||
findings = append(findings, findingsForGatewayFieldCounts(parsedByService["gateway"], thresholds)...)
|
||||
findings = append(findings, findingsForGatewayToBridgeFlow(parsedByService["gateway"], parsedByService["bridge"], thresholds)...)
|
||||
findings = append(findings, findingsForGatewayToBridgeFlow(parsedByService["gateway"], parsedByService["bridge"], parsedByService["fields-projector"], thresholds)...)
|
||||
findings = append(findings, findingsForGatewayToFastWriterFlow(parsedByService["gateway"], parsedByService["fast-writer"], thresholds)...)
|
||||
findings = append(findings, findingsForBridgeRawFanout(parsedByService["bridge"], parsedByService["history"], parsedByService["realtime"], thresholds)...)
|
||||
findings = append(findings, findingsForBridgeToStatFieldFlow(parsedByService["bridge"], parsedByService["stat"], thresholds)...)
|
||||
@@ -3045,12 +3045,13 @@ type gatewayPublishGroup struct {
|
||||
count float64
|
||||
}
|
||||
|
||||
func findingsForGatewayToBridgeFlow(gateway parsedMetricSet, bridge parsedMetricSet, thresholds Thresholds) []string {
|
||||
func findingsForGatewayToBridgeFlow(gateway parsedMetricSet, bridge parsedMetricSet, fieldsProjector parsedMetricSet, thresholds Thresholds) []string {
|
||||
if thresholds.GatewayBridgeMinPublish <= 0 {
|
||||
return nil
|
||||
}
|
||||
gatewayPublishes := gatewayPublishGroups(gateway.samples)
|
||||
bridgeWrites := metricValuesByTopic(bridge.samples, "vehicle_bridge_kafka_writes_total", "ok", "vehicle.")
|
||||
projectorWrites := metricValuesByTopic(fieldsProjector.samples, "vehicle_fields_projector_kafka_writes_total", "ok", "vehicle.fields.go.")
|
||||
var findings []string
|
||||
for _, group := range gatewayPublishes {
|
||||
if group.count < thresholds.GatewayBridgeMinPublish {
|
||||
@@ -3066,7 +3067,7 @@ func findingsForGatewayToBridgeFlow(gateway parsedMetricSet, bridge parsedMetric
|
||||
))
|
||||
continue
|
||||
}
|
||||
if bridgeWrites[topic] <= 0 {
|
||||
if bridgeWrites[topic] <= 0 && (group.kind != "fields" || projectorWrites[topic] <= 0) {
|
||||
findings = append(findings, fmt.Sprintf(
|
||||
"bridge writes missing for gateway %s publish protocol %s: gateway ok %.0f, expected topic %s, bridge writes ok %.0f",
|
||||
group.kind,
|
||||
|
||||
Reference in New Issue
Block a user