https://collectd.org/
The Python plugin embeds a Python interpreter into Collectd and exposes the application programming interface (API) to Python-scripts.