-
Type:
Incident report
-
Resolution: Won't fix
-
Priority:
Trivial
-
None
-
Affects Version/s: 6.0.0beta3
-
Component/s: None
-
None
Steps to reproduce:
- Download script from offcial repo
- execute `perl zabbix_trap_receiver.pl`
Result:
The execution will fail with the following error:
$ perl zabbix_trap_receiver.pl Undefined subroutine &NetSNMP::TrapReceiver::register called at zabbix_trap_receiver.pl line 112. $ echo $? 255
Expected:
The script should display "Loaded Zabbix SNMP trap receiver"
Resolution:
To resolve the issue, just `use` the proper module
--- zabbix_trap_receiver.pl 2022-01-20 08:04:53.009371733 +0000
+++ zabbix_trap_receiver_fixed.pl 2022-01-20 08:09:11.914492493 +0000
@@ -56,6 +56,7 @@ use Fcntl qw(O_WRONLY O_APPEND O_CREAT);
use POSIX qw(strftime);
+use NetSNMP::TrapReceiver; sub zabbix_receiver
{