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
snmptt not expanding the mib variables properly
Re: snmptt not expanding the mib variables properly
It looks like there are some settings missing in your INI file.
Did you go through these instructions for Integrating SNMP Traps With Nagios XI?
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Did you go through these instructions for Integrating SNMP Traps With Nagios XI?
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: snmptt not expanding the mib variables properly
Can you also provide us with your snmptt file which contains the defined trap EVENTs
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt not expanding the mib variables properly
Here is the snmptt.ini file along with one of the snmptt.conf files.
I also added two of the mib files for our systems.
I also added two of the mib files for our systems.
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: snmptt not expanding the mib variables properly
Can you please post:
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.conf.sita
/etc/snmp/snmptt.conf.hp
/etc/snmp/snmptt.conf.vmware
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.conf.sita
/etc/snmp/snmptt.conf.hp
/etc/snmp/snmptt.conf.vmware
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt not expanding the mib variables properly
Here are the files.
You do not have the required permissions to view the files attached to this post.
Re: snmptt not expanding the mib variables properly
Here is the last file
You do not have the required permissions to view the files attached to this post.
Re: snmptt not expanding the mib variables properly
Would it be possible to move this discussion to the Nagiox XI customer support forum?
Thanks,
Thanks,
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: snmptt not expanding the mib variables properly
I think I know what is going on but I need to gather some more information from you.
I'll need to get an admin to move this to the customer support forum.
Can you show some actual messages that provide examples of this.tbyrne wrote: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.
Same again here, provide actual log message examples.tbyrne wrote: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'll need to get an admin to move this to the customer support forum.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: snmptt not expanding the mib variables properly
OK, I setup only the one mib file sita_pm_sbd.mib and modified only the one trap message sbdBaggage. I figure this would make it easier to troubleshoot.
I uploaded in a zip snmptt.conf, snmptt.ini, snmptt.log, snmpttsystem.log, and snmpd.conf
here is the line I modified
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "sbdBagageStatus: device name - $1, Connection status - $2, bagage status - $3 SQNI Raw: $4"
I have determined that the sting values will always display properly, the problem is with integer values being expaned(substituted) for the mib text values.
$1 sbdDeviceName stirng
$2 sbdConnStatus options 1) unknown, 2)unreachable, 3) online, 4) offline, 5) power-Off, 6) maintenance-mode
$3 sbdBaggageStatus options 1) unknown, 2) normal, 3) technical-error, 4) unknown-error 5) intrusion-detected ..... there are 12 total options here..
$4 sbdSQNIRaw string
I restarted snmptt service
first trap of 1) test_device, 2) 1, 3) 1, 4) blank
second trap 1) test_device, 2) 2, 3) 2, 4) blank no values
third trap 1) test_device, 2) 3, 3) 3, 4) blank no values
restarted snmptt service
fourth trap 1) test_device, 2) 4, 3) 4, 4) blank no values
fifth trap 1) test_device, 2) 5, 3) 5, 4) blank no values
restarted snmptt service
sixth trap 1) test_device, 2) 4, 3) 4, 4) blank no values
I uploaded in a zip snmptt.conf, snmptt.ini, snmptt.log, snmpttsystem.log, and snmpd.conf
here is the line I modified
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "sbdBagageStatus: device name - $1, Connection status - $2, bagage status - $3 SQNI Raw: $4"
I have determined that the sting values will always display properly, the problem is with integer values being expaned(substituted) for the mib text values.
$1 sbdDeviceName stirng
$2 sbdConnStatus options 1) unknown, 2)unreachable, 3) online, 4) offline, 5) power-Off, 6) maintenance-mode
$3 sbdBaggageStatus options 1) unknown, 2) normal, 3) technical-error, 4) unknown-error 5) intrusion-detected ..... there are 12 total options here..
$4 sbdSQNIRaw string
I restarted snmptt service
first trap of 1) test_device, 2) 1, 3) 1, 4) blank
second trap 1) test_device, 2) 2, 3) 2, 4) blank no values
third trap 1) test_device, 2) 3, 3) 3, 4) blank no values
restarted snmptt service
fourth trap 1) test_device, 2) 4, 3) 4, 4) blank no values
fifth trap 1) test_device, 2) 5, 3) 5, 4) blank no values
restarted snmptt service
sixth trap 1) test_device, 2) 4, 3) 4, 4) blank no values
You do not have the required permissions to view the files attached to this post.