snmptt not expanding the mib variables properly
Posted: Thu Feb 05, 2015 1:59 pm
Snmptt is supposed to be able to parse a loaded mib file and replace integer values with their corresponding string values.
I have modified the snmptt.ini file with the proper changes. See snmptt.ini listed below.
I have a mib that has 27 different values for device types, and 9 for device status which makes this important option to get working correctly. My only other option would be to write a script to generate my own trap message to pass off to snmptraphandling.py
Snmptt will properly expand integer values and display the variable information properly for the first trap message received but all subsequent trap messages will always display the same expanded (integer) values.
Example:
sbdJam device type:
1) Mag-card reader
2) Printer
3) Ocr
4) Scanner
For the first trap message received for a sbdJam of 1 for the device type I see in the trap log mag-card reader
When I send any other integer value, I receive the same mag-card reader. Any octetstring values will display properly.
I tried sending the same trap message from a second system and receive the same results. I also tried sending several different trap messages and always the first shows the proper expanded values that correspond to the integer values and any subsequent similar traps with different integer values will always show the original (first) value.
When I restart the snmptt service the first message is parsed and displayed properly, but the same problem persists.
SNMPTT.INI
#
# SNMPTT v1.4beta2 Configuration File
#
# Linux / Unix
#
resolve_value_ip_addresses = 0
net_snmp_perl_enable = 1
net_snmp_perl_cache_enable = 1
net_snmp_perl_best_guess = 0
translate_log_trap_oid = 1
translate_value_oids = 1
translate_enterprise_oid_format = 1
translate_trap_oid_format = 1
translate_varname_oid_format = 1
translate_integers = 1
mibs_environment = ALL
wildcard_expansion_separator = " "
allow_unsafe_regex = 0
remove_backslash_from_quotes = 0
dynamic_nodes = 0
description_mode = 0
description_clean = 1
threads_enable = 1
threads_max = 10
daemon_fork = 1
daemon_uid = snmptt
pid_file = /var/run/snmptt.pid
spool_directory = /var/spool/snmptt/
sleep = 5
I have modified the snmptt.ini file with the proper changes. See snmptt.ini listed below.
I have a mib that has 27 different values for device types, and 9 for device status which makes this important option to get working correctly. My only other option would be to write a script to generate my own trap message to pass off to snmptraphandling.py
Snmptt will properly expand integer values and display the variable information properly for the first trap message received but all subsequent trap messages will always display the same expanded (integer) values.
Example:
sbdJam device type:
1) Mag-card reader
2) Printer
3) Ocr
4) Scanner
For the first trap message received for a sbdJam of 1 for the device type I see in the trap log mag-card reader
When I send any other integer value, I receive the same mag-card reader. Any octetstring values will display properly.
I tried sending the same trap message from a second system and receive the same results. I also tried sending several different trap messages and always the first shows the proper expanded values that correspond to the integer values and any subsequent similar traps with different integer values will always show the original (first) value.
When I restart the snmptt service the first message is parsed and displayed properly, but the same problem persists.
SNMPTT.INI
#
# SNMPTT v1.4beta2 Configuration File
#
# Linux / Unix
#
resolve_value_ip_addresses = 0
net_snmp_perl_enable = 1
net_snmp_perl_cache_enable = 1
net_snmp_perl_best_guess = 0
translate_log_trap_oid = 1
translate_value_oids = 1
translate_enterprise_oid_format = 1
translate_trap_oid_format = 1
translate_varname_oid_format = 1
translate_integers = 1
mibs_environment = ALL
wildcard_expansion_separator = " "
allow_unsafe_regex = 0
remove_backslash_from_quotes = 0
dynamic_nodes = 0
description_mode = 0
description_clean = 1
threads_enable = 1
threads_max = 10
daemon_fork = 1
daemon_uid = snmptt
pid_file = /var/run/snmptt.pid
spool_directory = /var/spool/snmptt/
sleep = 5