PDA

View Full Version : zabbix_trapperd cripples traps


SunFire
09-12-2004, 06:09
hi,

this is the debug output on a fresh installed gentoo linux with net-snmp used as described for receiving traps and pipes it to the snmptrap.sh shellscript to feed the trapperd:

---snip /tmp/zabbix_trapperd.log---
012174:20041208:194137 Got line:snmptraps:snmptraps:host.domain.tld 22 FastEthernet0/21 ethernetCsmacd IF-MIB::linkDown
---snap /tmp/zabbix_trapperd.log---

but in the database it will be saved as:
---snip---
host.domain.tld 22 FastEthernet0/21 ethernetCsmacd IF-MIB
---snap---

so the "::linkDown" part was cut off.

The "problem" ist this line in the zabbix_trapperd.c file:

value_string=(char *)strtok(NULL,":");

I was unable to tell if there was a good reason why you want to read only until the next ":" in the trapstring or if what you realy wanted was to fetch the entire rest of the string? Bug or feature?

Keep up the good work! I only played around with the system for a few hours but what I saw until now is a VERY NICE!

/T

Alexei
09-12-2004, 08:03
I was unable to tell if there was a good reason why you want to read only until the next ":" in the trapstring or if what you realy wanted was to fetch the entire rest of the string? Bug or feature?I'm already aware of the bug, unfortunately it's not fixed yet.

To have a quick workaround, you may enhance the script to convert ':' to some other characters.