[MASOCH-L] Syslogd [RESOLVIDO]

João Carlos Mendes Luís jonny at jonny.eng.br
Fri Feb 29 19:06:33 BRT 2008


Perfeito.

Note, entretanto, que se algum hosts diferente do local ou do 
especificado enviar log, estes não serão gravados em nenhum arquivo.

Victor wrote:
> Olá João,
>
> Perfeito. Funcionou 100%. Agradeço muito sua ajuda. Segue o meu syslog.conf 
> que estou usando se o pessoal precisar também:
>
> # $FreeBSD: src/etc/syslog.conf,v 1.28 2005/03/12 12:31:16 glebius Exp $
> #
> #       Spaces ARE valid field separators in this file. However,
> #       other *nix-like systems still insist on using tabs as field
> #       separators. If you are sharing this file between systems, you
> #       may want to use only tabs as field separators here.
> #       Consult the syslog.conf(5) manpage.
> # local messages
> +@
> *.err;kern.warning;auth.notice;mail.crit                /dev/console
> *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err 
> /var/log/messages
> security.*                                      /var/log/security
> auth.info;authpriv.info                         /var/log/auth.log
> mail.info                                       /var/log/maillog
> lpr.info                                        /var/log/lpd-errs
> ftp.info                                        /var/log/xferlog
> cron.*                                          /var/log/cron
> *.=debug                                        /var/log/debug.log
> *.emerg                                         *
> # uncomment this to log all writes to /dev/console to /var/log/console.log
> #console.info                                   /var/log/console.log
> # uncomment this to enable logging of all log messages to /var/log/all.log
> # touch /var/log/all.log and chmod it to mode 600 before it will work
> #*.*                                            /var/log/all.log
> # uncomment this to enable logging to a remote loghost named loghost
> #*.*                                            @loghost
> # uncomment these if you're running inn
> # news.crit                                     /var/log/news/news.crit
> # news.err                                      /var/log/news/news.err
> # news.notice                                   /var/log/news/news.notice
> !startslip
> *.*                                             /var/log/slip.log
> !ppp
> *.*                                             /var/log/ppp.log
> # remote messages per host
> !*
> +rptsjrp1
> *.*                                             /var/log/mkt_rpt-sjrp1.log
>
>
> Por favor confirme também se o uso do !* esta no local correto, de qualquer 
> forma esta funcionando.
>
> Abraços.
>
>
> --
> Atenciosamente,
> Victor Gustavo Volpe
> Diretor Executivo
> Grupo Total Serviços de Internet LTDA - ME
> CNPJ: 08.776.401/0001-40
> (17) 3227-0686 / 9105-5392
>
> ----- Original Message ----- 
> From: "João Carlos Mendes Luís" <jonny at jonny.eng.br>
> To: "Victor" <victor_volpe at bol.com.br>; "Mail Aid and Succor, On-line 
> Comfort and Help" <masoch-l at eng.registro.br>
> Sent: Thursday, February 28, 2008 5:36 PM
> Subject: Re: [MASOCH-L] Syslogd
>
>
> Logo no inicio do arquivo original, coloque a sequencia:
>
> +@
>
> Isso vai dizer que as definicoes a seguir sao exclusivas do host local
>
> No final de tudo, vá fazendo:
>
> +rptsjrp1
> *.*      /var/log/xxx
>
> IMPORANTE:
>
> Se em algum lugar da configuracao houver uma entrada do tipo exclamacao,
> ela filtra as mensagens.  Isso é comuns em hosts FreeBSD, por exemplo:
>
>
> !startslip
> *.*                                             /var/log/slip.log
> !ppp
> *.*                                             /var/log/ppp.log
>
> Neste caso, antes de colocar o filtro de hosts, coloque tambem um:
>
> !*
>
>
> Se voce nao colocar o +@ no inicio, o log vai ser duplicado: tera
> entradas tanto no log por host como no log principal local.
>
>
> Victor wrote:
>   
>> Olá Pessoal,
>>
>> Alguém poderia me orientar como faço pra filtrar logs de um determinado
>> hostname pelo syslogd ? Já tentei varias formas como:
>>
>> +rptsjrp1
>> *.*   /var/log/mkt_rpt-sjrp1.log
>>
>> -rptsjrp1
>> *.*   /var/log/mkt_rpt-sjrp1.log
>>
>> rptsjrp1
>> *.*   /var/log/mkt_rpt-sjrp1.log
>>
>> *.*@rptsjrp1  /var/log/mkt_rpt-sjrp1.log
>>
>> rptsjrp1.*  /var/log/mkt_rpt-sjrp1.log
>>
>> *.rptsjrp1.*  /var/log/mkt_rpt-sjrp1.log
>>
>> *.rptsjrp1  /var/log/mkt_rpt-sjrp1.log
>>
>> O log continua entrando só que cai no /var/log/messages . Ex.:
>>
>> Feb 27 22:26:47 rptsjrp1 system,info,account user admin logged out from
>> 189.xxx.xxx.xxx via winbox
>> Feb 27 22:31:54 rptsjrp1 system,error,critical login failure for user 
>> admin
>> from 189.xxx.xxx.xxx via winbox
>>
>> Meu arquivo /etc/hosts:
>>
>> 10.0.0.2                rptsjrp1 rptsjrp1
>>
>> Obs.: Já tentei filtrar por system, info, account e nada acontece.
>>
>> Obrigado.
>>
>>
>> --
>> Atenciosamente,
>> Victor Gustavo Volpe
>> Diretor Executivo
>> Grupo Total Serviços de Internet LTDA - ME
>> CNPJ: 08.776.401/0001-40
>> (17) 3227-0686 / 9105-5392
>>
>> __
>> masoch-l list
>> https://eng.registro.br/mailman/listinfo/masoch-l
>>
>>     
>
>
> __________ NOD32 2909 (20080228) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>   


                                        Jonny

-- 
João Carlos Mendes Luís - Networking Engineer - jonny at jonny.eng.br




More information about the masoch-l mailing list