Skip to content

Commit

Permalink
JSON kafka output: fork of JSON output plugin with Kafka output only
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas955 committed Jul 10, 2020
1 parent af9cdf2 commit 8eb4954
Show file tree
Hide file tree
Showing 11 changed files with 2,312 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/output/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
add_subdirectory(dummy)
add_subdirectory(fds)
add_subdirectory(json)
add_subdirectory(json-kafka)
add_subdirectory(timecheck)
add_subdirectory(viewer)
add_subdirectory(ipfix)
42 changes: 42 additions & 0 deletions src/plugins/output/json-kafka/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Create a linkable module
add_library(json-kafka-output MODULE
src/json.cpp
src/Config.cpp
src/Config.hpp
src/Storage.cpp
src/Storage.hpp
src/Kafka.cpp
src/Kafka.hpp
)

find_package(LibRDKafka 0.9.3 REQUIRED)
find_package(ZLIB REQUIRED)

include_directories(
${LIBRDKAFKA_INCLUDE_DIRS} # librdkafka
)
target_link_libraries(json-kafka-output
${LIBRDKAFKA_LIBRARIES}
)

install(
TARGETS json-kafka-output
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixcol2/"
)

if (ENABLE_DOC_MANPAGE)
# Build a manual page
set(SRC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doc/ipfixcol2-json-kafka-output.7.rst")
set(DST_FILE "${CMAKE_CURRENT_BINARY_DIR}/ipfixcol2-json-kafka-output.7")

add_custom_command(TARGET json-kafka-output PRE_BUILD
COMMAND ${RST2MAN_EXECUTABLE} --syntax-highlight=none ${SRC_FILE} ${DST_FILE}
DEPENDS ${SRC_FILE}
VERBATIM
)

install(
FILES "${DST_FILE}"
DESTINATION "${INSTALL_DIR_MAN}/man7"
)
endif()
Loading

0 comments on commit 8eb4954

Please sign in to comment.