summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2022-01-17 12:32:44 +0200
committerGitHub <noreply@github.com>2022-01-17 12:32:44 +0200
commit3296f78436ce1f474cd38de7e842df6cf2f1f112 (patch)
tree935e5d9a8d1a9c3f5e96442a952f9af1698df96a /database
parent8c201ccadf298ccea5cc85a3aede72f8e3843fed (diff)
Add localhost hostname to the edit_command (#11793)
* include localhost hostname in edit_command * since the edit_command now contains the localhost name, dont pass it again to the script
Diffstat (limited to 'database')
-rw-r--r--database/sqlite/sqlite_aclk_alert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/sqlite/sqlite_aclk_alert.c b/database/sqlite/sqlite_aclk_alert.c
index f09b2dcac8..d57783ae43 100644
--- a/database/sqlite/sqlite_aclk_alert.c
+++ b/database/sqlite/sqlite_aclk_alert.c
@@ -209,7 +209,7 @@ void aclk_push_alert_event(struct aclk_database_worker_config *wc, struct aclk_d
char *edit_command = sqlite3_column_bytes(res, 16) > 0 ?
health_edit_command_from_source((char *)sqlite3_column_text(res, 16)) :
- strdupz("UNKNOWN=0");
+ strdupz("UNKNOWN=0=UNKNOWN");
alarm_log.command = strdupz(edit_command);
alarm_log.duration = (time_t) sqlite3_column_int64(res, 6);
@@ -695,7 +695,7 @@ void aclk_mark_alert_cloud_ack(char *uuid_str, uint64_t alerts_ack_sequence_id)
#ifdef ENABLE_NEW_CLOUD_PROTOCOL
void health_alarm_entry2proto_nolock(struct alarm_log_entry *alarm_log, ALARM_ENTRY *ae, RRDHOST *host)
{
- char *edit_command = ae->source ? health_edit_command_from_source(ae->source) : strdupz("UNKNOWN=0");
+ char *edit_command = ae->source ? health_edit_command_from_source(ae->source) : strdupz("UNKNOWN=0=UNKNOWN");
char config_hash_id[GUID_LEN + 1];
uuid_unparse_lower(ae->config_hash_id, config_hash_id);