Ad Widget

Collapse

Step to configure cutomized VB script for monitoring error event log

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • niradjoshi
    Junior Member
    • May 2007
    • 2

    #1

    Step to configure cutomized VB script for monitoring error event log

    Hi,

    I have developed a script which will contimuously monitor Error event log and return event log message as output as soon as new event occurs. I want this script to be used with zabbix.

    I am new to this tool so anybody please tell me step by step process to configure zabbix toll so that server can get output of this vbscript from agent and show an alert.

    Do i need to run this script on each and every client or i can configure this into the server and it will run on all the client continuously as i want real time monitoring of event log.

    Here is my vbscript

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate, (Security)}!\\" & _
    strComputer & "\root\cimv2")

    Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
    ("Select * from __instancecreationevent where " _
    & "TargetInstance isa 'Win32_NTLogEvent' " _
    & "and TargetInstance.EventType = '3' ")
    Do
    Set objLatestEvent = colMonitoredEvents.NextEvent
    strAlertToSend = objLatestEvent.TargetInstance.Message
    Wscript.Echo strAlertToSend
    Loop


    Please help me on this asap.

    Thanks in advance.
  • cjwallace
    Senior Member
    • Sep 2008
    • 126

    #2
    Hello mate.

    Did you ever get an answer or work out what you need to do here. The W32 client can monitor windows event logs but i am finding it very flakey and if i could use vbscript to do the same thing i would be happy

    Craig

    Comment

    Working...