User Tools

Site Tools


postgres_queries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
postgres_queries [2010/05/17 14:57]
marrra created
postgres_queries [2010/05/18 09:26] (current)
vladimir.kruzik
Line 1: Line 1:
- PGSQL monitoring - 1 x PGSQL / monitoring 1 x DB / server+====== Postgres queries ====== 
 +  
 +For now you can monitor only one database on one postgresql ​server
  
 +====== Steps for monitoring PGSQL in Bijk: ======
  
-Steps for monitoring PGSQL in Bijk: +1. Log-in to psql console (`su postgres -`, `psql`) and run this command ​(replace "​{password}"​ with some secure password):
- +
-1. Log-in to pgsql console (`su postgres -`, `psql`) and run this command:+
  
 <​code>​ <​code>​
Line 13: Line 14:
  
 <​code>​ <​code>​
-/​etc/​postgresql/​[verze]/​main/​pg_hba.conf ​+/​etc/​postgresql/​[version]/​main/​pg_hba.conf ​
 </​code>​ </​code>​
  
-add this line before line starting with "local all all" ​and replace ​'​monitoring_db_name' ​with your monitoring DB name.+add this line before line starting with "local all all" ​(replace ​"​{monitored_db_name}" ​with name of your monitored database):
  
 <​code>​ <​code>​
-local {monitoring_db_name} bijk md5+local {monitored_db_name} bijk md5
 </​code>​ </​code>​
  
Line 25: Line 26:
  
 <​code>​ <​code>​
-/​etc/​init.d/​postgresql-[verze] reload+/​etc/​init.d/​postgresql-[version] reload
 </​code>​ </​code>​
  
Line 34: Line 35:
 </​code>​ </​code>​
  
-add this lines with access information:​+add those lines with access information:​
  
 <​code>​ <​code>​
-PG_DB = {monitoring_db_name}+PG_DB = {monitored_db_name}
 PG_USER = bijk PG_USER = bijk
 PG_PASS = {password} PG_PASS = {password}
Line 48: Line 49:
 </​code>​ </​code>​
  
-6. You can test access with this command:+6. You can test access with this command ​(you will be prompted for password, after that you should be in psql console):
  
 <​code>​ <​code>​
-psql -WU bijk {monitoring_db_name}+psql -WU bijk {monitored_db_name}
 </​code>​ </​code>​
  
  
postgres_queries.1274101035.txt.gz · Last modified: 2010/05/17 14:57 by marrra