4

It seems there are libraries out there for anything these days! I need to develop a program that will spawn a couple of Windows programs and need to monitor:

  • That they are still alive
  • Any log files that they create
  • StdIn, StdOut, StdErr (if any)
  • Performance metrics (Disk, IO, Network, CPU)

Is there a "ready made" library out there that will do the legwork for me?

I'm aware that I can use WMI Performance Counters, Tracing, System.Diagnostics etc. to do the above, but I'm hoping that someone clever has already developed a kickass library for dealing with the low level stuff.

I'm not against paying for the software, so paid/open/closed are all acceptable, however free is better than paid, and open is better than closed.


Update: I originally posted this on Stack Overflow and got advised to re-post here.

Update 2: After a long time searching online I came up with these candidate process libraries, but none seem what im looking for:

Update 3: Neither of the above seem to really do the trick. I guess I'm gonna have to roll my own.

2

I recommend you just use the .NET framework directly.

  • That they are still alive

The Process object has a HasExited property to determine this.

  • Any log files that they create

This is an ackward one it depeneds on how the application logs. If they create files monitor the files they create maybe using FileSystemWatcher class. If they are event logs you need to know how they log to the event log. If they write to standard output (stdout) look at the RedirectStandardOutput property documentation.

  • StdIn, StdOut, StdErr (if any)

This is all available from the Process object.

  • Performance metrics (Disk, IO, Network, CPU)

This can be done with PerformanceCounter class.

But there is also wolfpack https://wolfpack.codeplex.com/

Project Description Wolfpack aims to be the "swiss army knife" of monitoring. To borrow a line from Etsy..."if it moves we monitor it, even if it doesn't move we'll monitor it just in case it makes a break for it!".

You may need to write a plugin for your specifics but this might just work out of the box for you with some configuration.

Features

  • IIS logs -Firewall logs
  • Event logs (including queries that join to those on remote machines)
  • Many other textual logging formats such as CSV, XML (including making an http call to retrieve the data, eg: RSS, Webservice)
  • FileSystem
  • Sql Server data (write queries to detect any sort of data condition eg: monitor for orders > £value or not despatched after N days)
  • MSMQ
  • RabbitMQ (contrib plugin)
  • Windows Services
  • Web service/site Ping
  • System (CPU, Disk) utilisation
  • Build/CI (TeamCity at the moment) and the extraction of stats from common build tools like NCover, SpecFlow, StoryQ
  • Deployment - Wolfpack can automatically deploy NuGet packages - these can contain your entire website/application or just some unit tests and Wolfpack will detect, download and unpack it, even running the unit tests and sending a notifcation with the results in!
  • SSL Certificate expiry - monitor for certificates getting close to expiry and stop embarrassing incidents like the one SagePay just experienced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.