How TimesTen Sends SNMP Traps
Topics include:
Generating and Receiving TimesTen SNMP Traps
snmptrap utility,
and to enable SNMP trap generation in the TimesTen instance configuration file,
timesten.conf.
Note:
TimesTen 18.1 (or earlier) used to have its own embedded implementation for SNMP traps generation (SNMPv1 only), which required the TimesTen SNMP configuration file, snmp.ini, to enable them. TimesTen 22.1 (or later) uses a different implementation and no longer supports the snmp.ini file. However, the events triggering a trap and the contents of the trap have not changed from previous releases.
On Linux platforms, consider using SNMPv3 over (D)TLS (DTLS/UDP) for encrypted and authenticated SNMP traps. SNMPv3 over (D)TLS has these prerequisites:
-
Net-SNMP version 5.9 (or later) with the Transport Security Model (TSM) enabled
-
The
snmptraputility -
OpenSSL version 1.1.1 (or later)
Note:
-
Neither the Net-SNMP packages nor the OpenSSL library is included with TimesTen. If the appropriate
net-snmppackage is available in the repository for your operating system, you must also acquire and install thenet-snmp-utilspackage for thesnmptraputility.Alternatively, the Net-SNMP agent, library, and tools can be downloaded from SourceForge: https://sourceforge.net/projects/net-snmp/.
-
(D)TLS uses X.509 certificates to authenticate client/server connections. Both the SNMP server and client need to have such certificates to use (D)TLS. In this case, the system receiving the SNMP traps and the one hosting the TimesTen instance and the
snmptraputility must have properly configured X.509 certificates.
For other supported platforms, such as Solaris or AIX, consider SNMPv3 over TLS (TLS/TCP) instead.
SNMP traps are only useful if you have a SNMP monitoring tool to receive and log SNMP trap messages. If you do not have a SNMP monitoring tool available, Net-SNMP includes the snmptrapd utility for this purpose.
For information on the Net-SNMP project, see http://www.net-snmp.org/.
Configuring the timesten.conf File
timesten_home/conf/timesten.conf
on UNIX systems, uses several attributes to enable
SNMP trap generation.
| Attribute | Description |
|---|---|
|
|
Colon-separated list of locations to search for the Net-SNMP configuration files, |
|
|
The location of the utility used to send SNMP traps, |
|
|
Space-separated list of destinations for the SNMP traps. |
|
|
List of options to pass to the |
|
|
The SNMP version to use. |
|
|
The location of the OpenSSL library used for encrypted SNMP traps. |
Note:
-
The
snmp.confandsnmp.local.conffiles are the configuration files for Net-SNMP utilities. TimesTen needs thesnmptraputility to be able to read either of these files to send SNMP traps. -
Only set the
openssl_pathattribute if you need TimesTen to use a different OpenSSL library from the one used by the system by default, or if thesnmptraputility specified in thesnmp_trapattribute requires a specific OpenSSL library.
For more information on the timesten.conf file, see TimesTen Instance
Configuration File in Oracle TimesTen In-Memory Database
Reference.
Example 3-2 Enabling SNMPv3 over (D)TLS traps
This example provides snippets of the timesten.conf and snmp.conf files, which showcase samples of the attributes or directives required for TimesTen to generate SNMPv3 over (D)TLS traps.
To enable SNMPv3 over (D)TLS traps, ensure that the timesten.conf file in your TimesTen instance includes the attributes shown next based on your own environment:
#SNMP traps settings snmp_conf_path=/usr/local/etc/snmp snmp_trap=/usr/local/bin/snmptrap snmp_trap_dests=dtlsudp:localhost:9161 dtlsudp:myhost:10161 snmp_version=3
Also, ensure that you configure the snmp.conf file for SNMPv3 over (D)TLS traps. The file should include at least the following settings:
defCommunity public defSecurityModel tsm defVersion 3 mibdirs /usr/local/share/snmp/mibs mibs +TimesTen-MIB
Note:
Ensure that the TimesTen MIB is added to a location used to find and load MIBs. In this example, the /usr/local/share/snmp/mibs directory is one such location. See TimesTen MIB for where to find the TimesTen MIB.
For more information on the SNMP-related attributes for the
timesten.conf file, see TimesTen Instance
Configuration File in Oracle TimesTen In-Memory Database
Reference.
For more information on the directives for the snmp.conf file, see the man page for snmp.conf.
Example 3-3 Enabling SNMPv1 traps
This example provides snippets of the timesten.conf and snmp.conf files, which showcase samples of the attributes or directives required for TimesTen to generate SNMPv1 traps.
WARNING:
SNMPv1 does not support encryption or authentication. It is highly recommended that you use SNMPv3 over (D)TLS or TLS for TimesTen SNMP traps.
To enable SNMPv1 traps, ensure that the timesten.conf file in your TimesTen instance includes the attributes shown next based on your own environment:
#SNMP traps settings snmp_conf_path=/usr/local/etc/snmp snmp_trap=/usr/local/bin/snmptrap snmp_trap_dests=localhost:9161 myhost:10161 snmp_version=1
Also, ensure that you configure the snmp.conf file for SNMPv1 traps. The file should include at least the following settings:
defCommunity public defVersion 1 mibdirs /usr/local/share/snmp/mibs mibs +TimesTen-MIB
Note:
Ensure that the TimesTen MIB is added to a location used to find and load MIBs. In this example, the /usr/local/share/snmp/mibs directory is one such location. See TimesTen MIB for where to find the TimesTen MIB.
For more information on the SNMP-related attributes for the
timesten.conf file, see TimesTen Instance
Configuration File in Oracle TimesTen In-Memory Database
Reference.
For more information on the directives for the snmp.conf file, see the man page for snmp.conf.
Trap Truncation on Overflow
ttTrapTruncated OID set to 1.
Trapping Out-of-Space Messages
PermWarnThreshold and
TempWarnThreshold attributes.
For example, if the total memory in use for the permanent memory
region surpasses the value set for the PermWarnThreshold
attribute, TimesTen records a message indicating that the permanent memory
region is out of space. Once the used space for the permanent memory region
is once again 10% below the threshold, TimesTen records a second message
indicating that the permanent memory region is no longer low on
space.
When connecting to a database, you can change the out-of-space threshold by setting
the PermWarnThreshold and TempWarnThreshold
attributes. See PermWarnThreshold and TempWarnThreshold in Oracle TimesTen In-Memory Database
Reference.