User Tools

Site Tools


postgres_grapsh_-_configuration

Differences

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

Link to this comparison view

postgres_grapsh_-_configuration [2010/05/21 12:51] (current)
zdenek created
Line 1: Line 1:
 +====== Postgres queries ======
 + 
 +For now you can monitor only one database on one postgresql server
 +
 +====== 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):
 +
 +<​code>​
 +CREATE USER bijk WITH PASSWORD '​{password}';​
 +</​code>​
 +
 +2. To file 
 +
 +<​code>​
 +/​etc/​postgresql/​[version]/​main/​pg_hba.conf ​
 +</​code>​
 +
 +add this line before line starting with "local all all" (replace "​{monitored_db_name}"​ with name of your monitored database):
 +
 +<​code>​
 +local {monitored_db_name} bijk md5
 +</​code>​
 +
 +3. Reload posgresql
 +
 +<​code>​
 +/​etc/​init.d/​postgresql-[version] reload
 +</​code>​
 +
 +4. To file 
 +
 +<​code>​
 + /​etc/​bijk/​bijk-node-plugins.conf ​
 +</​code>​
 +
 +add those lines with access information:​
 +
 +<​code>​
 +PG_DB = {monitored_db_name}
 +PG_USER = bijk
 +PG_PASS = {password}
 +</​code>​
 +
 +5. Restart Bijk deamon:
 +
 +<​code>​
 +/​etc/​init.d/​bijk-node restart
 +</​code>​
 +
 +6. You can test access with this command (you will be prompted for password, after that you should be in psql console):
 +
 +<​code>​
 +psql -WU bijk {monitored_db_name}
 +</​code>​
  
postgres_grapsh_-_configuration.txt ยท Last modified: 2010/05/21 12:51 by zdenek