summaryrefslogtreecommitdiffstats
path: root/web/api/health
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:49:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-20 04:49:55 +0000
commitab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch)
tree7a900833aad3ccc685712c6c2a7d87576d54f427 /web/api/health
parentAdding upstream version 1.40.1. (diff)
downloadnetdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.tar.xz
netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.zip
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/health')
-rw-r--r--web/api/health/README.md4
-rw-r--r--web/api/health/health_cmdapi.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/web/api/health/README.md b/web/api/health/README.md
index dd46854a1..f820263b1 100644
--- a/web/api/health/README.md
+++ b/web/api/health/README.md
@@ -28,12 +28,12 @@ This API call will return the alarms currently in WARNING or CRITICAL state.
### Event Log
-The size of the alarm log is configured in `netdata.conf`. There are 2 settings: the rotation of the alarm log file and the in memory size of the alarm log.
+The size of the alarm log is configured in `netdata.conf`. There are 2 settings: the event history kept in the DB (in seconds), and the in memory size of the alarm log.
```
[health]
in memory max health log entries = 1000
- rotate log every lines = 2000
+ health log history = 432000
```
The API call retrieves all entries of the alarm log:
diff --git a/web/api/health/health_cmdapi.c b/web/api/health/health_cmdapi.c
index 7c4869bd3..e8d6845e3 100644
--- a/web/api/health/health_cmdapi.c
+++ b/web/api/health/health_cmdapi.c
@@ -14,7 +14,7 @@
void free_silencers(SILENCER *t) {
if (!t) return;
if (t->next) free_silencers(t->next);
- debug(D_HEALTH, "HEALTH command API: Freeing silencer %s:%s:%s:%s:%s", t->alarms,
+ netdata_log_debug(D_HEALTH, "HEALTH command API: Freeing silencer %s:%s:%s:%s:%s", t->alarms,
t->charts, t->contexts, t->hosts, t->families);
simple_pattern_free(t->alarms_pattern);
simple_pattern_free(t->charts_pattern);
@@ -96,12 +96,12 @@ void health_silencers2file(BUFFER *wb) {
if(fd) {
size_t written = (size_t)fprintf(fd, "%s", wb->buffer) ;
if (written == wb->len ) {
- info("Silencer changes written to %s", silencers_filename);
+ netdata_log_info("Silencer changes written to %s", silencers_filename);
}
fclose(fd);
return;
}
- error("Silencer changes could not be written to %s. Error %s", silencers_filename, strerror(errno));
+ netdata_log_error("Silencer changes could not be written to %s. Error %s", silencers_filename, strerror(errno));
}
/**
@@ -133,7 +133,7 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
buffer_strcat(wb, HEALTH_CMDAPI_MSG_AUTHERROR);
ret = HTTP_RESP_FORBIDDEN;
} else {
- debug(D_HEALTH, "HEALTH command API: Comparing secret '%s' to '%s'", w->auth_bearer_token, api_secret);
+ netdata_log_debug(D_HEALTH, "HEALTH command API: Comparing secret '%s' to '%s'", w->auth_bearer_token, api_secret);
if (strcmp(w->auth_bearer_token, api_secret)) {
buffer_strcat(wb, HEALTH_CMDAPI_MSG_AUTHERROR);
ret = HTTP_RESP_FORBIDDEN;
@@ -146,7 +146,7 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
if (!key || !*key) continue;
if (!value || !*value) continue;
- debug(D_WEB_CLIENT, "%llu: API v1 health query param '%s' with value '%s'", w->id, key, value);
+ netdata_log_debug(D_WEB_CLIENT, "%llu: API v1 health query param '%s' with value '%s'", w->id, key, value);
// name and value are now the parameters
if (!strcmp(key, "cmd")) {