This file is indexed.

/etc/snmp/snmptrapfmt.conf is in snmptrapfmt 1.14+nmu1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -----------------------------------------------------------------------------
# Configuration file for snmptrapfmt-1.0
#
# Comment lines start with the character '#'
# Blank lines are ignored
#
# In order to configure the log output, use the following keywords.
# -----------------------------------------------------------------------------


# - SUBST=\a\b\
#   substitute char 'a' with 'b' in variable values
#   Default: \;\ \
SUBST=\#\ \

# NOTE: The OID Format has to be set in the /etc/snmp/snmp.conf. 
#       See SNMP.CONF(5). It is valid for all snmp programs of package SNMPD.
#       You can specify it with:  printNumericOids (1|yes|true|0|no|false) 
#
#  snmptrapfmt uses it in formats $e $*

# NODEFMT=ip | fqdn | name
#   print nodenames as IP address (ip), as fully qualified domain name (fqdn)
#   or in the short form (name);
#   used in formats $A $R $r $*
#   Default: fqdn
NODEFMT=ip

# VARFMT="format string for variables"
#   specify the output of variables when using the '$*' format specifier
#   in the logfile format;
#   special chars recognized:
#    %s ... sequence number of the variable
#    %n ... the name of the variable (see OIDFMT)
#    %t ... the type of the variable
#    %v ... the value of the variable
#   used in format $*
#   Default: ";[%s] %n (%t) : %v"  
#VARFMT="\n\t[%s] %n (%t) : %v"
VARFMT="#[%s] %n (%t) : %v" 

# LOGFMT="format string for logfile entry"
#   specify the output of the logfile entry;
#   special char recognized:
#    \n  ... newline
#    \r  ... carriage return
#    \t  ... horizontal tab
#    \\  ... backslash
#    $#  ... number of variables in the trap
#    $*  ... print all variables of the trap as specified in VARFMT
#    $x  ... date the trap was received (YYYYMMDD.HHMMSS)
#    $r  ... the implied source of the trap (agent address) (see NODEFMT)
#    $R  ... the true source of the trap (via transport layer) (see NODEFMT)
#    $$  ... the character '$'
#    $e  ... the enterprise of the trap as specified in OIDFMT
#    $A  ... the trap agent address as specified in NODEFMT
#    $G  ... the trap generic number
#    $S  ... the trap specific number
#    $T  ... the trap's sysUpTime timestamp (in seconds)
#    ordinary characters represent themselfes
#   Default: "$x;$A;$e;$G;$S$*"
#LOGFMT="\n$$x=$x\n$$r=$r\n$$R=$R\n$$e=$e\n$$A=$A\n$$G=$G\n$$S=$S\n$$T=$T\n$$#=$#$*"
LOGFMT="$x#$A#$e#$G#$S#$T$*"

# LOGFILE="path to logfile"
#   specify the pathname of the logfile; if none or the empty string "" is
#   given, use the syslog() mechanism to log the traps
#   Default: ""
LOGFILE="/var/log/snmptrapfmt.log"