[pgbr-geral] PGFOUINE [PROBLEMA NA VERSÃO 8. 3.5]

2009-01-08 Por tôpico Junin
Galerinha,

Segue abaixo todos meus procedimentos e o erro final...


S.O. Ubuntu
Instalação do postgresql via pacote - É teste no meu note...rsrs

Pré-requisitos
#instalar php5
apt-get install php5-cli
baixar e descompactar em um  diretorio seu o  PGFOUINE
pgfouine-1.0.tar.gz

1 - Editei o arquivo postgresql.conf no seguintes parâmetros:

log_destination = 'syslog'
logging_collector = off
silent_mode = on

log_min_duration_statement = 0
log_duration = off
log_statement = 'none'

log_line_prefix = 'user=%u,db=%d '#com espaço no final entre o d e a aspas

2 - Editei o arquivo /etc/syslog.conf

#adiciona
local0.*-/var/log/postgresql/main.log

# edita

*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
*local0.none;\*
cron,daemon.none;\
mail,news.none  -/var/log/messages

3 - reiniciei o syslogd
/etc/init.d/sysklogd restart

4 - reiniciei o postgresql-8.3
/etc/init.d/postgresql-8.3 restart

5 - Entrei no log do postgres
cd /var/log/postgresql

6 - Rodei o comando

/seu_diretorio/pgfouine-1.0/pgfouine.php -file main.log  
/seu_diretorio_para_criar_o_arquivo/somefile.html

7 - OLHA O ERRO FODA!

erro:

r...@es605-444:/var/log/postgresql#
/home/junin-dba/pgfouine-1.0/pgfouine.php -file postgresql-8.3-main.log  
/home/junin-dba/Área\ de\ Trabalho/somefile.html
pgFouine did not find any valid PostgreSQL log line in your log file:
* check that PostgreSQL uses an english locale for logging (lc_messages in
your postgresql.conf),
* check that you use the -logtype option (syslog, stderr) according to your
log file,
* if you use syslog and log_line_prefix, check that your log_line_prefix has
a trailing space,
* if you use stderr, check that your log_line_prefix is of the form '%t
[%p]: [%l-1] '.
If you think your log file and your options are correct, please contact the
author (gsmet on #postgre...@freenode or guillaume-pg at smet dot org).


Solucao 1 - mudar para ingles no postgresql.conf o parametro lc_messages
//fiz e nada;
Solucao 2 - verificar o log_line_prefix = 'user=%u,db=%d '#tem o espaço no
final...

Ajuda aí galera...


-- 
VALTER CEZAR PRADO JUNIOR
GRADUADO EM CIÊNCIA DA COMPUTAÇÃO - UFOP
ANALISTA DE SISTEMAS - BYSAT
DBA / PROJETISTA DE SISTEMAS - PBH
INTEGRANTE DA COMUNIDADE PGBR-GERAL

Sem saber como fazer ele fez!
___
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral


Re: [pgbr-geral] PGFOUINE [PROBLEMA NA VERSÃO 8. 3.5]

2009-01-08 Por tôpico Dickson S. Guedes
Junin escreveu:
 Galerinha,

 Segue abaixo todos meus procedimentos e o erro final...

 (...)
 7 - OLHA O ERRO

 erro:

 r...@es605-444:/var/log/postgresql# 
 /home/junin-dba/pgfouine-1.0/pgfouine.php -file 
 postgresql-8.3-main.log   /home/junin-dba/Área\ de\ 
 Trabalho/somefile.html
 pgFouine did not find any valid PostgreSQL log line in your log file:
 * check that PostgreSQL uses an english locale for logging 
 (lc_messages in your postgresql.conf),
 * check that you use the -logtype option (syslog, stderr) according to 
 your log file,
 * if you use syslog and log_line_prefix, check that your 
 log_line_prefix has a trailing space,
 * if you use stderr, check that your log_line_prefix is of the form 
 '%t [%p]: [%l-1] '.
 If you think your log file and your options are correct, please 
 contact the author (gsmet on #postgre...@freenode or guillaume-pg at 
 smet dot org).

O log cantou a bola, mas vou falar depois.

 Solucao 1 - mudar para ingles no postgresql.conf o parametro 
 lc_messages //fiz e nada;

Vi que você leu o log. É isso, tem que estar em inglês ali senão as 
regex do pgfouine não encontrarão nada.

 Solucao 2 - verificar o log_line_prefix = 'user=%u,db=%d '#tem o 
 espaço no final...

Vi que você não leu o log na integra pois a sua Solução 2 está 
incompleta. O log_line_prefix precisa ser, no mínimo:

'%t [%p]: [%l-1] '

mas você pode adicionar seu usuário e versão:

'%t [%p]: [%l-1] user=%u,db=%d '


Tente lá e nos comunique.

-- 
Dickson S. Guedes
Administrador de Banco de Dados
Confesol - Projeto Colmeia
Florianopolis, SC, Brasil
(48) 3322-1185, ramal: 26

___
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral


Re: [pgbr-geral] PGFOUINE [PROBLEMA NA VERSÃO 8. 3.5]

2009-01-08 Por tôpico Junin
Resolvi Dickson;

O problema é que referenciei o arquivo de log postgresql-8.3-main.log e o
certo era  main.log.
Sobre no parâmetro log_line_prefix que vc deu sugestão de colocar '%t [%p]:
[%l-1] user=%u,db=%d ', não creio nisto.

Para SYSLOG

log_destination = 'syslog'
log_line_prefix = 'user=%u,db=%d'


Para STDERR

log_destination = 'stderr'
log_line_prefix = '%t [%p]: [%l-1] '


Finalizando, se seguir todos os passos que passei dá certo...

2009/1/8 Dickson S. Guedes gue...@cresoltec.com.br

 Junin escreveu:
  Galerinha,
 
  Segue abaixo todos meus procedimentos e o erro final...
 
  (...)
  7 - OLHA O ERRO
 
  erro:
 
  r...@es605-444:/var/log/postgresql#
  /home/junin-dba/pgfouine-1.0/pgfouine.php -file
  postgresql-8.3-main.log   /home/junin-dba/Área\ de\
  Trabalho/somefile.html
  pgFouine did not find any valid PostgreSQL log line in your log file:
  * check that PostgreSQL uses an english locale for logging
  (lc_messages in your postgresql.conf),
  * check that you use the -logtype option (syslog, stderr) according to
  your log file,
  * if you use syslog and log_line_prefix, check that your
  log_line_prefix has a trailing space,
  * if you use stderr, check that your log_line_prefix is of the form
  '%t [%p]: [%l-1] '.
  If you think your log file and your options are correct, please
  contact the author (gsmet on #postgre...@freenode or guillaume-pg at
  smet dot org).

 O log cantou a bola, mas vou falar depois.

  Solucao 1 - mudar para ingles no postgresql.conf o parametro
  lc_messages //fiz e nada;

 Vi que você leu o log. É isso, tem que estar em inglês ali senão as
 regex do pgfouine não encontrarão nada.

  Solucao 2 - verificar o log_line_prefix = 'user=%u,db=%d '#tem o
  espaço no final...

 Vi que você não leu o log na integra pois a sua Solução 2 está
 incompleta. O log_line_prefix precisa ser, no mínimo:

 '%t [%p]: [%l-1] '

 mas você pode adicionar seu usuário e versão:

 '%t [%p]: [%l-1] user=%u,db=%d '


 Tente lá e nos comunique.

 --
 Dickson S. Guedes
 Administrador de Banco de Dados
 Confesol - Projeto Colmeia
 Florianopolis, SC, Brasil
 (48) 3322-1185, ramal: 26

 ___
 pgbr-geral mailing list
 pgbr-geral@listas.postgresql.org.br
 https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral




-- 
VALTER CEZAR PRADO JUNIOR
GRADUADO EM CIÊNCIA DA COMPUTAÇÃO - UFOP
ANALISTA DE SISTEMAS - BYSAT
DBA / PROJETISTA DE SISTEMAS - PBH
INTEGRANTE DA COMUNIDADE PGBR-GERAL

Sem saber como fazer ele fez!
___
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral


Re: [pgbr-geral] PGFOUINE [PROBLEMA NA VERSÃO 8 .3.5]

2009-01-08 Por tôpico joao junior
vi que você não leu o log na integra pois a sua Solução 2 está 
incompleta. O log_line_prefix precisa ser, no mínimo:
'%t [%p]: [%l-1] '
mas você pode adicionar seu usuário e versão:
'%t [%p]: [%l-1] user=%u,db=%d '


Jovem Guedes esse formato [%p]: [%l-1] é somente se a saída do log fosse
direcionada a stderr e no caso esta indo para o syslog
if you use stderr, check that your log_line_prefix is of the form  '%t
[%p]: [%l-1] '.




On Thu, 2009-01-08 at 09:14 -0200, Dickson S. Guedes wrote:
 Junin escreveu:
  Galerinha,
 
  Segue abaixo todos meus procedimentos e o erro final...
 
  (...)
  7 - OLHA O ERRO
 
  erro:
 
  r...@es605-444:/var/log/postgresql# 
  /home/junin-dba/pgfouine-1.0/pgfouine.php -file 
  postgresql-8.3-main.log   /home/junin-dba/Área\ de\ 
  Trabalho/somefile.html
  pgFouine did not find any valid PostgreSQL log line in your log file:
  * check that PostgreSQL uses an english locale for logging 
  (lc_messages in your postgresql.conf),
  * check that you use the -logtype option (syslog, stderr) according to 
  your log file,
  * if you use syslog and log_line_prefix, check that your 
  log_line_prefix has a trailing space,
  * if you use stderr, check that your log_line_prefix is of the form 
  '%t [%p]: [%l-1] '.
  If you think your log file and your options are correct, please 
  contact the author (gsmet on #postgre...@freenode or guillaume-pg at 
  smet dot org).
 
 O log cantou a bola, mas vou falar depois.
 
  Solucao 1 - mudar para ingles no postgresql.conf o parametro 
  lc_messages //fiz e nada;
 
 Vi que você leu o log. É isso, tem que estar em inglês ali senão as 
 regex do pgfouine não encontrarão nada.
 
  Solucao 2 - verificar o log_line_prefix = 'user=%u,db=%d '#tem o 
  espaço no final...
 
 Vi que você não leu o log na integra pois a sua Solução 2 está 
 incompleta. O log_line_prefix precisa ser, no mínimo:
 
 '%t [%p]: [%l-1] '
 
 mas você pode adicionar seu usuário e versão:
 
 '%t [%p]: [%l-1] user=%u,db=%d '
 
 
 Tente lá e nos comunique.
 

___
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral


Re: [pgbr-geral] PGFOUINE [PROBLEMA NA VERSÃO 8 .3.5]

2009-01-08 Por tôpico Dickson S. Guedes
joao junior escreveu:
 vi que você não leu o log na integra pois a sua Solução 2 está 
 incompleta. O log_line_prefix precisa ser, no mínimo:
 '%t [%p]: [%l-1] '
 mas você pode adicionar seu usuário e versão:
 '%t [%p]: [%l-1] user=%u,db=%d '
   


 Jovem Guedes esse formato [%p]: [%l-1] é somente se a saída do log fosse
 direcionada a stderr e no caso esta indo para o syslog
 if you use stderr, check that your log_line_prefix is of the form  '%t
 [%p]: [%l-1] '.
   

Tem razão, agora foi eu quem não leu com atenção o e-mail do Junin. :/

My bad...


-- 
Dickson S. Guedes
Administrador de Banco de Dados
Confesol - Projeto Colmeia
Florianopolis, SC, Brasil
(48) 3322-1185, ramal: 26

___
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral