Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:56:39 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
WIKI
BLOG
Help
Search
Recent Topics
GoogleTagged
Login
Register
Logging, Syslog and Log Anaylsys Forums
>
Forums
>
syslog-ng
>
Hostname instead of IP addresses
Pages: [
1
]
« previous
next »
Print
Author
Topic: Hostname instead of IP addresses (Read 464 times)
Kreno
Newbie
Offline
Posts: 6
Hostname instead of IP addresses
«
on:
February 16, 2010, 07:56:45 am »
Hello all,
I am pretty new to syslog-ng. I have configure it on Opensolaris.
I would like to configure in syslog-ng that instead of IP addresses I would like to get Hostname(s) from network devices, when syslog-ng is creating folders and log files. I do not have DNS server in my test environment and I have put all names and IP addresses in /etc/hosts file. Curently syslog-ng is logging like this: /var/log/syslog-ng/router/192.168.1.1/2010/192.168.1.1.log
Any help appreciated.
Thank you and kind regards, M
Logged
Admin
Administrator
Newbie
Online
Posts: 146
Re: Hostname instead of IP addresses
«
Reply #1 on:
February 16, 2010, 09:21:11 am »
A destination statement like this:
destination hosts {
file("/var/log/syslog-ng/$HOST/$HOST.log";
};
should do the trick.
Logged
Kreno
Newbie
Offline
Posts: 6
Re: Hostname instead of IP addresses
«
Reply #2 on:
February 17, 2010, 04:18:34 am »
Thank you. Also the problem was that I had to change: use_dns (off ); to use_dns (persist_only);
Thank you and kind regards, Marko
Logged
Pages: [
1
]
Print
GoogleTagged:
syslog server instead hostname
syslog-ng hostname
resolve address hostname syslog-ng
google
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forums
-----------------------------
=> Syslog & syslogd
=> syslog-ng
=> Log Data and Analysis
=> Windows Event Log
=> Web Server Logs
=> Security Event Management
=> General Discussion
===> Red Light District
Loading...