Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add omkafka support #12

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

jayme-github
Copy link

@jayme-github jayme-github commented Feb 20, 2024

Parse omkafka statistics according to
https://www.rsyslog.com/doc/configuration/modules/omkafka.html#statistic-counter

Signed-off-by: Janis Meybohm <jmeybohm@wikimedia.org>
@filippog
Copy link

LGTM! Thank you @jayme-github !

Sample metrics for reference:

# HELP rsyslog_omkafka_errors msg_too_large: failed to deliver to the broker because broker considers message to be too large. Note that omkafka may still resubmit to librdkafka depending on resubmitOnFailure option; unknown_topic: failed to deliver to the broker because broker does not recognize the topic; queue_full: dropped by librdkafka when its queue becomes full. Note that default size of librdkafka queue is 100,000 messages; unknown_partition: failed to deliver because broker does not recognize a partition; other: all of the rest of the failures that do not fall in any of the other failure categories
# TYPE rsyslog_omkafka_errors counter
rsyslog_omkafka_errors{type="auth"} 0
rsyslog_omkafka_errors{type="broker_down"} 0
rsyslog_omkafka_errors{type="other"} 0
rsyslog_omkafka_errors{type="ssl"} 0
rsyslog_omkafka_errors{type="timed_out"} 0
rsyslog_omkafka_errors{type="transport"} 0
# HELP rsyslog_omkafka_failures msg_too_large: failed to deliver to the broker because broker considers message to be too large. Note that omkafka may still resubmit to librdkafka depending on resubmitOnFailure option; unknown_topic: failed to deliver to the broker because broker does not recognize the topic; queue_full: dropped by librdkafka when its queue becomes full. Note that default size of librdkafka queue is 100,000 messages; unknown_partition: failed to deliver because broker does not recognize a partition; other: all of the rest of the failures that do not fall in any of the other failure categories
# TYPE rsyslog_omkafka_failures counter
rsyslog_omkafka_failures{type="msg_too_large"} 0
rsyslog_omkafka_failures{type="other"} 0
rsyslog_omkafka_failures{type="queue_full"} 0
rsyslog_omkafka_failures{type="unknown_partition"} 0
rsyslog_omkafka_failures{type="unknown_topic"} 0
# HELP rsyslog_omkafka_int_latency_avg_usec_avg internal librdkafka producer queue latency in microseconds averaged other all brokers. This is also part of window statistics and average excludes brokers with zero internal latency
# TYPE rsyslog_omkafka_int_latency_avg_usec_avg gauge
rsyslog_omkafka_int_latency_avg_usec_avg 0
# HELP rsyslog_omkafka_maxoutqsize high water mark of output queue size
# TYPE rsyslog_omkafka_maxoutqsize counter
rsyslog_omkafka_maxoutqsize 0
# HELP rsyslog_omkafka_messages number of messages: submitted: messages submitted to omkafka for processing (with both acknowledged deliveries to broker as well as failed or re-submitted from omkafka to librdkafka); failures: messages that librdkafka failed to deliver (broken down into various types in omkafka_failures); acked: messages that were acknowledged by kafka broker. Note that kafka broker provides two levels of delivery acknowledgements depending on topicConfParam: default (acks=1) implies delivery to the leader only while acks=-1 implies delivery to leader as well as replication to all brokers
# TYPE rsyslog_omkafka_messages counter
rsyslog_omkafka_messages{type="acked"} 0
rsyslog_omkafka_messages{type="failures"} 0
rsyslog_omkafka_messages{type="submitted"} 0
# HELP rsyslog_omkafka_rtt_avg_usec_acg broker round trip time in microseconds averaged over all brokers. It is based on the statistics callback window specified through statistics.interval.ms parameter to librdkafka. Average exclude brokers with less than 100 microseconds rtt
# TYPE rsyslog_omkafka_rtt_avg_usec_acg gauge
rsyslog_omkafka_rtt_avg_usec_acg 0
# HELP rsyslog_omkafka_throttle_avg_msec_avg broker throttling time in milliseconds averaged over all brokers. This is also a part of window statistics delivered by librdkakfka. Average excludes brokers with zero throttling time
# TYPE rsyslog_omkafka_throttle_avg_msec_avg gauge
rsyslog_omkafka_throttle_avg_msec_avg 0
# HELP rsyslog_omkafka_topicdynacache skipped: dynamic topic cache lookups that find an existing topic and skip creating a new one; miss: dynamic topic cache lookups that fail to find an existing topic and end up creating new one; evicted: dynamic topic cache entry evictions
# TYPE rsyslog_omkafka_topicdynacache counter
rsyslog_omkafka_topicdynacache{type="evicted"} 0
rsyslog_omkafka_topicdynacache{type="miss"} 0
rsyslog_omkafka_topicdynacache{type="skipped"} 0

@aleroyer
Copy link
Collaborator

Thank your for your contribution.
I'm merging this and I will make a new release.

@aleroyer aleroyer merged commit 03b3586 into prometheus-community:master Feb 22, 2024
2 checks passed
@jayme-github jayme-github deleted the omkafka branch February 22, 2024 09:26
jayme-github added a commit to wikimedia/rsyslog_exporter that referenced this pull request Feb 22, 2024
jayme-github added a commit to wikimedia/rsyslog_exporter that referenced this pull request Feb 22, 2024
This is a follow up fixing an error I made in prometheus-community#12

Signed-off-by: Janis Meybohm <jmeybohm@wikimedia.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants