Use Flux inside another application

I work on LibreNMS and am looking for a generic way to query data for graph and alert generation.

Would there be a way I could use Flux for this? What would it take to implement? Would it require an InfluxDB server even if the datasource isn’t InfluxDB? LibreNMS is mostly written in PHP.