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 e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.
_______________________________________________
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