summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2022-08-11 16:50:12 +0300
committerGitHub <noreply@github.com>2022-08-11 16:50:12 +0300
commit5b6a8ccbfbf6131b6baf915124278595a1a6e5e6 (patch)
tree0acfa72d287ba077ffcb9851e82cdd1e9b5c6dae /health
parent2d887a543518aff315544fae26c9907b684c473f (diff)
Calculate name hash after rrdvar_fix_name (#13509)
do the hash after rrdvar_fix_name
Diffstat (limited to 'health')
-rw-r--r--health/health_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/health/health_config.c b/health/health_config.c
index e1dd32ab11..7efa45486a 100644
--- a/health/health_config.c
+++ b/health/health_config.c
@@ -686,7 +686,6 @@ static int health_readfile(const char *filename, void *data) {
rc = callocz(1, sizeof(RRDCALC));
rc->next_event_id = 1;
rc->name = strdupz(value);
- rc->hash = simple_hash(rc->name);
rc->source = health_source_file(line, filename);
rc->green = NAN;
rc->red = NAN;
@@ -703,6 +702,7 @@ static int health_readfile(const char *filename, void *data) {
if(rrdvar_fix_name(rc->name))
error("Health configuration renamed alarm '%s' to '%s'", value, rc->name);
+ rc->hash = simple_hash(rc->name);
alert_cfg->alarm = strdupz(rc->name);
ignore_this = 0;
}
@@ -724,7 +724,6 @@ static int health_readfile(const char *filename, void *data) {
rt = callocz(1, sizeof(RRDCALCTEMPLATE));
rt->name = strdupz(value);
- rt->hash_name = simple_hash(rt->name);
rt->source = health_source_file(line, filename);
rt->green = NAN;
rt->red = NAN;
@@ -738,6 +737,7 @@ static int health_readfile(const char *filename, void *data) {
if(rrdvar_fix_name(rt->name))
error("Health configuration renamed template '%s' to '%s'", value, rt->name);
+ rt->hash_name = simple_hash(rt->name);
alert_cfg->template_key = strdupz(rt->name);
ignore_this = 0;
}