fix: fix static check warning, add some fields schema
This commit is contained in:
parent
712cdb3152
commit
3fa8447c85
|
@ -257,7 +257,7 @@ init_sources(Sources) ->
|
||||||
true -> ?SLOG(info, #{msg => "disabled_sources_ignored", sources => Disabled});
|
true -> ?SLOG(info, #{msg => "disabled_sources_ignored", sources => Disabled});
|
||||||
false -> ok
|
false -> ok
|
||||||
end,
|
end,
|
||||||
lists:map(fun init_metrics/1, Sources),
|
ok = lists:foreach(fun init_metrics/1, Sources),
|
||||||
lists:map(fun init_source/1, Sources).
|
lists:map(fun init_source/1, Sources).
|
||||||
|
|
||||||
init_source(#{enable := false} = Source) ->
|
init_source(#{enable := false} = Source) ->
|
||||||
|
|
|
@ -167,7 +167,10 @@ fields("metrics") ->
|
||||||
{"matched", mk(integer(), #{desc => ?DESC("matched")})},
|
{"matched", mk(integer(), #{desc => ?DESC("matched")})},
|
||||||
{"allow", mk(integer(), #{desc => ?DESC("allow")})},
|
{"allow", mk(integer(), #{desc => ?DESC("allow")})},
|
||||||
{"deny", mk(integer(), #{desc => ?DESC("deny")})},
|
{"deny", mk(integer(), #{desc => ?DESC("deny")})},
|
||||||
{"ignore", mk(float(), #{desc => ?DESC("ignore")})}
|
{"ignore", mk(float(), #{desc => ?DESC("ignore")})},
|
||||||
|
{"rate", mk(float(), #{desc => ?DESC("rate")})},
|
||||||
|
{"rate_max", mk(float(), #{desc => ?DESC("rate_max")})},
|
||||||
|
{"rate_last5m", mk(float(), #{desc => ?DESC("rate_last5m")})}
|
||||||
];
|
];
|
||||||
fields("node_metrics") ->
|
fields("node_metrics") ->
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue