We're working on splitting this out into a reusable platform for writing lightweight host-based agents. Luvit works out fairly well for this - our monitoring agent runs in around 5mb resident memory, works on Windows (although we haven't released that yet) and is relatively easy to code on.
Shameless plug: if this sort of stuff interests you, hit me up, my email is in my profile.