-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
@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
done! |
There was a problem hiding this 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...
plugins/inputs/upsd/upsd.go
Outdated
} | ||
|
||
floatValues := map[string]string{ | ||
"battery_charge_percent": "battery.charge", | ||
"battery_runtime": "battery.runtime", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this 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!
(cherry picked from commit f82f2fd)
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