Пример #1
0
 public SingleStampRuleConfiguration(
     IClock clock,
     ILogger logger,
     INotifier <Notification> notifier,
     IKustoClient kustoClient,
     IIcmClient icmClient,
     string kustoDatabaseName,
     string cacheTableName,
     StampId stamp)
     : base(clock, logger, notifier, kustoClient, kustoDatabaseName, cacheTableName, icmClient)
 {
     StampId = stamp;
 }
Пример #2
0
 public MultiStampRuleConfiguration(
     IClock clock,
     ILogger logger,
     INotifier <Notification> notifier,
     IKustoClient kustoClient,
     IIcmClient icmClient,
     string kustoDatabaseName,
     string cacheTableName,
     MonitorEnvironment environment,
     Watchlist watchlist)
     : base(clock, logger, notifier, kustoClient, kustoDatabaseName, cacheTableName, icmClient)
 {
     Environment = environment;
     WatchList   = watchlist;
 }
 public KustoRuleConfiguration(
     IClock clock,
     ILogger logger,
     INotifier <Notification> notifier,
     IKustoClient kustoClient,
     string kustoDatabaseName,
     string cacheTableName,
     IIcmClient icmClient)
 {
     Clock             = clock;
     Logger            = logger;
     Notifier          = notifier;
     KustoClient       = kustoClient;
     KustoDatabaseName = kustoDatabaseName;
     CacheTableName    = cacheTableName;
     IcmClient         = icmClient;
 }
Пример #4
0
        private Monitor(Configuration configuration, IKustoIngestClient kustoIngestClient, IIcmClient icmClient, IClock clock, IReadOnlyDictionary <MonitorEnvironment, EnvironmentResources> environmentResources, ILogger logger)
        {
            _configuration = configuration;

            _clock                = clock;
            _logger               = logger;
            _kustoIngestClient    = kustoIngestClient;
            _icmClient            = icmClient;
            _environmentResources = environmentResources;

            if (configuration.ReadOnly)
            {
                _alertNotifier      = new LogNotifier <Notification>(_logger);
                _schedulerLogWriter = new LogNotifier <RuleScheduler.LogEntry>(_logger);
            }
            else
            {
                _alertNotifier      = new KustoNotifier <Notification>(_configuration.KustoNotifier, _logger, _kustoIngestClient);
                _schedulerLogWriter = new KustoNotifier <RuleScheduler.LogEntry>(_configuration.SchedulerKustoNotifier, _logger, _kustoIngestClient);
            }

            _scheduler = new RuleScheduler(_configuration.Scheduler, _logger, _clock, _schedulerLogWriter);
        }