summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite_health.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/sqlite/sqlite_health.c')
-rw-r--r--database/sqlite/sqlite_health.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/database/sqlite/sqlite_health.c b/database/sqlite/sqlite_health.c
index 1226b9209e..82924a16af 100644
--- a/database/sqlite/sqlite_health.c
+++ b/database/sqlite/sqlite_health.c
@@ -975,8 +975,8 @@ void sql_health_alarm_log_load(RRDHOST *host) {
"on_key, class, component, type, os, hosts, lookup, every, units, calc, families, plugin, module, " \
"charts, green, red, warn, crit, exec, to_key, info, delay, options, repeat, host_labels, " \
"p_db_lookup_dimensions, p_db_lookup_method, p_db_lookup_options, p_db_lookup_after, " \
- "p_db_lookup_before, p_update_every, source) values (?1,unixepoch(),?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12," \
- "?13,?14,?15,?16,?17,?18,?19,?20,?21,?22,?23,?24,?25,?26,?27,?28,?29,?30,?31,?32,?33,?34,?35);"
+ "p_db_lookup_before, p_update_every, source, chart_labels) values (?1,unixepoch(),?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12," \
+ "?13,?14,?15,?16,?17,?18,?19,?20,?21,?22,?23,?24,?25,?26,?27,?28,?29,?30,?31,?32,?33,?34,?35,?36);"
int sql_store_alert_config_hash(uuid_t *hash_id, struct alert_config *cfg)
{
@@ -1160,6 +1160,10 @@ int sql_store_alert_config_hash(uuid_t *hash_id, struct alert_config *cfg)
if (unlikely(rc != SQLITE_OK))
goto bind_fail;
+ rc = sqlite3_bind_string_or_null(res, cfg->chart_labels, ++param);
+ if (unlikely(rc != SQLITE_OK))
+ goto bind_fail;
+
rc = execute_insert(res);
if (unlikely(rc != SQLITE_DONE))
error_report("Failed to store alert config, rc = %d", rc);