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.
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.
Comment