Mitsuhiro Tanda 7 лет назад
Родитель
Сommit
77220456b6
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      pkg/tsdb/cloudwatch/cloudwatch.go

+ 4 - 0
pkg/tsdb/cloudwatch/cloudwatch.go

@@ -112,6 +112,10 @@ func (e *CloudWatchExecutor) executeTimeSeriesQuery(ctx context.Context, queryCo
 			continue
 		}
 
+		if query.Id == "" && query.Expression != "" {
+			return nil, fmt.Errorf("Invalid query: id should be set if using expression")
+		}
+
 		eg.Go(func() error {
 			queryRes, err := e.executeQuery(ectx, query, queryContext)
 			if err != nil {