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

feat(inputs.apcupsd): Added new fields to apcupsd #12014

Merged
merged 4 commits into from
Oct 24, 2022
Merged

feat(inputs.apcupsd): Added new fields to apcupsd #12014

merged 4 commits into from
Oct 24, 2022

Conversation

olivergregorius
Copy link
Contributor

Required for all PRs

resolves #9761

  • Added new fields: status, cumulative_time_on_battery_ns, last_transfer, number_transfers
  • Aligned order of fields in implementation, test and documentation

…_time_on_battery_ns, last_transfer, number_transfers. Aligned order of fields in implementation, test and documentation
@telegraf-tiger telegraf-tiger bot added 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 Oct 13, 2022
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this up - one initial question about duplicate status field?

- model
- fields:
- status_flags ([status-bits][])
- status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm having status as a field and tag is not ideal. What is the difference in data?

Copy link
Contributor Author

@olivergregorius olivergregorius Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no difference in data. The disadvantage having the status as tag is that it may change, leading to different datasets for the same device. I thought about removing it from tags completely but decided to leave it there for backwards compatibility, avoiding breaking someone's dashboards.

EDIT: Probably this makes it more clear what I mean with "different datasets" when status changes:
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the example, let me chat with the team on Monday and get back to you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after chatting with the team it seems historically we have not done this. Instead of someone needs a tag as a field or a field as a tag, then the correct thing is to use the converter processor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @powersj for your response. So do you suggest to remove the status in the current implementation of this PR

  1. from the tags - having it as field only (where it should reside IMHO), breaking change
    or
  2. from the fields - keeping it as a tag, being backwards compatible?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping it as a tag, being backwards compatible

This is the way

We try to keep everything as backwards compatible as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, fine for me. Removed status from fields again.

@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@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 Oct 24, 2022
@MyaLongmire MyaLongmire merged commit f7c46fd into influxdata:master Oct 24, 2022
@olivergregorius olivergregorius deleted the add_new_fields_to_apcupsd branch October 24, 2022 14:07
dba-leshop pushed a commit to dba-leshop/telegraf that referenced this pull request Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

APCUPS plugin - add LASTXFER parameter
3 participants