This commit is contained in:
Ying Huang 2023-01-20 10:26:19 -08:00
Родитель 28efdb81d1
Коммит edc60d45ab
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -182,6 +182,7 @@ namespace Helios2Sentinel
if (startDateUsecs == 0)
{
TestAlertToQueue(outputQueueItem);
startDateUsecs = GetPreviousUnixTime(log);
}
@ -227,6 +228,20 @@ namespace Helios2Sentinel
}
}
private static void TestAlertToQueue([Queue("cohesity-incidents"), StorageAccount("AzureWebJobsStorage")] ICollector<string> outputQueueItem)
{
dynamic output = new ExpandoObject();
output.properties = new ExpandoObject();
output.properties.title = "Test Incident";
output.properties.Description = "This is a test incident that confirms that the installation has completed correctly.";
output.properties.severity = "Low";
lock (queueLock)
{
outputQueueItem.Add(JsonConvert.SerializeObject(output));
}
}
private static string GetSecret(string secretName, ILogger log)
{
var kvUri = $"https://{IncidentProducer.keyVaultName}.vault.azure.net";