Ruby eventlog monitor for windows

Hi Win32 team,

I am looking for a ruby way/library to monitor windows event log.

Something like an event viewer yet very powerful,

require “win32/EventlogMonitor”

e = EventlogMonitor.monitor(“localhost”)
e.add_monitor “Application” #monitor the Application event log

monitor realtime

e.on_event do |event|
if event.type =~ /warning/i and event.source =~ /msexchange/
mail.sendmail user=>“botp” subject=>“ms exchange warnings”

read whole eventlog “Application” # view the Application event log
e.read_line do |line|
if line.type =~ /fail/ and line.source =~ /antivir/
puts line

I hope i am not asking too much.

thank you and kind regards -botp

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs