snmptrapd.conf

configuration file for the Net-SNMP trap daemon. 

File Format


DESCRIPTION

The snmptrapd.conf file is the configuration file(s) which define how the Net-SNMP SNMP trap receiving daemon operates when it receives a trap. These files may contain any of the directives found in the DIRECTIVES section below. This file is not required for the daemon to operate, receive, or report traps. It is used solely as a method of providing extensibility to the trap daemon.


PLEASE READ FIRST

First, make sure you have read the snmp_config reference page that describes how the Net-SNMP configuration files operate, where they are located and how they all work together.


DIRECTIVES

traphandle OID|default PROGRAM [ARGS ...]" 

The traphandle configuration directive configures the snmptrapd program to launch an external program any time it receives a trap matching the OID token. If the OID token is the word default then any trap not matching any other trap handler will call this default one instead. The program is fed details about the trap to its standard input, in the following format, one entry per line:

HOSTNAME 

The name of the host in question that sent the trap, as determined by the gethostbyaddr() function.

IPADDRESS 

The IP address of the host that sent the trap.

VARBINDS 

A list of variable bindings that describe the trap and the variables enclosed in it. The first token on the line, up until the space, is the OID and the remainder of the line is its value. The first OID should be the system.sysUpTime.0 OID, and the second should be the ...snmpTrap.snmpTrapOID.0 OID. The remainder of the OIDs, with the possible exception of the last one, are the variable bindings contained within the trap. For SNMPv1 traps, the very last OID will be the ...snmpTrap.snmpTrapEnterprise OID and its value. Essentially, SNMPv1 traps have been converted to the SNMPv2 trap PDU type by the method described in the SNMPv1/SNMPv2/SNMPv3 coexistence document (RFC2576).

dontRetainLogs true 

Turns off the support for the NOTIFICATION-LOG-MIB and thus doesn't retain logged traps. Normally the snmptrapd program keeps a certain number of traps around in memory so they can be retrieved via querying the nlmLogTable and nlmLogvariableTable tables. See the snmptrapd reference page and the NOTIFICATION-LOG-MIB for details.

createUser username (MD5|SHA) authpassphrase [DES]" 

MD5 and SHA are the authentication types to use, but you must have built the package with openssl installed in order to use SHA. The only privacy protocol currently supported is DES. If the privacy passphrase is not specified, it is assumed to be the same as the authentication passphrase. Note that the users created will be useless unless they are also added to the VACM access control tables described above.

Warning:

The minimum pass phrase length is 8 characters.

SNMPv3 users can be created at runtime using the snmpusm command.

This directive should be placed into the $ROOTDIR/var/snmp/snmptrapd.conf file instead of the other normal locations. The reason is that the information is read from the file and then the line is removed (eliminating the storage of the master password for that user) and replaced with the key that is derived from it. This key is a localized key, so that if it is stolen it can not be used to access other agents. If the password is stolen, however, it can be.

format1 format 

The format used to print a SNMPv1 TRAP message. See snmptrapd for the layout characters available.

format2 format 

The format used to print a SNMPv2 TRAP2 or INFORM message (note that the SNMPv3 protocol uses SNMPv2 style TRAPs and INFORMs).


NOTES

The daemon blocks on the executing traphandle commands. (This should be fixed in the future with an appropriate signal catch and wait() combination).


PORTABILITY

All UNIX systems. Windows 2000. Windows XP. Windows Server 2003. Windows Vista. Windows 7. Windows Server 2008.


AVAILABILITY

MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
snmptrapd

Miscellaneous:
snmp_config, snmp_variables


MKS Toolkit 9.3 Documentation Build 6.