Bandwidthd with PostgreSQL
-
pfSense 2.2.4-RELEASE.
How should I install Bandwidth with PostgreSQL support?
I've followed notes: installed PostgreSQL server, filled up login, password, database, server, copied PHP files to /usr/local/www/bandwidthd.
Then I opened Diagnostic -> Bandwidthd and got this error:
Call to undefined function pg_pconnect() in /usr/pbi/bandwidthd-amd64/local/bandwidthd/htdocs/include.php on line 47
There's no PostgreSQL extension:
ls -l /usr/local/lib/php/20121212/ total 3420 -r-xr-xr-x 1 root wheel 159544 Jul 26 03:21 apc.so -r-xr-xr-x 1 root wheel 37912 Jul 26 03:21 bcmath.so -r-xr-xr-x 1 root wheel 21816 Jul 26 03:21 bz2.so -r-xr-xr-x 1 root wheel 13200 Jul 26 03:21 ctype.so -r-xr-xr-x 1 root wheel 83072 Jul 26 03:21 curl.so -r-xr-xr-x 1 root wheel 184176 Jul 26 03:21 dom.so -r-xr-xr-x 1 root wheel 42152 Jul 26 03:21 filter.so -r-xr-xr-x 1 root wheel 12600 Jul 26 03:21 gettext.so -r-xr-xr-x 1 root wheel 164856 Jul 26 03:21 hash.so -r-xr-xr-x 1 root wheel 38240 Jul 26 03:21 json.so -r-xr-xr-x 1 root wheel 56872 Jul 26 03:21 ldap.so -r-xr-xr-x 1 root wheel 1031448 Jul 26 03:21 mbstring.so -r-xr-xr-x 1 root wheel 42608 Jul 26 03:21 mcrypt.so -r-xr-xr-x 1 root wheel 49600 Jul 26 03:21 mysql.so -r-xr-xr-x 1 root wheel 129824 Jul 26 03:21 openssl.so -r-xr-xr-x 1 root wheel 30272 Jul 26 03:21 pcntl.so -r-xr-xr-x 1 root wheel 102120 Jul 26 03:21 pdo.so -r-xr-xr-x 1 root wheel 25200 Jul 26 03:21 pdo_sqlite.so -r-xr-xr-x 1 root wheel 54312 Jul 26 03:21 pfSense.so -r-xr-xr-x 1 root wheel 28904 Jul 26 03:21 posix.so -r-xr-xr-x 1 root wheel 41552 Jul 26 03:21 radius.so -r-xr-xr-x 1 root wheel 29920 Jul 26 03:21 readline.so -r-xr-xr-x 1 root wheel 76680 Jul 26 03:21 session.so -r-xr-xr-x 1 root wheel 12040 Jul 26 03:21 shmop.so -r-xr-xr-x 1 root wheel 54720 Jul 26 03:21 simplexml.so -r-xr-xr-x 1 root wheel 83768 Jul 26 03:21 sockets.so -r-xr-xr-x 1 root wheel 45384 Jul 26 03:21 sqlite3.so -r-xr-xr-x 1 root wheel 67432 Jul 26 03:21 ssh2.so -r-xr-xr-x 1 root wheel 144160 Jul 26 03:21 suhosin.so -r-xr-xr-x 1 root wheel 16600 Jul 26 03:21 sysvmsg.so -r-xr-xr-x 1 root wheel 9128 Jul 26 03:21 sysvsem.so -r-xr-xr-x 1 root wheel 12480 Jul 26 03:21 sysvshm.so -r-xr-xr-x 1 root wheel 18160 Jul 26 03:21 tokenizer.so -r-xr-xr-x 1 root wheel 197552 Jul 26 03:21 xdebug.so -r-xr-xr-x 1 root wheel 52984 Jul 26 03:21 xml.so -r-xr-xr-x 1 root wheel 34552 Jul 26 03:21 xmlreader.so -r-xr-xr-x 1 root wheel 45120 Jul 26 03:21 xmlwriter.so -r-xr-xr-x 1 root wheel 35888 Jul 26 03:21 zlib.so -r-xr-xr-x 1 root wheel 73160 Jul 26 03:21 zmq.so
I don't want to use pkg to install php55-pqsql because it'd mess up with php bundled with pfSense installation (which is PHP 5.5.27 (cgi-fcgi) (built: Jul 13 2015 19:15:15)).
#pkg install php55-pgsql Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. The following 3 package(s) will be affected (of 0 checked): New packages to be INSTALLED: php55-pgsql: 5.5.29 php55: 5.5.29 postgresql93-client: 9.3.9 The process will require 25 MiB more space. 4 MiB to be downloaded.
-
Where did you put the PostgreSQL server?
It reads like you are trying to install the server on your pfSense box.
The intended topology is that you put a PostgreSQL server on a host on your LAN and point bandwidthd on pfSense to that.I installed the bandwidthd package just now at home and enabled and put some PostgreSQL Database Host, Name, Username, Password. bandwidthd is running.
Of course when I go to Diagnostics->Bandwidthd it says:
Please start bandwidthd to populate this directory.
That is because the data is not being written to local files, it is being sent to the database.
To view the data I need to browse to the PostgreSQL server an look at the graphs etc there. -
That is because the data is not being written to local files, it is being sent to the database.
I may be a bit slow, but how exactly is it getting sent to the database? Teleported?