- Handle bool values correctly. We get the values as bool, but collectd
requires a bool value to be numeric in the range [0, 1].
- Remove profile and mode values. Those are strings, which cannot be
represented by collectd.
- Update collectd type for some values.
- Fix latn value being present twice.
Signed-off-by: Dominik Riebeling <bluebrother@posteo.de>
type = "bitrate"
},
{
- name = "latn",
+ name = "interleave_delay",
type = "latency"
}
}
local errors = {
{
name = "uas",
- type = "gauge"
+ type = "count"
},
{
name = "rx_corrupted",
- type = "gauge"
+ type = "errors"
},
{
name = "rx_retransmitted",
- type = "gauge"
+ type = "errors"
},
{
name = "tx_retransmitted",
- type = "gauge"
+ type = "errors"
}
}
}
local general_vars = {
- {
- name = "profile",
- type = "gauge"
- },
- {
- name = "mode",
- type = "gauge"
- },
{
name = "state_num",
type = "gauge"
if metrics and metrics[name] ~= nil then
local value = metrics[name]
local metric = build_metric(name, direction)
+ if information["type"] == "bool" then
+ if metrics[name] == true then
+ value = 1
+ else
+ value = 0
+ end
+ end
local t = {
host = host,