From 42effd16ee42ab57a24a2b0833c5de3cf0a7f931 Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Thu, 29 Aug 2024 10:52:55 +0200 Subject: [PATCH] reformat --- mqtt2prom/run | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mqtt2prom/run b/mqtt2prom/run index 4a3fcc7..da69d4e 100755 --- a/mqtt2prom/run +++ b/mqtt2prom/run @@ -275,7 +275,13 @@ function output(): void $prom .= $entry["name"] . $labels . " " . $entry["value"] . "\n"; } file_put_contents("/www/metrics/new.prom", $prom); - file_put_contents("/www/metrics/json", json_encode($json,JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES+JSON_UNESCAPED_UNICODE)); + file_put_contents( + "/www/metrics/json", + json_encode( + $json, + JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE + ) + ); rename("/www/metrics/new.prom", "/www/metrics/index.prom"); // return $prom; }