Skip to content

Instantly share code, notes, and snippets.

@pawlos
Last active September 25, 2016 16:58
Show Gist options
  • Select an option

  • Save pawlos/3a86c61a0485da693f42e0b08d7ceaf8 to your computer and use it in GitHub Desktop.

Select an option

Save pawlos/3a86c61a0485da693f42e0b08d7ceaf8 to your computer and use it in GitHub Desktop.
warden-example
using System.Threading.Tasks;
using Warden;
using Warden.Core;
using Warden.Watchers.Disk;
using Warden.Watchers.Process;
namespace KidsTravel.Monitoring
{
class Program
{
static void Main(string[] args)
{
var config = WardenConfiguration.Create()
.AddDiskWatcher(cfg =>
cfg.WithPartitionsToCheck("C"))
.AddProcessWatcher("node", ".")
.WithConsoleLogger(Warden.Utils.WardenLoggerLevel.Info).Build();
var warden = WardenInstance.Create(config);
Task.WaitAll(warden.StartAsync());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment