User Tools

Site Tools


postgres_queries

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
postgres_queries [2010/05/17 15:49]
marrra
postgres_queries [2010/05/18 09:26] (current)
vladimir.kruzik
Line 5: Line 5:
 ====== Steps for monitoring PGSQL in Bijk: ====== ====== Steps for monitoring PGSQL in Bijk: ======
  
-1. Log-in to pgsql console (`su postgres -`, `psql`) and run this command:+1. Log-in to psql console (`su postgres -`, `psql`) and run this command ​(replace "​{password}"​ with some secure password):
  
 <​code>​ <​code>​
Line 14: 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 26: Line 26:
  
 <​code>​ <​code>​
-/​etc/​init.d/​postgresql-[verze] reload+/​etc/​init.d/​postgresql-[version] reload
 </​code>​ </​code>​
  
Line 35: 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 49: 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.txt ยท Last modified: 2010/05/18 09:26 by vladimir.kruzik