mirror of
https://github.com/netdata/netdata.git
synced 2025-04-28 22:52:30 +00:00
fix alerts transitions search when something specific is asked for (#15447)
This commit is contained in:
parent
8f78b7cf04
commit
5026ca027d
1 changed files with 2 additions and 3 deletions
|
@ -1773,11 +1773,10 @@ fail:
|
|||
"d.transition_id, d.global_id, ah.class, ah.type, ah.component, d.exec_run_timestamp"
|
||||
|
||||
#define SQL_SEARCH_ALERT_TRANSITION_COMMON_WHERE \
|
||||
"h.config_hash_id = ah.hash_id AND h.health_log_id = d.health_log_id" \
|
||||
" AND ( d.new_status > 2 OR d.old_status > 2 )"
|
||||
"h.config_hash_id = ah.hash_id AND h.health_log_id = d.health_log_id"
|
||||
|
||||
#define SQL_SEARCH_ALERT_TRANSITION SQL_SEARCH_ALERT_TRANSITION_SELECT " FROM health_log h, health_log_detail d, v_%p t, alert_hash ah " \
|
||||
" WHERE h.host_id = t.host_id AND " SQL_SEARCH_ALERT_TRANSITION_COMMON_WHERE " AND d.global_id BETWEEN @after AND @before "
|
||||
" WHERE h.host_id = t.host_id AND " SQL_SEARCH_ALERT_TRANSITION_COMMON_WHERE " AND ( d.new_status > 2 OR d.old_status > 2 ) AND d.global_id BETWEEN @after AND @before "
|
||||
|
||||
#define SQL_SEARCH_ALERT_TRANSITION_DIRECT SQL_SEARCH_ALERT_TRANSITION_SELECT " FROM health_log h, health_log_detail d, alert_hash ah " \
|
||||
" WHERE " SQL_SEARCH_ALERT_TRANSITION_COMMON_WHERE " AND transition_id = @transition "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue