diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-09-11 11:06:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 11:06:25 +0300 |
commit | 1b1041a904ab0491ad18f19b69d078a64d635ade (patch) | |
tree | d4d53c227c3dc667dd3fb1d707561ceaf155c939 /collectors/systemd-journal.plugin | |
parent | 83c0463e50f8c8ac5d96256a1453dbc380e85118 (diff) |
improved facets info (#15936)
Diffstat (limited to 'collectors/systemd-journal.plugin')
-rw-r--r-- | collectors/systemd-journal.plugin/systemd-journal.c | 26 |
1 files changed, 23 insertions, 3 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); |