Sybase SNMP subagent
30
This command should walk through and return values for several MIBs
including RDBMS-MIB. For more information on the SNMP command line
tool issue man snmpwalk and man snmcmd.
Configuring trap generation from Adaptive Server
The Sybase subagent allows a Sybase server to generate a trap through a
remote procedure call, sp_errornotify. When the remote procedure is called, a
trap is generated containing the values in its parameters. sp_errornotify can be
used from within any stored procedure. You may want, for example, to use this
mechanism in the implementation of your sp_thresholdaction actions.
To use this:
The Sybase SNMP agent contains an Open Server implementation. Add
an entry for the Sybase SNMP agent to your $SYBASE/interfaces file. Use
the rpcPort value you specified in snmpagent.cfg as its port address. The
name of the server can be any valid server name.
Add the Sybase subagent as a remote server to your Adaptive Server using
sp_addserver. Use the same name you specified in the interfaces file entry.
You can let the server type default to Adaptive Server.
•Enable
cis rpc handling by running sp_configure, or issue the command set
cis_rpc_handling prior to the procedure call.
•Issue the sp_errornotify procedure using this syntax:
<snmpsubagentname>...sp_errornotify
servername,errno,serverity,state,username,spid,
engine,msg
servername - The name of the server (@@servername)
errno - The error number (integer)
severity - The error severity (integer)
state - The error state (integer)
username - Adaptive Server user name
spid - Server process id (@@spid)
engine - The engine number (integer)
msg - The text of the error message
The values given are not validated by the SNMP agent, they are simply
converted to variables to the sybRaiseError trap defined in SYBASE-MIB.