Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(inputs.statsd): Expose allowed_pending_messages as internal stat #15687

Conversation

jdheyburn
Copy link
Contributor

Summary

allowed_pending_messages is a config described as:

  ## Number of UDP messages allowed to queue up, once filled,
  ## the statsd server will start dropping packets

Currently statsd_pending_messages is exported which allows you to see the number of pending messages. However exporting the config value for allowed_pending_messages is helpful to then set up alerting on when that limit has been reached.

I'm open to changing the name of the stat away from max_pending_messages. I don't mind setting it to allowed_pending_messages but then I think I would need code similar to below to avoid the conflict in names. MaxPendingMessages to me indicates that pending messages cannot go above this value.

	s.AllowedPendingMessagesStat = selfstat.Register("statsd", "allowed_pending_messages", tags)
	s.AllowedPendingMessagesStat.Set(int64(s.AllowedPendingMessages))

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15686

@telegraf-tiger telegraf-tiger bot added area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jul 30, 2024
@jdheyburn jdheyburn marked this pull request as ready for review July 30, 2024 12:03
@telegraf-tiger
Copy link
Contributor

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 30, 2024
@srebhan srebhan changed the title feat(inputs.statsd): expose allowed_pending_messages as metric feat(inputs.statsd): Expose allowed_pending_messages as metric Jul 31, 2024
@srebhan srebhan changed the title feat(inputs.statsd): Expose allowed_pending_messages as metric feat(inputs.statsd): Expose allowed_pending_messages as internal stat Jul 31, 2024
@srebhan
Copy link
Member

srebhan commented Jul 31, 2024

Thanks @jdheyburn!

@srebhan srebhan merged commit 094eff6 into influxdata:master Jul 31, 2024
31 checks passed
@github-actions github-actions bot added this to the v1.32.0 milestone Jul 31, 2024
@jdheyburn jdheyburn deleted the jdheyburn/statsd/add-max-pending-messages-stat branch August 8, 2024 09:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: [inputs.statsd] export allowed_pending_messages config as a metric
4 participants