Manish Purohit
Manish Purohit

Reputation: 11

Is there a way to multiple metrics sort in victoriaMetrics

This is the payload I am sending to api endpoints, victoriametrics does not provide sorting based on metric values(like sql database sort by function). I there some method/feature of victoriametrics/promql to apply sorting? .
{ "entity_type":"office", "sort_member_attribute":"cpu_usage_ppm", "group_member_attributes": [ { "attribute": "cpu_usage_ppm" }, { "attribute": "io_ppm" }, { "attribute":"storage_ppm" } ] }

Upvotes: 0

Views: 841

Answers (1)

hagen1778
hagen1778

Reputation: 829

Sorting by value is supported by functions sort and sort_desc. And sorting by labels value is supported by functions sort_by_label and sort_by_label_desc.

Upvotes: 2

Related Questions