From: Kentaro Hayashi Date: Sat, 13 Jan 2024 07:32:50 +0000 (+0900) Subject: lua: update data types section X-Git-Tag: 6.0.0-rc0~14^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67c3aa5e681297ed555b73a182c455bd90ec5110;p=thirdparty%2Fcollectd.git lua: update data types section It describes changes about internal data type. Signed-off-by: Kentaro Hayashi --- diff --git a/src/collectd-lua.pod b/src/collectd-lua.pod index eccd71fb1..1a52a1b96 100644 --- a/src/collectd-lua.pod +++ b/src/collectd-lua.pod @@ -82,6 +82,78 @@ once for every value that was dispatched by any plugin. =back +=head1 DATA TYPES + + +=head2 Metrics data + +Since B version 6, type of I was deprecated +and changed to I. + +This means that the argument of B was also changed. + +Here is the mapping from I to 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] => { + ... + } + } + } + +Note that internal data type are also mapped to each Lua tables. + +=over 4 + +=item I + +It is mapped from I. +The key of I is unique. +It contains such as "host.id", "host.name", "service.name" and so on as a key. + +=item I + +It is mapped from I. It is array of I. +The content of metric depends on producer plugin. + +=item I