I've been struggling with this for a few days and just can't seem to get it to work. I had a few set up for this but we lost a drive and I lost all of my scripts and I have to recreate them. Basically just a script to see if a process is up. It works from the command line but when I test it I keep getting "The Monitor did not respond to the test request"
OpManager version 7
-------------------------- From the command line I get:
C:\Program Files\AdventNet\OpManager\conf\application\scripts>cscript chk_process_incrementalinde.vbs tam-merlinweb2 <my user> <my pass> Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Active 1
----------------------------------- My script: (pardon any glaring errors, I'm more of a perl/python guy)
Dim name Dim value Dim strComputer Dim processName Dim strUsername Dim strPassword
value = 0 Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcessList If objProcess.Name = processName Then value = 1
Next Wscript.Echo "Active" & " " & value
------------------------------------------------ Target server is a win2k box, the 'windows 2000 section of the HostResource.xml:
What am I missing here? I know the script is a bit off from the examples given but it works so I'm inclined to think that it's more of what I'm doing with the graphs. I know the username and password aren't being used also and I started to fix that this morning, but then thought, ok, this works and I got this example right off of the msdn website...soooo....
Any help getting this working would be greatly appreciated.