Skip to content

Commit 8eb4954

Browse files
committed
JSON kafka output: fork of JSON output plugin with Kafka output only
1 parent af9cdf2 commit 8eb4954

File tree

11 files changed

+2312
-0
lines changed

11 files changed

+2312
-0
lines changed

src/plugins/output/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
add_subdirectory(dummy)
33
add_subdirectory(fds)
44
add_subdirectory(json)
5+
add_subdirectory(json-kafka)
56
add_subdirectory(timecheck)
67
add_subdirectory(viewer)
78
add_subdirectory(ipfix)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Create a linkable module
2+
add_library(json-kafka-output MODULE
3+
src/json.cpp
4+
src/Config.cpp
5+
src/Config.hpp
6+
src/Storage.cpp
7+
src/Storage.hpp
8+
src/Kafka.cpp
9+
src/Kafka.hpp
10+
)
11+
12+
find_package(LibRDKafka 0.9.3 REQUIRED)
13+
find_package(ZLIB REQUIRED)
14+
15+
include_directories(
16+
${LIBRDKAFKA_INCLUDE_DIRS} # librdkafka
17+
)
18+
target_link_libraries(json-kafka-output
19+
${LIBRDKAFKA_LIBRARIES}
20+
)
21+
22+
install(
23+
TARGETS json-kafka-output
24+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixcol2/"
25+
)
26+
27+
if (ENABLE_DOC_MANPAGE)
28+
# Build a manual page
29+
set(SRC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doc/ipfixcol2-json-kafka-output.7.rst")
30+
set(DST_FILE "${CMAKE_CURRENT_BINARY_DIR}/ipfixcol2-json-kafka-output.7")
31+
32+
add_custom_command(TARGET json-kafka-output PRE_BUILD
33+
COMMAND ${RST2MAN_EXECUTABLE} --syntax-highlight=none ${SRC_FILE} ${DST_FILE}
34+
DEPENDS ${SRC_FILE}
35+
VERBATIM
36+
)
37+
38+
install(
39+
FILES "${DST_FILE}"
40+
DESTINATION "${INSTALL_DIR_MAN}/man7"
41+
)
42+
endif()

0 commit comments

Comments
 (0)