Exemple #1
0
 public static string GetKibanaUrl(Core.MessageModel elasticMessage, ElasticConfigurationModel config) =>
 elasticMessage != null
     ? $"{config.KibanaRoot}/app/kibana#/discover?_g=(time:(from:'{elasticMessage.TimestampDateTime.GetValueOrDefault(DateTime.MinValue).AddMinutes(-30):o}',to:now))&_a=(columns:!(_source),filters:!((query:(match:(actionId:(query:'{elasticMessage?.ActionId}',type:phrase))))))"
     : string.Empty;
Exemple #2
0
 public static MessageModel FromElasticMessage(Core.MessageModel elasticMessage, ValidatorResult result, ElasticConfigurationModel config) => new MessageModel()
 {
     ElasticMessage = elasticMessage,
     FoundInElastic = elasticMessage != null,
     Result         = result,
     Event          = new EventModel(elasticMessage),
     KibanaUrl      = MessageModel.GetKibanaUrl(elasticMessage, config)
 };