Skip to content

prometheus-node-exporter-lua: add unbound stats collector#29091

Open
marinierb wants to merge 3 commits into
openwrt:masterfrom
marinierb:unbound-exporter
Open

prometheus-node-exporter-lua: add unbound stats collector#29091
marinierb wants to merge 3 commits into
openwrt:masterfrom
marinierb:unbound-exporter

Conversation

@marinierb
Copy link
Copy Markdown

📦 prometheus-node-exporter-lua

Maintainer: @champtar

Description: Add a collector for unbound statistics


Run Testing Details

  • OpenWrt Version: 25.12
  • OpenWrt Target/Subtarget: MediaTek ARM/Filogic 8x0 (MT798x)
  • OpenWrt Device: GL.iNet GL-MT6000

Signed-off-by: Bruno Marinier bmgm41@gmail.com

marinierb added 2 commits April 7, 2026 15:56
Signed-off-by: marinierb <notareal@email.address>
Signed-off-by: marinierb <bmgm41@gmail.com>
Signed-off-by: marinierb <notareal@email.address>
@marinierb
Copy link
Copy Markdown
Author

@champtar For your review. Thanks!

@marinierb marinierb changed the title Unbound exporter prometheus-node-exporter-lua: add unbound stats collector Apr 8, 2026
@champtar champtar self-assigned this May 24, 2026
@champtar
Copy link
Copy Markdown
Member

Previous PR: #28784

Copy link
Copy Markdown
Member

@champtar champtar left a comment

Choose a reason for hiding this comment

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

squash both commits please

Comment on lines +42 to +53
local chunks = {}
while true do
local chunk, err, partial = sock:receive(4096)
if partial and partial ~= "" then
chunks[#chunks + 1] = partial
end
if not chunk then break end
chunks[#chunks + 1] = chunk
end
sock:close()

local out = table.concat(chunks)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Have you tried sock:receive("*a") ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@champtar See new commit.

Signed-off-by: marinierb <notareal@email.address>
Copy link
Copy Markdown
Member

@champtar champtar left a comment

Choose a reason for hiding this comment

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

Getting really close, while you fix the review please rebase

define Package/prometheus-node-exporter-lua-unbound
$(call Package/prometheus-node-exporter-lua/Default)
TITLE+= (unbound stats collector)
DEPENDS:=prometheus-node-exporter-lua +unbound-control
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that we are using the unix socket we don't need unbound-control

Suggested change
DEPENDS:=prometheus-node-exporter-lua +unbound-control
DEPENDS:=prometheus-node-exporter-lua +unbound-daemon

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.

2 participants