Do you like interesting things? Maybe you would like my creation, a Handmade connectible candle called a WickBrick!
Get some here http://wickbrick.bigcartel.com/product/20-white-wickbrick-s-with-2-12-wick-s
I wanted an email alert when a process reached a certain memory threshold. I knew I had the handy dandy command line emailer Blat. And I could set an alert using computer management alerts and logs. So it was just a matter of tying the two together.
So created an alert for the process, and set to trigger after private bytes was greater than some number. This alert is named ALERT1. I set it to check every minute for the threshold value.
Next created a bat file called send.bat
c:\blat\blat262\full\blat.exe c:\blat\blat262\full\message.txt -to me@place.com -s “service needs a reset” -f computer@place.com
logman stop “ALERT1”
(The logman stop command, stops the alert after it fires once)
I also edited the alert to fire off send.bat when it was triggered.
Special note, this was a win2k server so I needed to copy logman.exe and pdh.dll from a windows XP machine in order to make this work.
Yay for alerts.