Bob is right about the missing quote, but Aaron also needs to add a
<command-exit> section to his probe. Something like this:
<command-exit>
down:${EXIT_CODE}=3
critical:${EXIT_CODE}=2
alarm:${EXIT_CODE}=1
okay:${EXIT_CODE}=0
</command-exit>
--------------------------------------
Richard M. Colburn
Software Developer
Dartware, LLC
On 13 Oct 2011, at 1611 , Bob Merrill wrote:
> Aaron,
>
> This may be the problem:
>
> arg="${ADDRESS}
>
> Unterminated string - should be:
>
> arg="${ADDRESS}"
>
> (I think...)
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of [email protected]
> Sent: Thursday, October 13, 2011 2:38 PM
> To: [email protected]; [email protected]
> Subject: [IM-Talk] Re: <command-line> missing..
>
>
> I have tried that. With what I have leared I changed a few things, after
> reading more of the documentation. But I still have issues, same error.
>
>
>
>
> Code:
>
>
> <!--
> Comand Line Print List Probe (sd68.bc.ca.printer) Displays printers on a
> Server
>
>
> Aaron Arnold
>
> -->
>
> <header>
> type="cmd-line"
> package="sd68.bc.ca"
> probe_name="Listprinters"
> human_name="Windows Printer List"
> version="1.0"
> address_type="IP"
> </header>
>
> <description>
>
> This probe list Windows printers using a custom WMI VB script. It passes
> the IP address of the host ($ADDRESS)
>
> to a script which attempts list all printers.
>
> </description>
>
>
> <command-line>
> -- Empty path forces the InterMapper Settings:Tools directory path=""
> cmd="${CSCRIPT} ListPrinters.vbs"
> arg="${ADDRESS}
> </command-line>
>
> <command-data>
> -- Currently unused.
> </command-data>
>
> <command-display>
> ${^stdout}
> </command-display>
>
>
>
> <tool:ListPrinters.vbs>
> set objargs = Wscript.Arguments
> If objargs.Count <> 1 then
> WScript.Echo "Bad args"
>
> End if
>
> strComputer = ObjArgs(0)
>
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
> Set colInstalledPrinters = objWMIService.ExecQuery _
> ("Select * from Win32_Printer")
> For Each objPrinter in colInstalledPrinters
> wscript.echo objPrinter.name
> Wscript.echo objprinter.sharename
> Next
>
> </tool:ListPrinters.vbs>
>
.+-j·!÷¬Ûiÿü0Âf¢ªÜ+Þr¿{^®f©¥êíjY8ÒX¬µÖ«·«yÊ&ý:.˱Êâmëצj)m íz³¦«M©d¡÷åË]j»pj·¢