A dynamic trap is a trap that is sent by the SQL Anywhere Extension Agent when a simple expression involving the value of a particular property, statistic, or option is true. Dynamic traps are created in the sasnmp.ini file. The format of the trap information in the sasnmp.ini file entry is as follows:
Traptrapnum=[184.108.40.206.4.1.897.2.]oid[.dbnum] op value
trapnum is the dynamic trap number. It must start at 1 and be sequential.
oid is the OID of the property, statistic, or option. OIDs in either the SQL Anywhere MIB or the RDBMS MIB are supported. If the OID given is an invalid SQL Anywhere or RDBMS OID, the SQL Anywhere MIB prefix (220.127.116.11.4.1.897.2.) is prepended.
For information about the OIDs in the SQL Anywhere MIB, see SQL Anywhere MIB reference.
For information about the OIDs in the RDBMS MIB, see RDBMS MIB reference.
You can only use OIDs corresponding to database server or database properties, statistics, or options in dynamic traps.
dbnum is the database number. This field is optional, but if specified, it must match the database number of the [DBn] section of the sasnmp.ini file.
must have one of the following values:
= or == (equality)
!=, <>, or >< (inequality)
<= or =< (less than or equal)
>= or => (greater than or equal)
< (less than)
> (greater than)
Only equality or inequality is supported for string values.
value is the value to use in the expression. String values may be enclosed in single or double quotes; these quotes are not included in the value. If you want the beginning or closing quotation marks to be included in the string, you must double them. Single quotes occurring within the string should not be doubled.
When setting dynamic traps, use k, m, g, or t to specify units of kilobytes, megabytes, gigabytes, or terabytes. For example, you can set a dynamic trap to fire if the current cache size exceeds 200 MB by using:
Trap1=18.104.22.168.4.1.822.214.171.124.11.1 > 200M
You can specify as many Trap fields as you want in the sasnmp.ini file. The OID used for the trap is
126.96.36.199.4.1.8188.8.131.52, and the data sent with the trap includes the following:
the trap number (starts at 1 for the first dynamic trap sent by the SQL Anywhere SNMP agent)
the database index
the database name trap index (from the sasnmp.ini file)
the variable name
the variable value (this is the current value of the variable, not necessarily the threshold value)
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|