Skip to content
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

Gelf event handler #1788

Merged
merged 52 commits into from
May 25, 2020
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d00d5a7
initial commit
Sep 18, 2019
61c5378
again :D
Nov 29, 2019
495474a
sample config file
Nov 29, 2019
8f6b68e
test
Dec 4, 2019
7344ea8
working UDP chunking
Dec 4, 2019
99a7e28
Merge pull request #4 from mirkobrankovic/feature/gelf-udp-support
do-not-set-2fa Dec 4, 2019
e85064f
desc + exceeding limit of chunks
Dec 4, 2019
2e1c930
first try
Dec 4, 2019
b5a5358
Pretty printed
Dec 12, 2019
493e701
Final working version TCP/UDP(chunking and compressing)
Dec 12, 2019
ce8420a
Merge branch 'master' into feature/gelf
do-not-set-2fa Jan 25, 2020
f7ddbc2
Merge pull request #6 from mirkobrankovic/feature/gelf
do-not-set-2fa Jan 25, 2020
f31d8b5
Fixing comments
Feb 4, 2020
2b3a909
Merge branch 'master' into feature/gelf-compression
do-not-set-2fa Feb 4, 2020
144fbed
Merge pull request #7 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 4, 2020
b7b273d
review part 2
Feb 6, 2020
6f7604d
resolving comments
Feb 17, 2020
a5d9940
new line
Feb 17, 2020
a24261d
no need for new line :/
Feb 17, 2020
5fa8154
Merge pull request #8 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 17, 2020
fd434e4
\detail
Feb 17, 2020
3a68101
Merge pull request #9 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 17, 2020
f5665ff
First connect then start thread
Feb 17, 2020
972caa3
Merge pull request #10 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 17, 2020
f10e3df
bug for rest of events, only first was ok
Feb 18, 2020
ffd28d9
ful_message should contain full event, so that handle_id or session_i…
Feb 18, 2020
17e2f20
Merge pull request #11 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 18, 2020
c910819
Code style and removals
Feb 26, 2020
90a4097
Merge pull request #12 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 26, 2020
067bef4
enum socket_type
Feb 28, 2020
707ff34
Merge pull request #13 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Feb 28, 2020
b9544bf
Merge branch 'master' into feature/gelf-compression
Apr 1, 2020
69c9794
improved description and formatting
Apr 1, 2020
8bfbcd9
Merge pull request #14 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 1, 2020
c53f265
remove +
Apr 1, 2020
c1439a9
Merge pull request #15 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 1, 2020
82b7f18
easy ones
Apr 8, 2020
2ac064e
Merge pull request #16 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 8, 2020
a5ed9a9
refactored TCP
Apr 24, 2020
cc9d086
Merge branch 'master' into feature/gelf-compression
Apr 24, 2020
9ca5a67
Merge pull request #17 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 24, 2020
c032a82
atio was wrong
Apr 24, 2020
0d5815a
=/==
Apr 24, 2020
7f39286
Merge pull request #18 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 24, 2020
58935bb
fix style
Apr 24, 2020
befd071
compress TCP check
Apr 24, 2020
1d00575
Merge pull request #19 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa Apr 24, 2020
4142b52
tcp send in while
Apr 24, 2020
e10e16b
Make sure all bytes are sent
May 1, 2020
6022185
Merge pull request #20 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa May 1, 2020
b3a55aa
resolving comments
May 25, 2020
ef0d776
Merge pull request #21 from mirkobrankovic/feature/gelf-compression
do-not-set-2fa May 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,16 @@ conf_DATA += conf/janus.eventhandler.nanomsgevh.jcfg.sample
EXTRA_DIST += conf/janus.eventhandler.nanomsgevh.jcfg.sample
endif

if ENABLE_GELFEVH
event_LTLIBRARIES += events/libjanus_gelfevh.la
events_libjanus_gelfevh_la_SOURCES = events/janus_gelfevh.c
events_libjanus_gelfevh_la_CFLAGS = $(events_cflags)
events_libjanus_gelfevh_la_LDFLAGS = $(events_ldflags)
events_libjanus_gelfevh_la_LIBADD = $(events_libadd)
conf_DATA += conf/janus.eventhandler.gelfevh.jcfg.sample
EXTRA_DIST += conf/janus.eventhandler.gelfevh.jcfg.sample
endif

##
# Loggers
##
Expand Down
21 changes: 21 additions & 0 deletions conf/janus.eventhandler.gelfevh.jcfg.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This configures the GELF event handler. Appending necessary headers
# and sending messages via TCP or UDP

general: {
enabled = false # By default the module is not enabled
events = "all"
# Comma separated list of the events mask you're interested
# in. Valid values are none, sessions, handles, jsep, webrtc,
# media, plugins, transports, core, external and all. By
# default we subscribe to everything (all)

backend = "your.gralog.server"
port = "12201"
protocol = "tcp" # tcp or udp transport type
max_message_len = 1024 # Note that we add 12 bytes of headers + standard UDP headers (8 bytes)
# when calculating packet size based on MTU

#compress = true # Optionally, only for UDP transport, JSON messages can be compressed using zlib
#compression = 9 # In case, you can specify the compression factor, where 1 is
# the fastest (low compression), and 9 gives the best compression
}
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ AC_ARG_ENABLE([all-handlers],
[enable_mqtt_event_handler=no])
AS_IF([test "x$enable_nanomsg_event_handler" != "xyes"],
[enable_nanomsg_event_handler=no])
AS_IF([test "x$enable_gelf_event_handler" != "xyes"],
[enable_gelf_event_handler=no])
],
[])

Expand Down Expand Up @@ -308,6 +310,13 @@ AC_ARG_ENABLE([nanomsg-event-handler],
[enable_nanomsg_event_handler=no])],
[enable_nanomsg_event_handler=maybe])

AC_ARG_ENABLE([gelf-event-handler],
[AS_HELP_STRING([--disable-gelf-event-handler],
[Disable gelf event handler ])],
[AS_IF([test "x$enable_gelf_event_handler" != "xyes"],
[enable_gelf_event_handler=no])],
[enable_gelf_event_handler=maybe])

AC_ARG_ENABLE([json-logger],
[AS_HELP_STRING([--enable-json-logger],
[Enable external JSON file logger ])],
Expand Down Expand Up @@ -621,6 +630,7 @@ AM_CONDITIONAL([ENABLE_MQTT], [test "x$enable_mqtt" = "xyes"])
AM_CONDITIONAL([ENABLE_MQTTEVH], [test "x$enable_mqtt_event_handler" = "xyes"])
AM_CONDITIONAL([ENABLE_NANOMSG], [test "x$enable_nanomsg" = "xyes"])
AM_CONDITIONAL([ENABLE_NANOMSGEVH], [test "x$enable_nanomsg_event_handler" = "xyes"])
AM_CONDITIONAL([ENABLE_GELFEVH], [test "x$enable_gelf_event_handler" = "xyes"])
mirkobrankovic marked this conversation as resolved.
Show resolved Hide resolved

AM_CONDITIONAL([ENABLE_JSONLOGGER], [test "x$enable_json_logger" = "xyes"])

Expand Down Expand Up @@ -1040,6 +1050,9 @@ AM_COND_IF([ENABLE_MQTTEVH],
AM_COND_IF([ENABLE_NANOMSGEVH],
[echo " Nanomsg event handler: yes"],
[echo " Nanomsg event handler: no"])
AM_COND_IF([ENABLE_GELFEVH],
[echo " GELF event handler: yes"],
[echo " GELF event handler: no"])
echo "External loggers:"
AM_COND_IF([ENABLE_JSONLOGGER],
[echo " JSON file logger: yes"],
Expand Down
Loading