docs: prometheus api `mode` field description

This commit is contained in:
JimMoen 2024-01-21 22:46:27 +08:00
parent 2263df0242
commit 2061d75b50
No known key found for this signature in database
1 changed files with 16 additions and 1 deletions

View File

@ -126,6 +126,7 @@ security() ->
false -> []
end.
%% erlfmt-ignore
fields(mode) ->
[
{mode,
@ -133,7 +134,21 @@ fields(mode) ->
hoconsc:enum(?PROM_DATA_MODES),
#{
default => node,
desc => <<"Metrics format mode.">>,
desc => <<"
Metrics format mode.
`node`:
Return metrics from local node. And it is the default behaviour if `mode` not specified.
`all_nodes_aggregated`:
Return metrics for all nodes.
And if possible, calculate the arithmetic sum or logical sum of the indicators of all nodes.
`all_nodes_unaggregated`:
Return metrics from all nodes, and the metrics are not aggregated.
The node name will be included in the returned results to
indicate that certain metrics were returned on a certain node.
">>,
in => query,
required => false,
example => node