Skip to content

prometheus-node-exporter-lua: add dhcp-leases exporter#30006

Open
stephenfin wants to merge 1 commit into
openwrt:masterfrom
stephenfin:prometheus-node-exporter-lua-dhcp-leases
Open

prometheus-node-exporter-lua: add dhcp-leases exporter#30006
stephenfin wants to merge 1 commit into
openwrt:masterfrom
stephenfin:prometheus-node-exporter-lua-dhcp-leases

Conversation

@stephenfin

Copy link
Copy Markdown

Add a new collector to expose DHCP leases. It optionally depends on
ufp-neigh to expose device type.

Signed-off-by: Stephen Finucane stephen@that.guru

📦 Package Details

Maintainer: @champtar
(You can find this by checking the history of the package Makefile.)

Description:
Add new collector for the DHCP leases. This is useful for a system status dashboard.


🧪 Run Testing Details

  • OpenWrt Version: 25.12.5
  • OpenWrt Target/Subtarget: x86_64
  • OpenWrt Device: Generic N100 mini PC/switch

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@stephenfin
stephenfin force-pushed the prometheus-node-exporter-lua-dhcp-leases branch from ced76f0 to e4bf805 Compare July 15, 2026 23:47
@stephenfin

Copy link
Copy Markdown
Author

I think there's a bug in the bot: things look pretty consistent?

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commit checks

  • prometheus-node-exporter-lua: add dhcp-leases exporter — the commit message/PR body say the collector "expose[s] device type", but the code actually emits a vendor label populated from ufp's fingerprint ubus object (with ufp-neigh providing the OUI/vendor database). Consider aligning the wording with the vendor label the collector actually produces.

The exporter itself looks correct: it degrades gracefully when ubus/ufp is unavailable (conn and get_vendor(...) or "", pcall around the ubus call), closes both the file and ubus connection, and upper-cases the MAC consistently with the existing uci_dhcp_host collector.


Generated by Claude Code

Comment thread utils/prometheus-node-exporter-lua/Makefile Outdated
@BKPepe

BKPepe commented Jul 16, 2026

Copy link
Copy Markdown
Member

I think there's a bug in the bot: things look pretty consistent?

Bot says:
➡️ Something broken? Consider reporting an issue.

Add a new collector to expose DHCP leases. It optionally depends on
ufp-neigh to emit a 'vendor' label. This is populated from ufp's
fingerprint ubus object, with ufp-neigh providing the OUI/vendor
database.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin
stephenfin force-pushed the prometheus-node-exporter-lua-dhcp-leases branch from 2b12392 to e7a2e91 Compare July 16, 2026 14:39

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit; no new issues found.

The dropped +libubus-lua dependency is safe: the base prometheus-node-exporter-lua package already lists it in DEPENDS, so it is still pulled in transitively (same pattern as the dawn collector). The amended commit message now correctly describes the vendor label, resolving the earlier commit-check note.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants