Failed Produce requests
Alert: KrabkaFailedProduceRequests, sum by (instance, topic) (rate(krabka_broker_topic_failed_produce_requests_total[5m])) > 0 for 5m.
What it means
Produce partition responses on the topic carry a non-zero error code. The
counter moves once per failed partition, so one request with two failed
partitions adds two. Authorization denials, unknown-topic responses, quota
throttles and NOT_ENOUGH_REPLICAS all count here.
Confirm
rate(krabka_broker_topic_failed_produce_requests_total[5m]) / rate(krabka_broker_topic_produce_requests_total[5m]) is the per-topic error
ratio. The producer’s own log names the error code.
Diagnose
Work through the causes from the most common:
NOT_ENOUGH_REPLICAS:krabka_broker_under_min_isr_partition_count > 0on the leader. Follow under min ISR partitions.TOPIC_AUTHORIZATION_FAILED: the principal has noWriteACL on the topic.kafka-acls --list --topic <topic>shows what exists. The audit topic records each denial with the principal.UNKNOWN_TOPIC_OR_PARTITION: the topic was deleted, or the producer has a stale metadata view during a reassignment.POLICY_VIOLATIONwith a[freeze]section: a write freeze covers the topic.krabka_broker_topic_freeze_rejections_total{topic}climbs at the same rate.krabka-guard freeze listshows the entry.INVALID_RECORDwith a[schema_registry]section:krabka_broker_schema_validation_rejections_total{topic, reason}names the reason.NOT_LEADER_OR_FOLLOWER: leadership moved and the producer has not refreshed metadata. This clears on its own after the producer’smetadata.max.age.ms.
Fix
Each cause above has its own fix: restore the ISR, grant the ACL, thaw the
freeze, or fix the producer’s serializer. A NOT_LEADER_OR_FOLLOWER burst
during a rolling upgrade is expected and needs no action.