Pb with traphandle calling bat file

"FRUCTUS, Fabrice (INFOTEL CONSEIL)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <BE9912E92BF2654CB92AA99A40DB405202F7E23E@FR0-MAILMB16.res.airbus.corp>

> Hello,
>
> I would like to call a .bat file when receiving a overquota SNMP trap from a filer.
> This bat file would then call a VBScript, providing trap information as arguments
>
> I currently receive these SNMP traps, but I can't get the trap information in my bat file:
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
> Here's my snmptrapd.conf file:
>
> 	# Access control disabled
> 	disableAuthorization yes
>
> 	# Enterprise specific trap
> 	traphandle NETWORK-APPLIANCE-MIB::quotaExceeded c:/usr/bin/trapProcessor.bat
> ------------------------------------------------------------------------------------------------------------------------------------------------
> Here's my trapProcessor.bat file:
>
> 	@echo off
>
> 	cscript //Nologo trapProcessor.vbs %*
> ------------------------------------------------------------------------------------------------------------------------------------------------
> Here's my trapProcessor.vbs file
>
> 	Option Explicit
>
> 	Dim lStr, objArgs, I
>
> 	Set objArgs = WScript.Arguments
> 	For I = 0 to objArgs.Count - 1
> 		lStr = lStr & Chr(13) & Chr(10) & objArgs(I)
> 	Next
>
> 	MsgBox lStr
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> But unfortunately, the bat file doesn't get any arguments, and then so as my vbs file.
>
>
> Do you have any idea ?
>
> Regards,
> Fabrice
>

This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message.


_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.