-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with trap_in.php #12
Comments
Hi, So your snmptrapd.conf should contain : traphandle default < php binary > < trap_in with path > See doc : https://github.com/patrickpr/trapdirector/blob/master/docs/01-install.md#snmptrapd-configuration If you can't make it work, send me your snmptrapd.conf so I have a look. /Patrick |
Hi, system is raspbian buster. |
Hi, There should be php binary with path instead of '-a' : can you send me the options you used with the script ? |
Hi, i already replaced it and it worked :) i used the command line provided in the configuration section |
Hi, Because it seems that this pre-defined constant (PHP_BINARY) is empty in your case. |
Hi, this is the result. As said, i'm using raspbian buster with default packages sources.
|
Main question
I can't seem to get traps into icinga2. I believe I have everything setup correctly, and using the following command:
sudo snmptrapd -D -f -Loe
I was able to see that traps are being received:
2019-10-01 12:17:24 ip-x-x-x-x [x.x.x.x] (via UDP: [x.x.x.x]:xxxxx->[x.x.x.x]:xxx) TRAP, SNMP v1, community public SNMPv2-SMI::mib-2.33.2 Enterprise Specific Trap (4) Uptime: 3:43:47.45 SNMPv2-SMI::mib-2.33.1.6.2.1.1.7 = INTEGER: 7 SNMPv2-SMI::mib-2.33.1.6.2.1.2.7 = STRING: ".1.3.6.1.2.1.33.1.6.3.2"
However, nothing is being shown in trapdirector in icingaweb2. From running the command above, I believe I have traced it down to the following:
trace: run_shell_command(): mibgroup/utilities/execute.c, 60: run:shell: running '/usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php' /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: 1: /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: cannot open ?php: No such file /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: 3: /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: //: Permission denied /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: 4: /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php: Syntax error: "(" unexpected
I thought it was a permissions thing, so I tried to CHMOD the trap_in.php file so ther permissions were as follows:
-rwxrwxrwx 1 root root 596 Sep 30 15:27 trap_in.php
But no luck.
Any suggestions?
Purpose
Receive traps in icingaweb2 trapdirector.
Your Environment:
If related to the question in any way :
company | 1.0.0
director | 1.6.2
doc | 2.7.1
idoreports | 0.9.1
ipl | v0.3.0
map | 1.1.0
monitoring | 2.7.1
reporting | 0.9.2
theme-dark | 0.0.1
trapdirector | 1.0.2
icinga2 --version
):icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.5-1)
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2019-09-16T12:58:48
PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.19-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies
The text was updated successfully, but these errors were encountered: