public override void ExecuteCommand() { thresholdValues = new JavaScriptSerializer().Deserialize <AlertThresholds>(ReportHelpers.Load(StorageAccount, "Configuration.AlertThresholds.json", ContainerName)); //Check last activity in DB and last activity in catalog doesn't vary more than allowed threshold. CheckLagBetweenDBAndCatalog(); //Check all newly uploaded packages in DB are present in catalog. DoIntegrityCheckBetweenDBAndCatalog(); }
public override void ExecuteCommand() { sqlQueryForDbAge = string.Format("select create_date from sys.databases where name = '{0}'", DbName); thresholdValues = new JavaScriptSerializer().Deserialize <AlertThresholds>(ReportHelpers.Load(StorageAccount, "Configuration.AlertThresholds.json", ContainerName)); List <Tuple <string, string> > jobOutputs = new List <Tuple <string, string> >(); jobOutputs.Add(new Tuple <string, string>("SyncPackagesToFailoverDC", CheckLagBetweenDBAndBlob())); jobOutputs.Add(new Tuple <string, string>("ImportCompletionStatus", CheckForInCompleteDBImport())); JArray reportObject = ReportHelpers.GetJson(jobOutputs); ReportHelpers.CreateBlob(StorageAccount, "RunBackgroundCheckForFailoverDCReport.json", ContainerName, "application/json", ReportHelpers.ToStream(reportObject)); }
public override void ExecuteCommand() { thresholdValues = new JavaScriptSerializer().Deserialize <AlertThresholds>(ReportHelpers.Load(StorageAccount, "Configuration.AlertThresholds.json", ContainerName)); List <Tuple <string, string> > jobOutputs = new List <Tuple <string, string> >(); jobOutputs.Add(new Tuple <string, string>("PackageStatics", CheckoutForPackageStatics())); //jobOutputs.Add(new Tuple<string, string>("PurgePackageStatistics", CheckForPurgePackagStatisticsJob())); jobOutputs.Add(new Tuple <string, string>("HandleQueuedPackageEdits", CheckForHandleQueuedPackageEditJob())); // jobOutputs.Add(new Tuple<string, string>("BackupPackages", CheckForBackupPackagesJob())); commenting out this check temporarily as ListBlobs on ng-backups container is giving error. JArray reportObject = ReportHelpers.GetJson(jobOutputs); ReportHelpers.CreateBlob(StorageAccount, "RunBackGroundChecksForWorkerJobsReport.json", ContainerName, "application/json", ReportHelpers.ToStream(reportObject)); }
public override void ExecuteCommand() { JavaScriptSerializer js = new JavaScriptSerializer(); AlertThresholds thresholdValues = js.Deserialize <AlertThresholds>(ReportHelpers.Load(StorageAccount, "Configuration.AlertThresholds.json", ContainerName)); int error = thresholdValues.DatabaseSizePercentErrorThreshold; int warning = thresholdValues.DatabaseSizePercentWarningThreshold; List <DatabaseSize> dbSizeDetails = new List <DatabaseSize>(); // dbSizeDetails.Add(GetDataSize(PrimaryConnectionString.ConnectionString,threshold)); dbSizeDetails.Add(GetDataSize(LegacyConnectionString.ConnectionString, error, warning)); dbSizeDetails.Add(GetDataSize(WarehouseConnectionString.ConnectionString, error, warning)); var json = js.Serialize(dbSizeDetails); ReportHelpers.CreateBlob(StorageAccount, "DBSize.json", ContainerName, "application/json", ReportHelpers.ToStream(json)); }
public override void ExecuteCommand() { thresholdValues = new JavaScriptSerializer().Deserialize <AlertThresholds>(ReportHelpers.Load(StorageAccount, "Configuration.AlertThresholds.json", ContainerName)); CheckLagBetweenCatalogAndLucene(); DoIntegrityCheckBetweenCatalogAndLucene(); }