guides/Linux.md in pghero-1.1.0 vs guides/Linux.md in pghero-1.1.1
- old
+ new
@@ -3,11 +3,13 @@
Packaged for:
- Ubuntu 14.04 (Trusty)
- Ubuntu 12.04 (Precise)
- Debian 7 (Wheezy)
-- CentOS and RHEL 6
+- Debian 8 (Jesse)
+- CentOS / RHEL 6
+- CentOS / RHEL 7
- Fedora 20
- SUSE Linux Enterprise Server
64-bit only
@@ -38,21 +40,41 @@
echo "deb https://deb.packager.io/gh/pghero/pghero wheezy master" | sudo tee /etc/apt/sources.list.d/pghero.list
sudo apt-get update
sudo apt-get install pghero
```
-CentOS and RHEL 6
+Debian 8 (Jesse)
```sh
+wget -qO - https://deb.packager.io/key | sudo apt-key add -
+echo "deb https://deb.packager.io/gh/pghero/pghero jessie master" | sudo tee /etc/apt/sources.list.d/pghero.list
+sudo apt-get update
+sudo apt-get install pghero
+```
+
+CentOS / RHEL 6
+
+```sh
sudo rpm --import https://rpm.packager.io/key
echo "[pghero]
name=Repository for pghero/pghero application.
baseurl=https://rpm.packager.io/gh/pghero/pghero/centos6/master
enabled=1" | sudo tee /etc/yum.repos.d/pghero.repo
sudo yum install pghero
```
+CentOS / RHEL 7
+
+```sh
+sudo rpm --import https://rpm.packager.io/key
+echo "[pghero]
+name=Repository for pghero/pghero application.
+baseurl=https://rpm.packager.io/gh/pghero/pghero/centos7/master
+enabled=1" | sudo tee /etc/yum.repos.d/pghero.repo
+sudo yum install pghero
+```
+
Fedora 20
```sh
sudo rpm --import https://rpm.packager.io/key
echo "[pghero]
@@ -123,9 +145,32 @@
```
## Query Stats
Query stats can be enabled from the dashboard. If you run into issues, [view the guide](Query-Stats.md).
+
+## Historical Query Stats
+
+To track query stats over time, create a table to store them.
+
+```sql
+CREATE TABLE "pghero_query_stats" ("id" serial primary key, "database" text, "query" text, "total_time" float, "calls" bigint, "captured_at" timestamp)
+CREATE INDEX "index_pghero_query_stats_on_database_and_captured_at" ON "pghero_query_stats" ("database", "captured_at")
+```
+
+This table can be in the current database or another database. If another database, run:
+
+```sh
+sudo pghero config:set PGHERO_STATS_DATABASE_URL=...
+```
+
+Schedule the task below to run every 5 minutes.
+
+```sh
+sudo pghero run rake pghero:capture_query_stats
+```
+
+After this, a time range slider will appear on the Queries tab.
## System Stats
CPU usage is available for Amazon RDS. Add these variables to your environment: