diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-02-07 20:14:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 12:14:47 -0800 |
commit | ee55155912c17139a3a0ab2815f15651e63e5a9c (patch) | |
tree | 3cbaf6c35e0ac9dba8023a9db9b2979c266992d5 /web/api | |
parent | 57055c9ac18e70a812aec4230219e928405cbb26 (diff) |
Update `api/v1/info ` (#7862)
* update_info: New variables
This commit creates inside script and it reads them to Netdata
* update_info: API
This commit changes the web api response
* update_info: Disk space
This commit brings the disk space to info and renames the environment variables inside Netdata
* update_info: Rename variable
This commit renames the environment variable
* update_info: Rename response variable
This commit renames a response variable
* update_info: Labels
This commit creates the missing labels
* update_info: test before free
* update_info: Doc function
This commit brings docummentation to the functions to give instructions to developer
* update_info: Fix info message
This commit removes some info messages from the error.log
* update_info: Remove unecessary ifs, considering free manual
Diffstat (limited to 'web/api')
-rw-r--r-- | web/api/web_api_v1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 70bea8d667..899b604348 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -827,6 +827,10 @@ inline int web_client_api_request_v1_info_fill_buffer(RRDHOST *host, BUFFER *wb) buffer_sprintf(wb, "\t\"os_version\": \"%s\",\n", (host->system_info->host_os_version) ? host->system_info->host_os_version : ""); buffer_sprintf(wb, "\t\"os_version_id\": \"%s\",\n", (host->system_info->host_os_version_id) ? host->system_info->host_os_version_id : ""); buffer_sprintf(wb, "\t\"os_detection\": \"%s\",\n", (host->system_info->host_os_detection) ? host->system_info->host_os_detection : ""); + buffer_sprintf(wb, "\t\"cores_total\": \"%s\",\n", (host->system_info->host_cores) ? host->system_info->host_cores : ""); + buffer_sprintf(wb, "\t\"total_disk_space\": \"%s\",\n", (host->system_info->host_disk_space) ? host->system_info->host_disk_space : ""); + buffer_sprintf(wb, "\t\"cpu_freq\": \"%s\",\n", (host->system_info->host_cpu_freq) ? host->system_info->host_cpu_freq : ""); + buffer_sprintf(wb, "\t\"ram_total\": \"%s\",\n", (host->system_info->host_ram_total) ? host->system_info->host_ram_total : ""); if (host->system_info->container_os_name) buffer_sprintf(wb, "\t\"container_os_name\": \"%s\",\n", host->system_info->container_os_name); |