diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-19 12:33:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-19 12:33:27 +0000 |
commit | 841395dd16f470e3c051a0a4fff5b91efc983c30 (patch) | |
tree | 4115f6eedcddda75067130b80acaff9e51612f49 /web/api | |
parent | Adding upstream version 1.30.1. (diff) | |
download | netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip |
Adding upstream version 1.31.0.upstream/1.31.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api')
-rw-r--r-- | web/api/badges/web_buffer_svg.c | 2 | ||||
-rw-r--r-- | web/api/exporters/shell/allmetrics_shell.c | 2 | ||||
-rw-r--r-- | web/api/health/health_cmdapi.c | 2 | ||||
-rw-r--r-- | web/api/netdata-swagger.json | 20 | ||||
-rw-r--r-- | web/api/netdata-swagger.yaml | 20 | ||||
-rw-r--r-- | web/api/queries/query.c | 34 | ||||
-rw-r--r-- | web/api/queries/rrdr.h | 2 | ||||
-rw-r--r-- | web/api/tests/web_api.c | 2 | ||||
-rw-r--r-- | web/api/web_api_v1.c | 77 |
9 files changed, 118 insertions, 43 deletions
diff --git a/web/api/badges/web_buffer_svg.c b/web/api/badges/web_buffer_svg.c index b5a1e03d..f8c0a17a 100644 --- a/web/api/badges/web_buffer_svg.c +++ b/web/api/badges/web_buffer_svg.c @@ -716,7 +716,7 @@ static int html_color_check(const char *str) { // or whatever is given as def (without checking - caller responsible to give sensible // safely escaped default) as default if it fails // in any case this function must always return something we can put directly in XML -// so no escaping is necessary anymore (with excpetion of default where caller is responsible) +// so no escaping is necessary anymore (with exception of default where caller is responsible) // to give sensible default #define BADGE_SVG_COLOR_ARG_MAXLEN 20 diff --git a/web/api/exporters/shell/allmetrics_shell.c b/web/api/exporters/shell/allmetrics_shell.c index daa00499..0b0ce229 100644 --- a/web/api/exporters/shell/allmetrics_shell.c +++ b/web/api/exporters/shell/allmetrics_shell.c @@ -23,6 +23,7 @@ static inline size_t shell_name_copy(char *d, const char *s, size_t usable) { #define SHELL_ELEMENT_MAX 100 void rrd_stats_api_v1_charts_allmetrics_shell(RRDHOST *host, BUFFER *wb) { + analytics_log_shell(); rrdhost_rdlock(host); // for each chart @@ -92,6 +93,7 @@ void rrd_stats_api_v1_charts_allmetrics_shell(RRDHOST *host, BUFFER *wb) { // ---------------------------------------------------------------------------- void rrd_stats_api_v1_charts_allmetrics_json(RRDHOST *host, BUFFER *wb) { + analytics_log_json(); rrdhost_rdlock(host); buffer_strcat(wb, "{"); diff --git a/web/api/health/health_cmdapi.c b/web/api/health/health_cmdapi.c index 4dd85e6b..c5fb7119 100644 --- a/web/api/health/health_cmdapi.c +++ b/web/api/health/health_cmdapi.c @@ -86,7 +86,7 @@ void health_silencers2json(BUFFER *wb) { /** * Silencer to FILE * - * Write the sliencer buffer to a file. + * Write the silencer buffer to a file. * @param wb */ void health_silencers2file(BUFFER *wb) { diff --git a/web/api/netdata-swagger.json b/web/api/netdata-swagger.json index ed2555f8..2beaee92 100644 --- a/web/api/netdata-swagger.json +++ b/web/api/netdata-swagger.json @@ -202,7 +202,7 @@ { "name": "group", "in": "query", - "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).", + "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).", "required": true, "allowEmptyValue": false, "schema": { @@ -416,7 +416,7 @@ { "name": "group", "in": "query", - "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).", + "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).", "required": true, "allowEmptyValue": false, "schema": { @@ -514,7 +514,7 @@ { "name": "value_color", "in": "query", - "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are suported as values.", + "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are supported as values.", "required": false, "allowEmptyValue": true, "schema": { @@ -525,7 +525,7 @@ { "name": "text_color_lbl", "in": "query", - "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.", + "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.", "required": false, "allowEmptyValue": true, "schema": { @@ -556,7 +556,7 @@ { "name": "text_color_val", "in": "query", - "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.", + "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.", "required": false, "allowEmptyValue": true, "schema": { @@ -998,7 +998,7 @@ "/manage/health": { "get": { "summary": "Accesses the health management API to control health checks and notifications at runtime.", - "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenaria, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.", + "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenarios, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.", "parameters": [ { "name": "cmd", @@ -1504,7 +1504,7 @@ }, "update_every": { "type": "number", - "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (indepedently of the current view)." + "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (independently of the current view)." }, "view_update_every": { "type": "number", @@ -1512,11 +1512,11 @@ }, "first_entry": { "type": "number", - "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view)." + "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (independently of the current view)." }, "last_entry": { "type": "number", - "description": "The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view)." + "description": "The UNIX timestamp of the latest entry in the round robin database (independently of the current view)." }, "after": { "type": "number", @@ -1549,7 +1549,7 @@ } }, "latest_values": { - "description": "The latest values collected for the chart (indepedently of the current view).", + "description": "The latest values collected for the chart (independently of the current view).", "type": "array", "items": { "type": "string" diff --git a/web/api/netdata-swagger.yaml b/web/api/netdata-swagger.yaml index 74827421..ebade799 100644 --- a/web/api/netdata-swagger.yaml +++ b/web/api/netdata-swagger.yaml @@ -176,7 +176,7 @@ paths: of grouping. methods supported "min", "max", "average", "sum", "incremental-sum". "max" is actually calculated on the absolute value collected (so it works for both positive and negative - dimesions to return the most extreme value in either direction). + dimensions to return the most extreme value in either direction). required: true allowEmptyValue: false schema: @@ -367,7 +367,7 @@ paths: of grouping. methods are supported "min", "max", "average", "sum", "incremental-sum". "max" is actually calculated on the absolute value collected (so it works for both positive and negative - dimesions to return the most extreme value in either direction). + dimensions to return the most extreme value in either direction). required: true allowEmptyValue: false schema: @@ -444,7 +444,7 @@ paths: multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. - Currently only integers are suported as values." + Currently only integers are supported as values." required: false allowEmptyValue: true schema: @@ -452,7 +452,7 @@ paths: format: any text - name: text_color_lbl in: query - description: Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used. + description: Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used. required: false allowEmptyValue: true schema: @@ -474,7 +474,7 @@ paths: format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - name: text_color_val in: query - description: Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used. + description: Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used. required: false allowEmptyValue: true schema: @@ -812,7 +812,7 @@ paths: you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence - all scenaria, only the cmd parameter is required. The other parameters + all scenarios, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation. parameters: @@ -1215,7 +1215,7 @@ components: update_every: type: number description: The update frequency of this chart, in seconds. One value every this - amount of time is kept in the round robin database (indepedently of + amount of time is kept in the round robin database (independently of the current view). view_update_every: type: number @@ -1225,11 +1225,11 @@ components: first_entry: type: number description: The UNIX timestamp of the first entry (the oldest) in the round - robin database (indepedently of the current view). + robin database (independently of the current view). last_entry: type: number description: The UNIX timestamp of the latest entry in the round robin database - (indepedently of the current view). + (independently of the current view). after: type: number description: The UNIX timestamp of the first entry (the oldest) returned in this @@ -1256,7 +1256,7 @@ components: items: type: string latest_values: - description: The latest values collected for the chart (indepedently of the + description: The latest values collected for the chart (independently of the current view). type: array items: diff --git a/web/api/queries/query.c b/web/api/queries/query.c index 2a27a94f..56e2e285 100644 --- a/web/api/queries/query.c +++ b/web/api/queries/query.c @@ -669,7 +669,7 @@ static inline void do_dimension_fixedstep( // fill RRDR for the whole chart #ifdef NETDATA_INTERNAL_CHECKS -static void rrd2rrdr_log_request_response_metdata(RRDR *r +static void rrd2rrdr_log_request_response_metadata(RRDR *r , RRDR_GROUPING group_method , int aligned , long group @@ -902,7 +902,7 @@ static RRDR *rrd2rrdr_fixedstep( // align the requested timeframe to fit it. if(aligned) { - // alignement has been requested, so align the values + // alignment has been requested, so align the values before_requested -= before_requested % (group * update_every); after_requested -= after_requested % (group * update_every); } @@ -1143,27 +1143,27 @@ static RRDR *rrd2rrdr_fixedstep( #ifdef NETDATA_INTERNAL_CHECKS if (dimensions_used) { if(r->internal.log) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log); if(r->rows != points_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'"); if(aligned && (r->before % group) != 0) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required"); // 'after' should not be aligned, since we start inside the first group //if(aligned && (r->after % group) != 0) - // rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required"); + // rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required"); if(r->before != before_requested) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'"); if(r->before != before_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'"); // reported 'after' varies, depending on group if(r->after != after_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'"); } #endif @@ -1276,7 +1276,7 @@ static RRDR *rrd2rrdr_variablestep( // align the requested timeframe to fit it. if(aligned) { - // alignement has been requested, so align the values + // alignment has been requested, so align the values before_requested -= before_requested % (group * update_every); after_requested -= after_requested % (group * update_every); } @@ -1520,27 +1520,27 @@ static RRDR *rrd2rrdr_variablestep( if (dimensions_used) { if(r->internal.log) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log); if(r->rows != points_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'"); if(aligned && (r->before % group) != 0) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required"); // 'after' should not be aligned, since we start inside the first group //if(aligned && (r->after % group) != 0) - // rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required"); + // rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required"); if(r->before != before_requested) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'"); if(r->before != before_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'"); // reported 'after' varies, depending on group if(r->after != after_wanted) - rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'"); + rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'"); } #endif diff --git a/web/api/queries/rrdr.h b/web/api/queries/rrdr.h index d95c1085..b302f8bd 100644 --- a/web/api/queries/rrdr.h +++ b/web/api/queries/rrdr.h @@ -22,7 +22,7 @@ typedef enum rrdr_options { RRDR_OPTION_DISPLAY_ABS = 0x00002000, // for badges, display the absolute value, but calculate colors with sign RRDR_OPTION_MATCH_IDS = 0x00004000, // when filtering dimensions, match only IDs RRDR_OPTION_MATCH_NAMES = 0x00008000, // when filtering dimensions, match only names - RRDR_OPTION_CUSTOM_VARS = 0x00010000, // when wraping response in a JSON, return custom variables in response + RRDR_OPTION_CUSTOM_VARS = 0x00010000, // when wrapping response in a JSON, return custom variables in response RRDR_OPTION_ALLOW_PAST = 0x00020000, // The after parameter can extend in the past before the first entry } RRDR_OPTIONS; diff --git a/web/api/tests/web_api.c b/web/api/tests/web_api.c index 3cc0a790..0a741e08 100644 --- a/web/api/tests/web_api.c +++ b/web/api/tests/web_api.c @@ -263,7 +263,7 @@ static void destroy_web_client(struct web_client *w) // ---------------------------------- Parameterized test-families ----------------------------------------------------- // There is no way to pass a parameter block into the setup fixture, we would have to patch CMocka and maintain it // locally. (The void **current_state in _run_group_tests would be set from a parameter). This is unfortunate as a -// parameteric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the +// parametric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the // space of tests in the launcher, passing an array of identical unit-tests to CMocka and then counting through the // parameters in the shared state passed between tests. To initialise this counter structure we use this global to // pass from the launcher (test-builder) to the setup-fixture. diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 1d8217bb..96fcf485 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -750,6 +750,7 @@ inline int web_client_api_request_v1_registry(RRDHOST *host, struct web_client * if(unlikely(action == 'H')) { // HELLO request, dashboard ACL + analytics_log_dashboard(); if(unlikely(!web_client_can_access_dashboard(w))) return web_client_permission_denied(w); } @@ -995,10 +996,82 @@ inline int web_client_api_request_v1_info_fill_buffer(RRDHOST *host, BUFFER *wb) } #ifdef ENABLE_ACLK if (aclk_connected) - buffer_strcat(wb, "\t\"aclk-available\": true\n"); + buffer_strcat(wb, "\t\"aclk-available\": true,\n"); else #endif - buffer_strcat(wb, "\t\"aclk-available\": false\n"); // Intentionally valid with/without #ifdef above + buffer_strcat(wb, "\t\"aclk-available\": false,\n"); // Intentionally valid with/without #ifdef above + + buffer_strcat(wb, "\t\"memory-mode\": "); + analytics_get_data(analytics_data.netdata_config_memory_mode, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"multidb-disk-quota\": "); + analytics_get_data(analytics_data.netdata_config_multidb_disk_quota, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"page-cache-size\": "); + analytics_get_data(analytics_data.netdata_config_page_cache_size, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"stream-enabled\": "); + analytics_get_data(analytics_data.netdata_config_stream_enabled, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"hosts-available\": "); + analytics_get_data(analytics_data.netdata_config_hosts_available, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"https-enabled\": "); + analytics_get_data(analytics_data.netdata_config_https_enabled, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"buildinfo\": "); + analytics_get_data(analytics_data.netdata_buildinfo, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"release-channel\": "); + analytics_get_data(analytics_data.netdata_config_release_channel, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"web-enabled\": "); + analytics_get_data(analytics_data.netdata_config_web_enabled, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"notification-methods\": "); + analytics_get_data(analytics_data.netdata_notification_methods, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"exporting-enabled\": "); + analytics_get_data(analytics_data.netdata_config_exporting_enabled, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"exporting-connectors\": "); + analytics_get_data(analytics_data.netdata_exporting_connectors, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"allmetrics-prometheus-used\": "); + analytics_get_data(analytics_data.netdata_allmetrics_prometheus_used, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"allmetrics-shell-used\": "); + analytics_get_data(analytics_data.netdata_allmetrics_shell_used, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"allmetrics-json-used\": "); + analytics_get_data(analytics_data.netdata_allmetrics_json_used, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"dashboard-used\": "); + analytics_get_data(analytics_data.netdata_dashboard_used, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"charts-count\": "); + analytics_get_data(analytics_data.netdata_charts_count, wb); + buffer_strcat(wb, ",\n"); + + buffer_strcat(wb, "\t\"metrics-count\": "); + analytics_get_data(analytics_data.netdata_metrics_count, wb); + buffer_strcat(wb, "\n"); buffer_strcat(wb, "}"); return 0; |