summaryrefslogtreecommitdiff
path: root/examples/c-collectd
Commit message (Collapse)AuthorAge
* Some small fixes.Toni Uhlig2024-08-09
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed missing statistics updating for unknown mapping keys in collectd/influxd.Toni Uhlig2024-02-20
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* bump libnDPI to 4543385d107fcc5a7e8632e35d9a60bcc40cb4f4Toni Uhlig2024-02-06
| | | | | | * incorporated API changes from nDPI Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed invalid flow risk aggregation in collectd/influxd examples.Toni Uhlig2024-01-06
| | | | | | | | | * CI: build single nDPId executable with `-Wall -Wextra -std=gnu99` * fixed missing error events in influxd example * added additional test cases for collectd * extended grafana dashboard Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved collectd example.Toni Uhlig2024-01-05
| | | | | | | * similiar behavior to influxd example * gauges and counters are now handled properly Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Replaced ambiguous naming of "JSON string" to more accurate "JSON message".Toni Uhlig2023-12-04
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* c-collectd: Fixed missing escape char.Toni Uhlig2023-12-01
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Add DBUS suspicious flow event notification daemon.Toni Uhlig2023-11-03
| | | | | | * nDPIsrvd.h: support for closing/resetting a nDPIsrvd_socket (required for a reconnect) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fix issues detected by SonarCloud.Toni Uhlig2023-10-05
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fix CI.Toni Uhlig2023-09-10
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Tiny improvments.Toni Uhlig2023-08-02
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* bump libnDPI to 8ea0eaa0d0c4a3be05f67ef7fa1d22c2579cf7d1Toni Uhlig2023-06-12
| | | | | | | | | | * added build fix for Gitlab CI * added friendly C11 check * set required libnDPI versionto 4.7 (ArchLinux ndpi-git sets version to 4.7, which is not released yet) * reduced sklearn-random-forest memory consumption by adjusting min. sample leaf Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved collectd risk processing to be in sync with libnDPI risks.Toni Uhlig2023-01-11
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Add collectd statistics diff test.Toni Uhlig2022-12-06
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved nDPIsrvd-collectd statistics.Toni Uhlig2022-10-31
| | | | | | * Improved RRD-Graph generation script and static WWW html files. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Small fixes.lns2022-10-01
| | | | Signed-off-by: lns <matzeton@googlemail.com>
* c-analysed: improved feature extraction from "analyse" eventsToni Uhlig2022-10-01
| | | | | | | | * c-captured: update detected risks on "detection-update" events * c-collectd: added missing flow breed * c-collectd: PUTVAL macros are more flexible now Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Refactored client distributor C API.Toni Uhlig2022-09-25
| | | | | | | | | | | * Still not perfect, but the code before was not even able to deal with JSON arrays. Use common "speaking" function names for all functions in nDPIsrvd.h * Provide a more or less generic and easy extendable JSON walk function. * Modified C examples to align with the changed C API. * c-collectd: Reduced lot's of code duplication by providing mapping tables. * nDPId: IAT array requires one slot less (first packet has always an IAT of 0). Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd.h: Fixed bug during token parsing/hashing. Do not hash array contents.Toni Uhlig2022-09-23
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved flown analyse event:Toni Uhlig2022-09-22
| | | | | | | | * store packet directions * merged direction based IATs * merged direction based PKTLENs Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPId: Reduced flow-updates for TCP flows to 1/4 of the timeout value.Toni Uhlig2022-09-19
| | | | | | | | | | | | * nDPId: Fixed broken validation tests. * nDPId: Removed TICK_RESOLUTION, not required anymore. * c-collectd: Improved total layer4 payload calculation/update handling. * c-collectd: Updated RRD Graph script according to total layer4 payload changes. * py-flow-info.py: Fixed several bugs and syntax errors. * Python scripts: Added dirname(argv[0]) as search path for nDPIsrvd.py. * nDPIsrvd&nDPId-test: Fixed missing EPOLLERR check. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd-collectd: Stdout should be unbuffered.Toni Uhlig2022-09-12
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd-collectd: RRD Graph generation script and a basic static HTML5 ↵Toni Uhlig2022-09-12
| | | | | | website for viewing the generated image files. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Disable timestamp generation in nDPIsrvd-collectd as default.Toni Uhlig2022-09-04
| | | | | | * collectd's rrdtool write plugin does silently fail with those ones (dunno why) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Split `*_l4_payload_len' into `*_src_l4_payload_len' and `*_dst_l4_payload_len'.Toni Uhlig2022-08-15
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* c-collectd: fixed incorrect PUTVALToni Uhlig2022-08-15
| | | | | | * get rid of types.db Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* c-collectd: fixed possible undefined behaviorToni Uhlig2022-07-14
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* CMake: do not add /usr/include/ndpi to include dirs if BUILD_NDPI or ↵lns2022-06-10
| | | | | | | | | STATIC_LIBNDPI_INSTALLDIR used. * c-collectd: fixed memory leak on failure * py-flow-info.py: fancy spinners and stats counting improved Signed-off-by: lns <matzeton@googlemail.com>
* nDPIsrvd.(h|py): Added socket read/recv timeout.lns2022-04-17
| | | | | | * nDPIsrvd.h: support for O_NONBLOCK nDPIsrvd_socket Signed-off-by: lns <matzeton@googlemail.com>
* Reworked nDPIsrvd.h C-API.Toni Uhlig2022-03-21
| | | | | | | | | | | | * nDPIsrvd.h: Provide nDPId thread storage. * nDPIsrvd.py: Fixed instance cleanup bug. * nDPIsrvd.h: Support for instance/thread user data and cleanup callback. * nDPIsrvd.h: Most recent flow time stored in thread ht instead of instance ht. * nDPId: Moved flow logger out the memory profilier into SIGUSR1 signal handling. * nDPId: Added signal fd to be usable within epoll's event handling (live-capture only!) * nDPId: Added information about ZLib compressions to daemon status/shutdown events. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Major nDPId extension. Sorry for the huge commit.Toni Uhlig2022-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - nDPId: fixed invalid IP4/IP6 tuple compare - nDPIsrvd: fixed caching issue (finally) - added tiny c example (can be used to check flow manager sanity) - c-captured: use flow_last_seen timestamp from `struct nDPIsrvd_flow` - README.md update: added example JSON sequence - nDPId: added new flow event `update` necessary for correct timeout handling (and other future use-cases) - nDPIsrvd.h and nDPIsrvd.py: switched to an instance (consists of an alias/source tuple) based flow manager - every flow related event **must** now serialize `alias`, `source`, `flow_id`, `flow_last_seen` and `flow_idle_time` to make the timeout handling and verification process work correctly - nDPIsrvd.h: ability to profile any dynamic memory (de-)allocation - nDPIsrvd.py: removed PcapPacket class (unused) - py-flow-dashboard and py-flow-multiprocess: fixed race condition - py-flow-info: print statusbar with probably useful information - nDPId/nDPIsrvd.h: switched from packet-flow only timestamps (`pkt_*sec`) to a generic flow event timestamp `ts_msec` - nDPId-test: added additional checks - nDPId: increased ICMP flow timeout - nDPId: using event based i/o if capturing packets from a device - nDPIsrvd: fixed memory leak on shutdown if remote descriptors were still connected Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* bump libnDPI to 6b7e5fa8d251f11c1bae16ea892a43a92b098480Toni Uhlig2021-08-03
| | | | | | | | * fixed linking issue by using CMake to check if explicit link against libm required * make nDPIsrvd collectd exit if parent pid changed, meaning that collectd died somehow * nDPId-test restores SIGPIPE to the default handler (termination), so abnormal connection drop's do now have consequences Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Unified IO buffer mgmt.Toni Uhlig2021-06-07
| | | | | | | * c-collectd gives the user control over collectd-exec instance name * added missing collectd type `flow_l4_icmp_count` Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPId-test: added JSON distribution + JSON parsing (Multithreaded design ↵Toni Uhlig2021-04-09
| | | | | | | | | | | | | | re-using most of nDPId/nDPIsrvd core) * improved Makefile.old install targets * splitted nDPIsrvd_parse into nDPIsrvd_parse_line and nDPIsrvd_parse_all for the sake of readability * minor Python script improvments (check for nDPIsrvd.py on multiple locations, may be superseeded by setuptools in the future) * some paths needs to be absolute (chdir() during daemonize) and therefor additional checks introduced * test run script checks and fails if certain files are are missing (PCAP file <=> result output file) * removed not very useful "internal format error" JSON serialization if a BUG for same exists * fixed invalid l4 type statistics counters for nDPIsrvd-collectd Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd collectd-exec overhaul.Toni Uhlig2021-03-15
| | | | | | | * Install targets updated. * Removed nDPIsrvd.h token validation function (done automatically by token_get). Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed collectd-exec issues.Toni Uhlig2021-03-12
| | | | | | * Added collectd example config and types.db Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added basic collectd-exec example.Toni Uhlig2021-03-10
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>