Managing remote machines' logs

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

Managing remote machines' logs

Postby decibel83 on Sat Oct 04, 2008 1:31 pm

Hi.
I configured Rsyslogd to accept logs from the remote machines in my LAN:

Code: Select all
$ModLoad imudp
$UDPServerRun 514
$AllowedSender UDP, 192.168.33.0/24, *.eg.local


And to save all logs to MySQL:

Code: Select all
$ModLoad ommysql
*.* :ommysql:localhost,rsyslog,rsyslog,rsyslog_password


Now all logs (local and remote) are stored in files (for example /var/log/syslog) and in the MySQL database.

I only want the local logs to be stored in files, and all logs (local and remote) in the MySQL database.
How I can configure rsyslogd to have this?

Thank you very much!
Bye.
decibel83
New
 
Posts: 2
Joined: Sat Oct 04, 2008 12:47 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: Managing remote machines' logs

Postby rgerhards on Sat Oct 04, 2008 8:29 pm

The best thing is to do local messages first (via filters on hostname), then discard those messages. After that, do the remote machines. I think the forum search and/or the wiki ( http://wiki.rsyslog.com ) should bring up some sample configurations.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1664
Joined: Thu Feb 13, 2003 11:57 am

Re: Managing remote machines' logs

Postby decibel83 on Sat Oct 04, 2008 8:54 pm

rgerhards wrote:The best thing is to do local messages first (via filters on hostname), then discard those messages. After that, do the remote machines. I think the forum search and/or the wiki ( http://wiki.rsyslog.com ) should bring up some sample configurations.

Could you help me in doing this?
I read some articles in the documentation and in the wiki, but I didn't managed in understand how this works..
decibel83
New
 
Posts: 2
Joined: Sat Oct 04, 2008 12:47 pm

Re: Managing remote machines' logs

Postby prakash.akumalla on Mon Oct 06, 2008 7:18 am

Hi,
For storing local logs in your /var/log/syslog you use filters involving from host so that you can turn those logs to seperate locations.

Regarding your database the statements you have used till now are sufficient.

Regards,
Prakash.
prakash.akumalla
Frequent Poster
 
Posts: 100
Joined: Thu Jun 26, 2008 2:37 pm

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron