diff --git a/mqtt2prom/run b/mqtt2prom/run index 797d89c..4a3fcc7 100755 --- a/mqtt2prom/run +++ b/mqtt2prom/run @@ -252,6 +252,7 @@ function output(): void foreach ($filteredData as $entry) { $labels = []; if (isset($entry["labels"])) { + ksort($entry["labels"]); foreach ($entry["labels"] as $labelName => $labelValue) { $labels[] = "$labelName=" .