-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[collectd 6] lua: migrate the Lua plugin to v6.0 #3795
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
Conversation
82ca95e
to
aada662
Compare
Rebased with recent collectd-6.0 branch: Verified with:
Use conf and sample lua:
Use test-v6.lua something like:
/tmp/local/sbin/collectd -f -C test-v6.conf should work without error. |
@octo could you afford to review this PR? |
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.
Overall this looks great, thanks @kenhys!
My biggest concern is that label sets and meta data is mapped to a list of one-element maps, rather than just a map; see discussion inline.
Best regards and a happy new year 🎆
—octo
6556fdc
to
2127b7c
Compare
13da451
to
ebb8cad
Compare
Some test code for this functionality would also be nice, but that could be a separate PR. |
+1, tests would be nice to have, but I won't block on them. I do think that we need to update the documentation a bit though. Could you document the updated behavior in Thanks for your continued work and best regards |
Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
Since v6, value_list_t is deprecated and metric_family_t is introduced. metric_family_t is mapped to the following Lua table: { name => ..., help => ..., unit => ..., type => ..., resource => { key1 => value1, ..., keyN => valueN } metric => { [1] => { label => { key1 => value1, ..., keyN => valueN } value => ..., time => ..., interval => ..., meta => { key1 => value1, ..., keyN => valueN } }, ... [N] => { ... } } Closes: collectd#3654 Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
It describes changes about internal data type. Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
I've added explanation about data types and rebased with collectd-6.0. |
Except "Labels", CI has passed. |
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 greak, thanks @kenhys!
ChangeLog: lua: migrate the Lua plugin to v6.0
Since v6, value_list_t is deprecated and metric_family_t is introduced.
metric_family_t is mapped to the following Lua table:
Closes: #3654