0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-26 05:47:20 +00:00

improved facets info ()

This commit is contained in:
Costa Tsaousis 2023-09-11 11:06:25 +03:00 committed by GitHub
parent 83c0463e50
commit 1b1041a904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 5 deletions
collectors/systemd-journal.plugin
database/engine

View file

@ -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);

View file

@ -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;