summaryrefslogtreecommitdiffstats
path: root/health/health_json.c
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2022-08-04 10:18:53 +0300
committerGitHub <noreply@github.com>2022-08-04 10:18:53 +0300
commit2fd2607475479bcb1e5d929f109ffd5537303bb7 (patch)
treeaf2d78ab77e0a7bcde089e28c67d59c01948e302 /health/health_json.c
parent5634e0fdd1c9241e3d31bd80dd3908b3ef4f10d7 (diff)
Send chart context with alert events to the cloud (#13409)
* add chart context to alert events * migrate health log tables to add chart_context * send it via proto message * add from v3 to v4 * free table * free chart_context
Diffstat (limited to 'health/health_json.c')
-rw-r--r--health/health_json.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/health/health_json.c b/health/health_json.c
index d5285c11e7..4e8f437613 100644
--- a/health/health_json.c
+++ b/health/health_json.c
@@ -29,6 +29,7 @@ void health_alarm_entry2json_nolock(BUFFER *wb, ALARM_ENTRY *ae, RRDHOST *host)
"\t\t\"config_hash_id\": \"%s\",\n"
"\t\t\"name\": \"%s\",\n"
"\t\t\"chart\": \"%s\",\n"
+ "\t\t\"context\": \"%s\",\n"
"\t\t\"family\": \"%s\",\n"
"\t\t\"class\": \"%s\",\n"
"\t\t\"component\": \"%s\",\n"
@@ -65,6 +66,7 @@ void health_alarm_entry2json_nolock(BUFFER *wb, ALARM_ENTRY *ae, RRDHOST *host)
, config_hash_id
, ae->name
, ae->chart
+ , ae->chart_context
, ae->family
, ae->classification?ae->classification:"Unknown"
, ae->component?ae->component:"Unknown"