Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Say, You are a System administrator. Using Log files make it very easy to identify problems. Now there are 50 servers running as Mail, Web, Proxy, DNS etc. You want to centralize the log from all servers
onto a LOG Server. How will you configure the LOG Server?
Answer and Explanation:
By Default System Accept the Log only from the Local host. To accept the Log from other host
configure:
1. vi /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0 -r"
Where
-m 0 disables 'MARK' messages.
-r enables logging from remote machines
-x disables DNS lookups on messages received with -r
2. service syslog restart
How can these entries enable this machine to behave a central server?
Say, I followed the steps so what next? Do I need to configure clients to send the logs to this server?pls advise
BTW: You don't have to comment out the entry (client site), if both rules are present (one writes it local and the other sends it to the log server) both rules are used and the log message is stored locally and remote.
Didn't pick up on your edit earlier, better to post a new entry (same thread though) next time.
Anyway, to answer your question:
Take a look at logger, it was made to test the syslog log system.
You can specify facility-level pairs, add messages and tags and more (do take a look at the manpage).
2 examples from the manpage:
Quote:
logger System rebooted
logger -p local0.notice -t HOSTIDM -f /dev/idmc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.