Module: check_mk
Branch: master
Commit: 7c86ff31db9bd89d61b579c556d0925088d7863f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c86ff31db9bd8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 12 09:15:05 2013 +0200
Fixed port number mixup
---
mkeventd/bin/mkeventd | 13 +++++++------
mkeventd/src/mkeventd_open514.c | 2 +-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 059d30d..092ba0e 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -804,8 +804,8 @@ class EventServer:
else:
self._snmptrap = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self._snmptrap.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- self._snmptrap.bind(("0.0.0.0", 612))
- log("Opened builtin snmptrap server on UDP port 612")
+ self._snmptrap.bind(("0.0.0.0", 162))
+ log("Opened builtin snmptrap server on UDP port 162")
except Exception, e:
raise Exception("Cannot start builtin snmptrap server: %s" %
e)
@@ -1070,10 +1070,9 @@ class EventServer:
if self._syslog != None and self._syslog.fileno() in readable:
self.process_raw_lines(self._syslog.recv(4096))
- # Accept
-
# Read events from builtin snmptrap server
if self._snmptrap != None and self._snmptrap.fileno() in readable:
+ print 'got trap data'
try:
self.process_raw_data(self.process_snmptrap,
self._snmptrap.recvfrom(65535))
except Exception, e:
@@ -2974,10 +2973,12 @@ def usage():
-E, --eventsocket P Path to unix socket for receiving events (optional)
-L, --livestatus P Path to livestatus socket of monitoring core (optional)
-P, --pipe P Path to pipe for receiving events
- --syslog Enable builtin syslog server
+ --syslog Enable builtin UDP syslog server
--syslog-fd FD Do not open UDP port 514, but inherit it via this FD
+ --syslog-tcp Enable builtin TCP syslog server
+ --syslog-tcp-fd FD Do not open TCP port 514, but inherit it via this FD
--snmptrap Enable builtin snmptrap server
- --snmptrap-fd FD Do not open UDP port 612, but inherit it via this FD
+ --snmptrap-fd FD Do not open UDP port 162, but inherit it via this FD
--statedir D Path to directory for saving status
--logdir D Path to directory where mkeventd.log is created
-p, --pidfile Path to PID file
diff --git a/mkeventd/src/mkeventd_open514.c b/mkeventd/src/mkeventd_open514.c
index 0402a0a..fa53054 100644
--- a/mkeventd/src/mkeventd_open514.c
+++ b/mkeventd/src/mkeventd_open514.c
@@ -39,7 +39,7 @@
#include <stdio.h>
#define SYSLOG_PORT 514
-#define SNMPTRAP_PORT 612
+#define SNMPTRAP_PORT 162
#define PROGRAM "mkeventd"