Mailing List Archive

logs to mysql database
Hello,

am newbie in rsyslog. So please try understand me :)
I have following problem/task/wish.
I want all incoming logs from servers insert to mysql. Ok that's not a problem, but i want merge logs by hostnames and insert each log from one hostname to $hostname table. It is something like log sorting by hostname only to sql tables.
I think it is possible with templates, but not sure.
Maybe somebody could give me a right way how to do it. If it's possible of course :)


Thanks,
Viktorija
logs to mysql database [ In reply to ]
I think it is doable, but it probably is a bit dangerous. I am also not
sure if MySQL allows you to define tables named like hostnames. Could
you please let me know some hostnames of yours (maybe samples, I am just
interested in the actual structure) as well as some matching IP
addresses. I'll then see what I can do...

Rainer

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com
> [mailto:rsyslog-bounces at lists.adiscon.com] On Behalf Of Viktorija
> Sent: Tuesday, November 15, 2005 11:00 AM
> To: rsyslog at lists.adiscon.com
> Subject: [rsyslog] logs to mysql database
>
> Hello,
>
> am newbie in rsyslog. So please try understand me :)
> I have following problem/task/wish.
> I want all incoming logs from servers insert to mysql. Ok
> that's not a problem, but i want merge logs by hostnames and
> insert each log from one hostname to $hostname table. It is
> something like log sorting by hostname only to sql tables.
> I think it is possible with templates, but not sure.
> Maybe somebody could give me a right way how to do it. If
> it's possible of course :)
>
>
> Thanks,
> Viktorija
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
>
logs to mysql database [ In reply to ]
I have standard names not something special :)
I have hostnames like: sun, liberatio, nafig, pofig, nefig an so on :)
Oh, ip addresses are virtual so it will not give you any additional information.

Do you think it is possible to make with templates? Or another way?


Viktorija


On Tue, 15 Nov 2005 11:21:49 +0100
"Rainer Gerhards" <rgerhards at hq.adiscon.com> wrote:

> I think it is doable, but it probably is a bit dangerous. I am also not
> sure if MySQL allows you to define tables named like hostnames. Could
> you please let me know some hostnames of yours (maybe samples, I am just
> interested in the actual structure) as well as some matching IP
> addresses. I'll then see what I can do...
>
> Rainer
>
> > -----Original Message-----
> > From: rsyslog-bounces at lists.adiscon.com
> > [mailto:rsyslog-bounces at lists.adiscon.com] On Behalf Of Viktorija
> > Sent: Tuesday, November 15, 2005 11:00 AM
> > To: rsyslog at lists.adiscon.com
> > Subject: [rsyslog] logs to mysql database
> >
> > Hello,
> >
> > am newbie in rsyslog. So please try understand me :)
> > I have following problem/task/wish.
> > I want all incoming logs from servers insert to mysql. Ok
> > that's not a problem, but i want merge logs by hostnames and
> > insert each log from one hostname to $hostname table. It is
> > something like log sorting by hostname only to sql tables.
> > I think it is possible with templates, but not sure.
> > Maybe somebody could give me a right way how to do it. If
> > it's possible of course :)
> >
> >
> > Thanks,
> > Viktorija
> > _______________________________________________
> > rsyslog mailing list
> > http://lists.adiscon.net/mailman/listinfo/rsyslog
> >
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
>
>