summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2018-10-23 00:38:04 +0300
committerGitHub <noreply@github.com>2018-10-23 00:38:04 +0300
commit09e89e937af3bcc5948b92c722c8da93970bd987 (patch)
tree59045c88e9d636e3ffcebca4af8b3183b1d86f97 /health
parentc09afb49a964e58620e08961869a0cfbea72691c (diff)
modularize the query api (#4443)
* modularized exporters * modularized API data queries * optimized queries * modularized API data reduction methods * modularized api queries * added new directories in makefiles * added median db query * moved all RRDR_GROUPING related to query.h * added stddev query * operational median and stddev * working simple exponential smoothing * too complex to do it right * fixed ses * fixed ses * rewrote query engine * fix double-exponential-smoothing * cleanup * fixed bug identified by @vlvkobal at rrdset_first_slot() * enable freeipmi on systems with libipmimonitoring; #4440
Diffstat (limited to 'health')
-rw-r--r--health/health.c1
-rw-r--r--health/health.d/net.conf4
-rw-r--r--health/health_config.c9
-rw-r--r--health/health_json.c1
-rw-r--r--health/health_log.c1
5 files changed, 6 insertions, 10 deletions
diff --git a/health/health.c b/health/health.c
index 7b3b4755dc..ae0c464b1b 100644
--- a/health/health.c
+++ b/health/health.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-#define NETDATA_HEALTH_INTERNALS
#include "health.h"
unsigned int default_health_enabled = 1;
diff --git a/health/health.d/net.conf b/health/health.d/net.conf
index 22a88927d0..015de79989 100644
--- a/health/health.d/net.conf
+++ b/health/health.d/net.conf
@@ -101,7 +101,7 @@ template: 1m_received_packets_rate
os: linux freebsd
hosts: *
families: *
- lookup: average -1m of received
+ lookup: average -1m unaligned of received
units: packets
every: 10s
info: the average number of packets received during the last minute
@@ -111,7 +111,7 @@ template: 10s_received_packets_storm
os: linux freebsd
hosts: *
families: *
- lookup: average -10s of received
+ lookup: average -10s unaligned of received
calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
every: 10s
units: %
diff --git a/health/health_config.c b/health/health_config.c
index 84727806b3..d4af9776fb 100644
--- a/health/health_config.c
+++ b/health/health_config.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-#define NETDATA_HEALTH_INTERNALS
#include "health.h"
#define HEALTH_CONF_MAX_LINE 4096
@@ -54,7 +53,7 @@ static inline int rrdcalc_add_alarm_from_config(RRDHOST *host, RRDCALC *rc) {
(rc->recipient)?rc->recipient:"DEFAULT",
rc->green,
rc->red,
- rc->group,
+ (int)rc->group,
rc->after,
rc->before,
rc->options,
@@ -108,7 +107,7 @@ static inline int rrdcalctemplate_add_template_from_config(RRDHOST *host, RRDCAL
(rt->recipient)?rt->recipient:"DEFAULT",
rt->green,
rt->red,
- rt->group,
+ (int)rt->group,
rt->after,
rt->before,
rt->options,
@@ -288,7 +287,7 @@ static inline uint32_t health_parse_options(const char *s) {
static inline int health_parse_db_lookup(
size_t line, const char *filename, char *string,
- int *group_method, int *after, int *before, int *every,
+ RRDR_GROUPING *group_method, int *after, int *before, int *every,
uint32_t *options, char **dimensions
) {
debug(D_HEALTH, "Health configuration parsing database lookup %zu@%s: %s", line, filename, string);
@@ -312,7 +311,7 @@ static inline int health_parse_db_lookup(
return 0;
}
- if((*group_method = web_client_api_request_v1_data_group(key, -1)) == -1) {
+ if((*group_method = web_client_api_request_v1_data_group(key, RRDR_GROUPING_UNDEFINED)) == RRDR_GROUPING_UNDEFINED) {
error("Health configuration at line %zu of file '%s': invalid group method '%s'",
line, filename, key);
return 0;
diff --git a/health/health_json.c b/health/health_json.c
index 61241cfb01..a049dc1b2b 100644
--- a/health/health_json.c
+++ b/health/health_json.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-#define NETDATA_HEALTH_INTERNALS
#include "health.h"
static inline void health_string2json(BUFFER *wb, const char *prefix, const char *label, const char *value, const char *suffix) {
diff --git a/health/health_log.c b/health/health_log.c
index e87a291324..dd51be2afa 100644
--- a/health/health_log.c
+++ b/health/health_log.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-#define NETDATA_HEALTH_INTERNALS
#include "health.h"
// ----------------------------------------------------------------------------