Merge pull request #18778 from bluebrother/collectd-dsl-fixes
collectd: Fix various issues with lantiq dsl metrics.
This commit is contained in:
commit
3617cb311a
|
@ -44,7 +44,7 @@ local line_vars = {
|
||||||
type = "bitrate"
|
type = "bitrate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "latn",
|
name = "interleave_delay",
|
||||||
type = "latency"
|
type = "latency"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,19 +52,19 @@ local line_vars = {
|
||||||
local errors = {
|
local errors = {
|
||||||
{
|
{
|
||||||
name = "uas",
|
name = "uas",
|
||||||
type = "gauge"
|
type = "count"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "rx_corrupted",
|
name = "rx_corrupted",
|
||||||
type = "gauge"
|
type = "errors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "rx_retransmitted",
|
name = "rx_retransmitted",
|
||||||
type = "gauge"
|
type = "errors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "tx_retransmitted",
|
name = "tx_retransmitted",
|
||||||
type = "gauge"
|
type = "errors"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,14 +80,6 @@ local erb_vars = {
|
||||||
}
|
}
|
||||||
|
|
||||||
local general_vars = {
|
local general_vars = {
|
||||||
{
|
|
||||||
name = "profile",
|
|
||||||
type = "gauge"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "mode",
|
|
||||||
type = "gauge"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "state_num",
|
name = "state_num",
|
||||||
type = "gauge"
|
type = "gauge"
|
||||||
|
@ -117,6 +109,13 @@ local function get_values(hostname, variables, metrics, direction)
|
||||||
if metrics and metrics[name] ~= nil then
|
if metrics and metrics[name] ~= nil then
|
||||||
local value = metrics[name]
|
local value = metrics[name]
|
||||||
local metric = build_metric(name, direction)
|
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 = {
|
local t = {
|
||||||
host = host,
|
host = host,
|
||||||
|
|
Loading…
Reference in New Issue