Monitorify is a simple url listener that triggers notification once endpoint goes down. Monitorify.Publisher.Email uses email client to send notifications.
-
Install NuGet
-
Install monitorify email publisher
PM> Install-Package Monitorify.Publisher.Email
-
Add bootstrapping code:
IConfiguration configuration = new Configuration { PingDelay = TimeSpan.FromSeconds(1), EndPoints = new List<EndPoint> { new EndPoint { Name = "Google", Url = "http://www.google.com" } } }; EmailNotificationPublisherConfig emailConfig = new EmailNotificationPublisherConfig("smtp-mail.outlook.com", 587, false, "smtp-username", "smtp-password", "[email protected]", "[email protected]"); IMonitorifyNotifier notifier = new MonitorifyNotifier(); notifier.AddEmailPublisher(emailConfig); notifier.ListenAndNotify(configuration).Wait();