summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-09-11 11:06:25 +0300
committerGitHub <noreply@github.com>2023-09-11 11:06:25 +0300
commit1b1041a904ab0491ad18f19b69d078a64d635ade (patch)
treed4d53c227c3dc667dd3fb1d707561ceaf155c939
parent83c0463e50f8c8ac5d96256a1453dbc380e85118 (diff)
improved facets info (#15936)
-rw-r--r--collectors/systemd-journal.plugin/systemd-journal.c26
-rw-r--r--database/engine/cache.h4
2 files changed, 25 insertions, 5 deletions
diff --git a/collectors/systemd-journal.plugin/systemd-journal.c b/collectors/systemd-journal.plugin/systemd-journal.c
index bdaa660edf..1931998681 100644
--- a/collectors/systemd-journal.plugin/systemd-journal.c
+++ b/collectors/systemd-journal.plugin/systemd-journal.c
@@ -525,9 +525,29 @@ static void function_systemd_journal(const char *transaction, char *function, ch
if(info) {
facets_accepted_parameters_to_json_array(facets, wb, false);
- buffer_json_member_add_array(wb, "sources");
- buffer_json_add_array_item_string(wb, "default");
- buffer_json_array_close(wb); // sources
+ buffer_json_member_add_array(wb, "required_params");
+ {
+ buffer_json_add_array_item_object(wb);
+ {
+ buffer_json_member_add_string(wb, "id", "source");
+ buffer_json_member_add_string(wb, "name", "source");
+ buffer_json_member_add_string(wb, "help", "Select the SystemD Journal source to query");
+ buffer_json_member_add_string(wb, "type", "select");
+ buffer_json_member_add_array(wb, "options");
+ {
+ buffer_json_add_array_item_object(wb);
+ {
+ buffer_json_member_add_string(wb, "id", "default");
+ buffer_json_member_add_string(wb, "name", "default");
+ }
+ buffer_json_object_close(wb); // options object
+ }
+ buffer_json_array_close(wb); // options array
+ }
+ buffer_json_object_close(wb); // required params object
+ }
+ buffer_json_array_close(wb); // required_params array
+
buffer_json_member_add_uint64(wb, "status", HTTP_RESP_OK);
buffer_json_member_add_string(wb, "type", "table");
buffer_json_member_add_string(wb, "help", SYSTEMD_JOURNAL_FUNCTION_DESCRIPTION);
diff --git a/database/engine/cache.h b/database/engine/cache.h
index 1486fdc166..c10e099288 100644
--- a/database/engine/cache.h
+++ b/database/engine/cache.h
@@ -71,8 +71,8 @@ struct pgc_statistics {
PGC_CACHE_LINE_PADDING(3);
- size_t entries; // all the entries (includes clean, dirty, host)
- size_t size; // all the entries (includes clean, dirty, host)
+ size_t entries; // all the entries (includes clean, dirty, hot)
+ size_t size; // all the entries (includes clean, dirty, hot)
size_t evicting_entries;
size_t evicting_size;