452 lines
18 KiB
HTML
452 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>SNMP Trap Support</title>
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Begin Header Records ========================================== -->
|
|
<!-- Direct1 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
|
<!--End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>SNMP Trap Support</h2>
|
|
|
|
<p>You can monitor for unsolicited SNMP trap messages by using the SNMP trap
|
|
support. These trap messages may contain helpful data for managing a
|
|
network.</p>
|
|
|
|
<p>By using the i5/OS SNMP manager, it is possible to deliver SNMP traps to
|
|
data queues. All traps that are received on an iSeries server can be routed to
|
|
user-defined data queues as shown in <a href="#FIGSNMPTRP">Figure: SNMP Trap
|
|
Support</a>. Your applications should monitor the data queue to receive trap
|
|
information.</p>
|
|
|
|
<p><strong><a name="FIGSNMPTRP">SNMP Trap Support</a></strong></p>
|
|
|
|
<table border>
|
|
<tr>
|
|
<td><br>
|
|
<img src="RBAFX599.gif" alt="SNMP Trap Support"> <br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
<h3>Configuring Trap Support</h3>
|
|
|
|
<p>SNMP trap support uses the exit point QIBM_QZCA_SNMPTRAP and a data queue
|
|
that you define. To use SNMP trap support, do the following:</p>
|
|
|
|
<ol>
|
|
<li>Use the Work with Registration Information (WRKREGINF) command to determine
|
|
if the QIBM_QZCA_SNMPTRAP exit point exists on your system (see <a href=
|
|
"#FIGWRKREG1">Figure: Work with Registration
|
|
Information (WRKREGINF) Display</a>). If the exit point does not exist, create and
|
|
register the exit point by using this command:
|
|
|
|
<pre>
|
|
CALL PGM(QUSRGPT)
|
|
PARM('QIBM_QZCA_SNMPTRAP '
|
|
'ZCAT0100' X'00000000' X'00000000')
|
|
</pre>
|
|
|
|
<p><strong>Note:</strong> The first parameter must be 20 characters long.</p>
|
|
</li>
|
|
|
|
<li>Define a data queue of 32780 bytes. For example, to define a data queue
|
|
that is called MYQUEUE in library QGPL, enter:
|
|
|
|
<pre>
|
|
CRTDTAQ DTAQ(QGPL/MYQUEUE) MAXLEN(32780)
|
|
</pre>
|
|
|
|
<br>
|
|
</li>
|
|
|
|
<li>Register the exit program and exit program data with the QIBM_QZCA_SNMPTRAP
|
|
exit point by using the Work with Registration Information (WRKREGINF) command.
|
|
For example, see <a href="#FIGWRKREG1">Figure: Work with Registration
|
|
Information (WRKREGINF) Display</a> through <a href="#FIGWRKREG4">Figure: Add Exit Program - Display 2 of
|
|
2</a>.</li>
|
|
</ol>
|
|
|
|
<p>This configuration only registers the data queue name. You may want to add
|
|
the program name and library that will use this data queue even though this
|
|
information is not used by the system.</p>
|
|
|
|
<p><strong><a name="FIGWRKREG1">Figure: Work with Registration Information
|
|
(WRKREGINF) Display</a></strong></p>
|
|
|
|
<br>
|
|
<pre>
|
|
+--------------------------------------------------------------------------------+
|
|
| Work with Registration Information |
|
|
| |
|
|
| Type options, press Enter. |
|
|
| 5=Display exit point 8=Work with exit programs |
|
|
| |
|
|
| Exit |
|
|
| Exit Point |
|
|
| Opt Point Format Registered Text |
|
|
| QIBM_QTA_TAPE_TMS TMS00200 *YES |
|
|
| QIBM_QTF_TRANSFER TRAN0100 *YES Original File Transfer Functi |
|
|
| QIBM_QVP_PRINTERS PRNT0100 *YES Original Virtual Print Server |
|
|
| QIBM_QZCA_ADDC ZCAA0100 *YES Add Client exit point |
|
|
| QIBM_QZCA_REFC ZCAF0100 *YES Refresh Client Information ex |
|
|
| QIBM_QZCA_RMVC ZCAR0100 *YES Remove Client exit point |
|
|
| 8 QIBM_QZCA_SNMPTRAP ZCAT0100 *YES |
|
|
| QIBM_QZCA_UPDC ZCAU0100 *YES Update Client Information exi |
|
|
| QIBM_QZDA_INIT ZDAI0100 *YES Database Server - entry |
|
|
| QIBM_QZDA_NDB1 ZDAD0100 *YES Database Server - database a |
|
|
| QIBM_QZDA_NDB1 ZDAD0200 *YES Database Server - database a |
|
|
| More... |
|
|
| Command |
|
|
| ===> |
|
|
| F3=Exit F4=Prompt F9=Retrieve F12=Cancel |
|
|
+--------------------------------------------------------------------------------+
|
|
</pre>
|
|
|
|
<br>
|
|
<p><a href="#FIGWRKREG2">Figure: Work with Exit Programs Display</a> is reached
|
|
using Option 8 from the display shown in the <a href="#FIGWRKREG1">Figure
|
|
above</a>.</p>
|
|
|
|
<p><strong><a name="FIGWRKREG2">Figure: Work with Exit Programs
|
|
Display</a></strong><br>
|
|
</p>
|
|
|
|
<br>
|
|
<pre>
|
|
+--------------------------------------------------------------------------------+
|
|
| Work with Exit Programs |
|
|
| |
|
|
| Exit point: QIBM_QZCA_SNMPTRAP Format: ZCAT0100 |
|
|
| |
|
|
| Type options, press Enter. |
|
|
| 1=Add 4=Remove 5=Display 10=Replace |
|
|
| |
|
|
| Exit |
|
|
| Program Exit |
|
|
| Opt Number Program Library |
|
|
| 1 TRAPCHECK QGPL |
|
|
| |
|
|
| (No exit programs found.) |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| Command |
|
|
| ===> |
|
|
| F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel |
|
|
+--------------------------------------------------------------------------------+
|
|
</pre>
|
|
|
|
<br>
|
|
<p><a href="#FIGWRKREG3">Figure: Add Exit Program</a>is reached using Option 1
|
|
from the <a href="#FIGWRKREG2">Figure above</a> and pressing F10 for additional
|
|
parameters.</p>
|
|
|
|
<p><strong><a name="FIGWRKREG3">Figure: Add Exit Program - Display 1 of
|
|
2</a></strong><br>
|
|
</p>
|
|
|
|
<br>
|
|
<br>
|
|
<pre>
|
|
+--------------------------------------------------------------------------------+
|
|
| Add Exit Program (ADDEXITPGM) |
|
|
| |
|
|
| Type choices, press Enter. |
|
|
| |
|
|
| Exit point . . . . . . . . . . . > QIBM_QZCA_SNMPTRAP |
|
|
| Exit point format . . . . . . . > ZCAT0100 Name |
|
|
| Program number . . . . . . . . . > 1 1-2147483647, *LOW, *HIGH |
|
|
| Program . . . . . . . . . . . . > TRAPCHECK Name |
|
|
| Library . . . . . . . . . . . > QGPL Name, *CURLIB |
|
|
| Text 'description' . . . . . . . Reroute traps |
|
|
| |
|
|
| |
|
|
| Additional Parameters |
|
|
| |
|
|
| Replace existing entry . . . . . > *NO *YES, *NO |
|
|
| Create exit point . . . . . . . *NO *YES, *NO |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| More... |
|
|
| F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display |
|
|
| F24=More keys |
|
|
+--------------------------------------------------------------------------------+
|
|
</pre>
|
|
|
|
<br>
|
|
<p><strong><a name="FIGWRKREG4">Figure: Add Exit Program - Display 2 of
|
|
2</a></strong></p>
|
|
|
|
<br>
|
|
<pre>
|
|
+--------------------------------------------------------------------------------+
|
|
| Add Exit Program (ADDEXITPGM) |
|
|
| |
|
|
| Type choices, press Enter. |
|
|
| |
|
|
| Exit program data: |
|
|
| Coded character set ID . . . . *NONE Number, *NONE, *JOB |
|
|
| Length of data . . . . . . . . *CALC 0-2048, *CALC |
|
|
| Program data . . . . . . . . . QGPL/MYQUEUE |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| Bottom |
|
|
| F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display |
|
|
| F24=More keys |
|
|
+--------------------------------------------------------------------------------+
|
|
</pre>
|
|
|
|
<br>
|
|
<p><strong>Notes:</strong></p>
|
|
|
|
<ol>
|
|
<li>The program data field on the Add Exit Program (ADDEXITPGM) display
|
|
contains the library name and the data queue name that will be used by the trap
|
|
manager. This data must not exceed 21 bytes.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The exit program and library do not have to exist when they are added to
|
|
the exit point.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The format for the ZCAT0100 trap data queue entry follows. For details
|
|
about the SNMP trap, refer to the Internet standard for the trap message
|
|
described in RFC 1155 and RFC 1157. The values for the object type field can be
|
|
found in i5/OS library QSYSINC, file H, member QTOMEAPI.<br>
|
|
<br>
|
|
<table border width="80%">
|
|
<tr>
|
|
<th align="center" valign="bottom" colspan="2">Offset</th>
|
|
<th align="left" valign="bottom" rowspan="2">Type</th>
|
|
<th align="left" valign="bottom" rowspan="2">Field</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th align="center" valign="bottom">Dec</th>
|
|
<th align="center" valign="bottom">Hex</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">0</td>
|
|
<td align="center" valign="top" width="10%">0</td>
|
|
<td align="left" valign="top" width="20%">CHAR(10)</td>
|
|
<td align="left" valign="top" width="60%">Entry type (always *SNMPTRAP)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">10</td>
|
|
<td align="center" valign="top">A</td>
|
|
<td align="left" valign="top">CHAR(2)</td>
|
|
<td align="left" valign="top">Entry ID (currently 01)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">12</td>
|
|
<td align="center" valign="top">C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Version (This is the start of the trap header.
|
|
All displacements are from the start of the trap header.)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">16</td>
|
|
<td align="center" valign="top">10</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of community name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">20</td>
|
|
<td align="center" valign="top">14</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to community name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">24</td>
|
|
<td align="center" valign="top">18</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of enterprise object ID</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">28</td>
|
|
<td align="center" valign="top">1C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to enterprise object ID</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">32</td>
|
|
<td align="center" valign="top">20</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of agent address</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">36</td>
|
|
<td align="center" valign="top">24</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to agent address</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">40</td>
|
|
<td align="center" valign="top">28</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Generic trap type</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">44</td>
|
|
<td align="center" valign="top">2C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Specific trap code</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">48</td>
|
|
<td align="center" valign="top">30</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Time stamp</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">52</td>
|
|
<td align="center" valign="top">34</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Number of variable bindings</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">56</td>
|
|
<td align="center" valign="top">38</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to first variable binding</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> An array of
|
|
variable bindings follows.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" rowspan="5" colspan="2">These fields repeat for
|
|
each variable binding</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of object name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to object name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of value</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Displacement to value</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Value type (Values for this field can be found in
|
|
i5/OS library QSYSINC, file H, member QTOMEAPI.)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> All object
|
|
names and values follow.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="2"><br>
|
|
</td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Object names and values for all variable
|
|
bindings</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The library name and data queue must be specified in uppercase on the exit
|
|
point.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Multiple exit programs are supported on the QIBM_QZCA_SNMPTRAP exit point.
|
|
Each exit program must contain only one data queue.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>A maximum of 100 data queues can be defined.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The data queue names are retrieved from the exit point only when the trap
|
|
manager is started. To activate any changes to the data queues, you must end
|
|
the trap manager with the End Trap Manager (ENDTRPMGR) command and restart the
|
|
trap manager with the Start Trap Manager (STRTRPMGR) command.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>In the preceding scenario, all traps are added to the data queue. If the
|
|
queue is locked, damaged, destroyed, or named incorrectly, the traps are lost.
|
|
It is the responsibility of the user application to remove traps from the
|
|
queue. No messages are sent if the queue is full or traps not removed.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<hr>
|
|
<table cellpadding="2" cellspacing="2" align="center">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a> </td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|