WMI Problem

WMI Problem

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

processName = "incrementalinde"


strComputer = Wscript.Arguments.Item(0)
strUsername = Wscript.Arguments(1)
strPassword = Wscript.Arguments(2)



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:

<CATEGORY ID="CheckProcessIncrementalinde" command="chk_proc_incrementalinde.vbs" parseAll="false" ignoreLines="3" description="Check Process Incrementalinde">
<ENTITY ID="CheckProcessIncrementalinde" storeValue="Active" storeHistory="true" units="%" >
<PARSE line="3" token="1" name="Name" isEntityName="true"/>
<PARSE line="3" token="2" name="Value"/>
</ENTITY>
</CATEGORY>

------------------------------------------------------
And the opmanager_graphInfo.xml section:

<DEFAULTGRAPH Name="CheckProcessIncrementalinde">
<YAXISTEXT>Percentage</YAXISTEXT>
<DISPLAYNAME>Check Process Incrementalinde</DISPLAYNAME>
<name>CheckProcessIncrementalinde</name>
<Vendor>WMI</Vendor>
<Description>Monitors Incrementaline Process</Description>
<oid>CheckProcessIncrementalinde</oid>
<Provider>WMI</Provider>
<type>multiple</type>
<interval>300</interval>
<THRESHOLDENABLED>false</THRESHOLDENABLED>
</DEFAULTGRAPH>

--------------------------------------------

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.










































































                  New to ADSelfService Plus?