Push UniFi Controller statistics into InfluxDB.
apt install php7.2-cli php7.2-curl composer unzip
git clone https://github.com/level66network/unifi-influxdb.git
cd unifi-influxdb
composer install
Duplicate 'config.php.tpl' as 'config.php' and edit the setting according your needs.
Fetches and pushes the data every 30 seconds.
./unifi-influxdb.php --daemon
Fetches and pushes the data only once.
./unifi-influxdb.php
cp systemd/system/unifi-influxdb.service /etc/systemd/system/unifi-influxdb.service
/bin/systemctl daemon-reload
/bin/systemctl enable unifi-influxdb.service
/bin/systemctl start unifi-influxdb.service