NonStop NET/MASTER Trap Subagent
SNMP Configuration and Management Manual — 424777-006
10 -11
Modifying GENTRAP
The
openagent function
sets up a user database (UDB) for the agent process. It
accepts two arguments and returns an integer describing the outcome of the function
call. The openagent function is invoked as follows:
SNMP-agent-process
is the name assigned to the agent process when it was started. GENTRAP passes
the agent process name as a parameter (&1), assigned a value when GENTRAP
starts.
&trap.oid.3 = 1.3.6.1.4.1.169.3.12.3 ; /* standard content */
&trap.value.3 = d2c(&$ems.tandem.spi.zems_tkn_content_standard) ;
&trap.oid.4 = 1.3.6.1.4.1.169.3.12.4 ; /* value of subject token */
&trap.value.4 = &zzzmsubject;
&trap.oid.5 = 1.3.6.1.4.1.169.3.12.5 ; /* generating process */
&trap.value.5 = &$ems.tandem.spi.zems_tkn_zems_tkn_proc_desc;
&trap.oid.6 = 1.3.6.1.4.1.169.3.12.6 ; /* date & time */
&trap.value.6 = &$ems.tandem.spi.zems_tkn_gentime ;
/* YYYY/MM/DD HH:MM:SS.mmmmmm */
&trap.oid.7 = 1.3.6.1.4.1.169.3.12.7 ; /* emphasis token */
if &$ems.tandem.spi.zems_tkn_emphasis \= Y then
&trap.value.7 = "(not critical)"
else
&trap.value.7 = "(CRITICAL)" ;
&trap.oid.8 = 1.3.6.1.4.1.169.3.12.8 ; /* event text */
&trap.value.8 = &zzzmsgtext ;
&err = sendtrap(myagt, 6, 0, 8)
/*zsmp-val-trap-enterpriseSpfc = 6
trap type = 0
OID count = 8 */
if &err \= 0 then do
say "error "&err" from sendtrap procedure. &sys.file.rc = ",
&sys.file.rc
say " &sys.file.error = "&sys.file.error
say " &sysmsg = "&sysmsg
end;
&err = closeagent(myagt);
if &err \= 0 then do
say "error "&err" from closeagent procedure. &sys.file.rc = ",
&sys.file.rc
say " &sys.file.error = "&sys.file.error
say " &sysmsg = "&sysmsg
end;
end gentrap
return-code = openagent (SNMP-agent-process, file-id)
Example 10-2. Initial Contents of GENTRAP
(page 2 of 2)
Содержание T9576G06
Страница 24: ...Contents SNMP Configuration and Management Manual 424777 006 xxii Tables continued ...
Страница 36: ...About This Manual SNMP Configuration and Management Manual 424777 006 xxxiv Change Bar Notation ...
Страница 38: ...Part I Installing and Configuring SNMP SNMP Configuration and Management Manual 424777 006 ...
Страница 140: ...Part II SCF for the SNMP Agent SNMP Configuration and Management Manual 424777 006 ...
Страница 208: ...Part III Troubleshooting SNMP Configuration and Management Manual 424777 006 ...
Страница 230: ...Part IV SNMP Subagents SNMP Configuration and Management Manual 424777 006 ...
Страница 340: ...TCP IP Subagent SNMP Configuration and Management Manual 424777 006 8 110 Converting Events to Traps ...
Страница 562: ...Trap Multiplexer Subagent Manager SNMP Configuration and Management Manual 424777 006 12 70 Application Source Code ...
Страница 636: ...IPX SPX Subagent G Series SNMP Configuration and Management Manual 424777 006 13 74 1012 ZISA EVT PROCESS TRAPPED ...
Страница 704: ...Part V Appendices SNMP Configuration and Management Manual 424777 006 ...
Страница 778: ...Index SNMP Configuration and Management Manual 424777 006 Index 32 Special Characters ...