report: don't claim no reporting sockets were found, when it's no metrics that were found

Let's add a proper message about missing sources, and call them
"sources", i.e. take a more high-level view on things.
This commit is contained in:
Lennart Poettering
2026-02-07 23:28:51 +01:00
parent 1b9506601f
commit a7aebb2250
+4 -2
View 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");