Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ccfos/nightingale
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed Oct 16, 2023
2 parents 744749d + a56fd03 commit 328f8ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions alert/eval/alert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func (s *Scheduler) syncAlertRules() {
continue
}

ruleType := rule.GetRuleType()
if rule.IsPrometheusRule() || rule.IsLokiRule() || rule.IsTdengineRule() {
datasourceIds := s.promClients.Hit(rule.DatasourceIdsJson)
datasourceIds = append(datasourceIds, s.tdengineClients.Hit(rule.DatasourceIdsJson)...)
Expand All @@ -103,6 +104,11 @@ func (s *Scheduler) syncAlertRules() {
continue
}

if ds.PluginType != ruleType {
logger.Debugf("datasource %d category is %s not %s", dsId, ds.PluginType, ruleType)
continue
}

if ds.Status != "enabled" {
logger.Debugf("datasource %d status is %s", dsId, ds.Status)
continue
Expand Down

0 comments on commit 328f8ac

Please sign in to comment.