]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
report: don't claim no reporting sockets were found, when it's no metrics that were...
authorLennart Poettering <lennart@amutable.com>
Sat, 7 Feb 2026 22:12:30 +0000 (23:12 +0100)
committerLennart Poettering <lennart@amutable.com>
Sat, 7 Feb 2026 22:28:51 +0000 (23:28 +0100)
Let's add a proper message about missing sources, and call them
"sources", i.e. take a more high-level view on things.

src/report/report.c

index f62daa35b72eebbf9ab45cc6e6a04906689f051a..986ab18bf490efede016136febcbc343e0c24f06 100644 (file)
@@ -164,7 +164,7 @@ static int metrics_output_sorted(Context *context) {
         }
 
         if (context->n_metrics == 0)
-                log_info("No reporting sockets found.");
+                log_info("No metrics collected.");
 
         return 0;
 }
@@ -213,7 +213,9 @@ static int metrics_query(void) {
                 }
         }
 
-        if (!set_isempty(context.links)) {
+        if (set_isempty(context.links))
+                log_info("No metrics sources found.");
+        else {
                 r = sd_event_loop(context.event);
                 if (r < 0)
                         return log_error_errno(r, "Failed to run event loop: %m");