Hi folks,
I'm using the jmx-exporter to collect metrics from Kafka brokers. However, I'm having a bit of trouble with a particular regex pattern:
- pattern: kafka.network<type=RequestMetrics, name=ErrorsPerSec, request=(.+), error=(^(?!NONE$).*)><>Count
name: kafka_request_errors_total
type: COUNTER
cache: true
labels:
request: "$1"
error: "$2"
I want to collect every sample except in the cases when the error attribute is NONE. The rule does not seem to work as the jmx-exporter stops returning the metric altogether. If I change the pattern to error=(.+) it works just fine.
Have you guys done something similar? Is something wrong with my approach?