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

fix(inputs.upsd): add additional fields #12543

Merged
merged 2 commits into from
Jan 31, 2023
Merged

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Jan 24, 2023

This adds some additional numeric fields around the battery runtime,
input transfer, and ups delay.

Additionally, this will grab the battery date (date it was changed)
and battery date mfr (date it was mrf) as two different fields.

fixes: #12517

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jan 24, 2023
@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 Jan 25, 2023
@powersj powersj marked this pull request as ready for review January 25, 2023 20:17
@srebhan
Copy link
Contributor

srebhan commented Jan 26, 2023

@powersj can you please rebase this PR to resolve the conflicts first!?

This adds some additional numeric fields around the battery runtime,
input transfer, and ups delay.

Additionally, this will grab the battery date (date it was changed)
and battery date mfr (date it was mrf) as two different fields.

fixes: influxdata#12517
@powersj
Copy link
Contributor Author

powersj commented Jan 26, 2023

@powersj can you please rebase this PR to resolve the conflicts first!?

done!

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good. Only one question regarding battery_runtime as this is already reported as time_left_ns IMO...

}

floatValues := map[string]string{
"battery_charge_percent": "battery.charge",
"battery_runtime": "battery.runtime",
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this reported in "time_left_ns" already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed a change which removes it. Do you know why it was originally treated differently than other metrics? I am hesitant only because of just how different it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

The comment says it is for compatibility to the apcupsd plugin.

@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding those fields @powersj!

@srebhan srebhan assigned powersj and unassigned srebhan Jan 30, 2023
@srebhan srebhan merged commit f82f2fd into influxdata:master Jan 31, 2023
powersj added a commit that referenced this pull request Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug 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.

UPSD: Some values are missing
2 participants