[rt-users] RT logs in wrong timezone [SOLVED]

Wagner Pereira wpereira at pop-sp.rnp.br
Thu Aug 18 12:20:45 EDT 2011


Hi, Ruslan.

I finally got it! It's quite simple...thank you very much.

The text below is in brazilian Portuguese. If someone wants to 
understand, it is just to use Google Translate or ask me how-to.

------------------------------------
Para apontar um syslog-ng local para um syslog-ng remoto:

1. No server do syslog-ng remoto o firewall precisa liberar entrada de 
udp na porta 514
2. No syslog-ng local, arquivo syslog-ng.conf, acrescentar duas linhas 
(seções # Send the messages to an other host e # Log paths):
destination rt {udp("10.10.10.2" port(514));};
log { source(s_src); destination(rt); };

Onde:
a. rt é uma identificação do serviço que está sendo logado ou do próprio 
servidor
b. 10.10.10.2 é o IP do servidor remoto

3. Reiniciar os daemons syslog-ng de ambos os servidores

4. Configuração no RT_SiteConfig.pm (diretório do Request Tracker):
** Com isso o RT loga no Syslog-ng local.
** Comentadas as linhas que logam em arquivo

# LOGGING:

Set($LogToSyslog, 'debug');
Set(@LogToSyslogConf,
         ident => 'RT',
         facility => 'local0',
         socket => [{type => 'udp', host => 'localhost', port => 514 }],
);

Set($LogToSTDERR, 'warning'); # antigo LogToScreen

#Set($LogToFile, 'debug');
#Set($LogDir, '/var/log/apache2/');
#Set($LogToFileNamed , "rt.log");

-- 
### At PoP-SP/RNP, every day is an IPv6 day ###

Wagner Pereira
PoP-SP/RNP - Ponto de Presença da RNP em São Paulo
CCE/USP - Centro de Computação Eletrônica da Universidade de São Paulo
http://www.pop-sp.rnp.br
Fixo. +55 11 3091-8901
Móvel. +55 11 9923-9554
fone at RNP: 10158902


Em 17/08/2011 16:11, Ruslan Zakirov escreveu:
> On Wed, Aug 17, 2011 at 10:43 PM, Wagner Pereira<wpereira at pop-sp.rnp.br>  wrote:
>> Ok, Ruslan.
>>
>> Now I edited my RT_SiteConfig.pm to that:
>>
>> --------------------------------
>> # LOGGING:
>>
>> Set($LogToSyslog, 'debug');
>> Set(@LogToSyslogConf,
>>         ident =>  'RTTEST',
>>         facility =>  'local0',
>>         socket =>  [{type =>  'udp', host =>  'localhost', port =>  514 }],
>> );
> You said that you want to log directly to remote syslog host from RT.
> You didn't mention that you have local syslog daemon that redirects
> messages to remote host.
>
> You have two options:
>
> 1) Drop LogToSyslogConf in RT_SiteConfig.pm that will give RT and
> modules it uses to find most appropriate way to connect to local
> syslog daemon. Configure local syslog daemon to forward messages
> and/or store them locally or do whatever you like with them, but using
> local syslog's configs.
>
> 2) Set LogToSyslogConf in RT properly to send messages to remote
> syslog daemon directly. Reminder: this requires quite new version of
> Sys::Syslog module from the CPAN.
>
> I would recommend you to go with option 1). First of all test that
> local syslog daemon actually connects to remote server and redirects
> messages.
>
>> Set($LogToSTDERR, 'warning'); # former LogToScreen
>> --------------------------------
>>
>> And in the Syslog-ng.conf I did:
>>
>> --------------------------------
>> # Send the messages to an other host
>> #
>> destination remote { udp("10.1.1.10" port(514)); };
>> --------------------------------
>>
>> Until now, my main Syslog server is logging nothing. How to debug that?
>>
>> Regards,
>
>



More information about the rt-users mailing list