options.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package options
  15. import (
  16. common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
  17. )
  18. type AlerterOptions struct {
  19. common_options.CommonOptions
  20. common_options.DBOptions
  21. DataProxyTimeout int `help:"query data source proxy timeout" default:"30"`
  22. AlertingMinIntervalSeconds int64 `help:"alerting min schedule frequency" default:"10"`
  23. AlertingMaxAttempts int `help:"alerting engine max attempt" default:"3"`
  24. AlertingEvaluationTimeoutSeconds int64 `help:"alerting evaluation timeout" default:"5"`
  25. AlertingNotificationTimeoutSeconds int64 `help:"alerting notification timeout" default:"30"`
  26. InitScopeSuggestConfigIntervalSeconds int `help:"internal to init scope suggest configs" default:"900"`
  27. InitAlertResourceAdminRoleUsersIntervalSeconds int `help:"internal to init alert resource admin role users " default:"3600"`
  28. MonitorResourceSyncIntervalSeconds int `help:"internal to sync monitor resource,unit: h " default:"1"`
  29. APISyncIntervalSeconds int `default:"3600"`
  30. APIRunDelayMilliseconds int `default:"5000"`
  31. APIListBatchSize int `default:"1024"`
  32. WorkerCheckInterval int `default:"180"`
  33. AutoMigrationMustPair bool `default:"false" help:"result of auto migration source guests and target hosts must be paired"`
  34. DisableQuerySignatureCheck bool `default:"true" help:"disable query signature check"`
  35. }
  36. var (
  37. Options AlerterOptions
  38. )