add feature: TestAlertToQueue
This commit is contained in:
Родитель
28efdb81d1
Коммит
edc60d45ab
|
@ -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";
|
||||
|
|
Загрузка…
Ссылка в новой задаче