Python module for Accounting

Alan DeKok aland at deployingradius.com
Thu Feb 13 12:07:24 UTC 2025


On Feb 13, 2025, at 4:08 AM, Erdal Emlik via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> I’m trying to send accounting logs to Kafka using the FreeRADIUS Python module (example.py).

  IIRC, there's a third-party "rlm_kafka" on github somewhere.  From what I remember, it didn't look too bad.

> I’ve implemented a callback and exception handling, but when I manually stop the Kafka service, I can’t catch any errors—neither in the callback nor in the exception block.

  That's really a python question.  FreeRADIUS just sets up the Python interpreter, and calls it.  Everything after that is Python magic, and we don't know anything about it.

> I can see logs 1-2-3-5, but my goal is to detect when a message fails to send and store it for later retries. However, I’m not sure if I’m on the right path.

  That's a question for the Kafka Python API.

  Alan DeKok.



More information about the Freeradius-Users mailing list