Statistics collection and monitoring for PostgreSQL Multi-server Environments.
PostgreStats Database Verified: Yes
Statistics Exist: Yes
Server Count: 2
Database Count: 6
Core Statistics Count: 2,196
Statistics > Monthly Snapshot
Stats general information on all databases and compares data (+/-) to the same day on the previous month.
Statistics > Daily Individual Databases
Stats database specific activity and compares data (+/-) with the previous day.
Statistics > Month VS Month Comparison
Stats database specific activity on two VS months side-by-side showing peak days and averages on each.
Statistics > Weekly Trending
Stats general information on all databases and groups data by days of the week.
Statistics > Yearly Snapshot
Stats general information on all databases and groups data by months of the year.
PostgreStats Enterprise > Set-up
PostgreStats Enterprise is installed in a few simple steps. Follow the 1-2-3 guide below.
1) Create the PostgreStats database.
The PostgreStats database can be installed on whatever server you like. To create the database, enter below the existing PostgreSQL user who will be accessing the PostgreStats database. This will generate the script you'll use to create the PostgreStats database on that server.
2) Update the PostgreStats ps_conf.php file and log-in.
Once your PostgreStats database is created, open up ps_conf.php located in the scripts directory of your PostgreStats install. At the top, plug-in your PostgreStats database connect credentials (user, pass, and host). Note, this user should be the same user as you indicated above when creating your PostgreStats database.
3) Log-in to PostgreStats.
The above script will create your PostgreStats Admin account. Once you've updated postgrestats.conf in step 2, you'll now be required to log-in to your PostgreStats site on page refresh.
Your temporary username: postgrestats
Your temporary password: password
4) Insert server & database configurations.
You can now use the Servers & Databases interface to add new Servers & Databases to PostgreStats. When you insert a new Server, you'll then be able to add that server's databases to it. PostgreStats will then update statistics for each database on each server, each time statistics are updated VIA Cron (below).
5) Automate PostgreStats with Cron.
PostgreStats are updated each time ps_cron.php is executed. This file is located in the scripts directory of your PostgreStats install. Enterprise was designed to collect statistics at higher frequencies or as often as you'd like (EG: once per hour) but stats should be updated at least once per day with the last execution as close to midnight as possible. We recommend you run this cron-job as root only. To install the cron-job, su to root, enter crontab edit mode by typing "crontab -e" and insert your new cron-job as in these examples:
In the above example, root will execute ps_cron.php at 50 minutes past each hour. Be sure to update your path to PHP and your PostgreStats install directory path.
NOTE: It is recommended you first zero-out statistics on each database prior to running ps_cron.php. You can do this simply by logging into each database and issuing a "select pg_stat_reset();" query.
PostgreStats Enterprise > Admin Account
Set options and make changes to your PostgreStats admin account below.
Update your admin account username below.
Enter a new PostgreStats admin account username below. Once updated, you'll be required to log-in with your new credentials on page refresh.
Update your admin account password below.
Passwords stored in the PostgreStats database are salted / hashed using the SHA256 method of encryption. Once updated, you'll be required to log-in with your new credentials on page refresh.
PostgreStats Enterprise > Servers & Databases
Administer the servers and databases in your PostgreStats implementation.
Add a new PostgreStats server below.
Once a new server is added to the system, you'll then add databases from that server for which you'd like PostgreStats to collect stats for. If this server is remote, make sure PostgreSQL accepts connections from this server.
Edit servers and databases
Modify or remove servers and install & update databases in your PostgreStats implementation below.
Update this server below. Note, altering the host & port fields will auto-update all databases tied to this server.
Add a single database to this server or use the auto-populate feature to add all DBs this user can connect to (recommended if you connect to all DBs with a single set of credentials). PostgreStats will then start collecting statistics when the ps_cron.php script executes.
Databases on this Server
The following databases are collecting statistics on this server.