Skip to content

upsc: Correct two metric names in metadata.csv - #3139

Merged
iliakur merged 2 commits into
DataDog:masterfrom
pault-pg:upsc-metadata-metric-names
Sep 30, 2026
Merged

iliakur merged 2 commits into
DataDog:masterfrom
pault-pg:upsc-metadata-metric-names

Conversation

@pault-pg

Copy link
Copy Markdown
Contributor

What does this PR do?

Corrects two metric names in upsc/metadata.csv. The check reports upsc. followed by the NUT variable name, and the NUT variables are ups.status and ups.load, so the metrics are upsc.ups.status and upsc.ups.load. metadata.csv listed them as upsc.status and upsc.load.

Motivation

Those two metrics are emitted under different names than metadata.csv documents, so the units and descriptions there do not reach them.

Verified on a host running the integration:

datadog-agent check upsc | grep '"metric"' | sort -u

which lists upsc.ups.status and upsc.ups.load.

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests
  • Git history is clean
  • If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo
  • If this PR includes a log pipeline, please add a description describing the remappers and processors.

Additional Notes

Metadata only, with no change to the data the check reports, so there is no version bump or changelog entry, matching #2864. The no-changelog label is probably needed. No tests, since nothing executable changed.

LLM assistance was used to compare the emitted metric names against metadata.csv and to write this description.

@pault-pg
pault-pg requested review from a team and platinummonkey as code owners August 27, 2026 02:40
@pault-pg

Copy link
Copy Markdown
Contributor Author

The two failing checks are one cause, and it looks pre-existing rather than something this PR introduced.

test / check is the alls-green aggregate, so it fails because the other one did. The real failure is test-minimum-base-package, which installs the oldest base package this integration declares:

dependencies = ["datadog-checks-base>=4.2.0"]

That version cannot be imported on Python 3.13. Reproducible with nothing from this PR involved:

$ uv venv --python 3.13 /tmp/minbase
$ uv pip install --python /tmp/minbase/bin/python 'datadog-checks-base==4.2.0'
$ /tmp/minbase/bin/python -c "import datadog_checks.base"
ModuleNotFoundError: No module named 'checks'
...
ModuleNotFoundError: No module named 'six'

which is the same chain CI reports while collecting tests/test_upsc.py. The regular test job passes, only the minimum-version variant fails, and this PR only edits metadata.csv.

>=4.2.0 is declared by 17 integrations in this repository, against 26 on >=37.20.0, so upsc is not unusual here. The job only runs for an integration when that integration is touched, which is presumably why it does not come up more often.

I am happy to raise the floor for upsc in a separate PR if that would help, but which version to pick looks like a support-policy decision rather than simply the oldest one that imports, so I would rather you name it than guess.

LLM assistance was used to isolate the failing job and to write this comment.

@github-actions

Copy link
Copy Markdown

This pull request has not been updated for more than 21 days. If there are no updates to this PR within 7 days, it will be closed. If you'd like to re-open this PR after it's been closed, you can start from the latest master branch or pull the latest changes into your branch and create a new pull request.

@github-actions github-actions Bot added the stale label Sep 17, 2026
@github-actions

Copy link
Copy Markdown

This pull request was not updated after an additional 7 days of no activity. If you would like to continue work on this PR, please re-open this PR or create a fresh branch off of the latest master branch.

@github-actions github-actions Bot closed this Sep 24, 2026
@pault-pg

Copy link
Copy Markdown
Contributor Author

@platinummonkey @janine-c the stale bot closed this after you had both approved it, and GitHub doesn't let me reopen it. Please reopen and merge it. It's been a month and it's a trivial fix.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

Your PR has warnings. Please review the issues below.

🚦 2 Pipeline jobs failed

PR | test / check

View more details · View in GitHub Actions

PR | test / test-minimum-base-package (linux, ubuntu-22.04, upsc, UPSC (py3.13), py3.13) / minimum-base-package-UPSC (py3.13)-py3.13

View more details · View in GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5a54d46 | Docs | View more details | Give us feedback!

Comment thread upsc/metadata.csv
upsc.input.voltage.nominal,gauge,,volt,,UPS nominal input voltage,0,upsc,nominal input voltage,
upsc.output.voltage,gauge,,volt,,UPS output voltage,0,upsc,output voltage,
upsc.load,gauge,,percent,,UPS load,-1,upsc,load,
upsc.ups.load,gauge,,percent,,UPS load,-1,upsc,load,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This file still misses emitted metrics: the check reports every non-excluded numeric NUT variable, so devices produce gauges such as upsc.ups.temperature with no metadata row.

A device reporting ups.temperature: 30.0 produces the gauge upsc.ups.temperature with no unit or description — the same gap this PR fixes for the two renamed rows.

No change needed for this merge. Consider a follow-up adding rows for other emitted NUT variables (ups.temperature, ups.power).

iliakur commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

The failing test-minimum-base-package job is pre-existing: datadog test --compat installs datadog-checks-base==4.2.0 (upsc's declared floor) into a Python 3.13 environment, and that version cannot be imported on Python 3.13. No ddev version can fix it — the fix is raising the floor.

Follow-up PR with the bump (to >=37.20.0, matching 43 other integrations, verified to import on Python 3.13): #3194

@iliakur
iliakur added this pull request to the merge queue Sep 30, 2026
Merged via the queue into DataDog:master with commit 7608aa1 Sep 30, 2026
38 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants