LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-25-2008, 12:28 PM   #1
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
syslog.conf alternate port?


I have six Linux servers (and one Solaris server but I won't bother with this just yet) that need to send some type of notice to an OpenNMS server whenever a disk partition gets above say 75%. I was trying to do this via SNMP and traps but found this very complicated. So now I want to use syslog as OpenNMS has a syslogd. Anyways, this is really a syslog question. Is there a way to specify the port to use when sending a syslog message from a host to a remote syslogd?

For example I tried this in my /etc/syslog.conf file:

Quote:
local1.crit @<hostname>:<port>

But no dice. Syslog will only send the message when I don't add the ":<port>" part. The problem here is that I don't want to run the OpenNMS syslogd on port 514 as I still want the regular syslogd to run. To get around this I have written an iptables script that alters the destination port from 514 to 10514 (the port where OpenNMS syslogd runs). This works but it is a cheap kind of hack and I'd rather not have to implement this on six servers (plus the Solaris server which I know almost nothing about). I have read a little about syslog-ng but I am loathe to use this as, again, I will have to implement it on six servers.

Any ideas?

Thanks
 
Old 05-25-2008, 01:04 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You say you don't want syslog-ng on each client which if solely for this function seems fair, but I'd suggest you're still taking the wrong approach by considering making changes like this on the client side. it seems that syslogd will always bind to udp:514, but if you change the central one to syslog-ng *ONCE* then you can either relay data *through* syslog-ng and onwards to opennms syslogd, OR just stop syslog-ng listneing on 514 in the first place. port 514 is for the syslog protocol, so it's much nicer for firewalling and practises in general to say that syslog traffic on your network is only on that one single port, and take a more detailed approach inside the server once it gets there. there's plenty of info about this on the opennms wiki actually, certianly their favoured approach.
 
Old 05-26-2008, 01:21 AM   #3
rgerhards
Member
 
Registered: Sep 2003
Distribution: Fedora/Debian
Posts: 50

Rep: Reputation: 15
Depending on which distro you run, rsyslog < http://www.rsyslog.com > might be a good alternativ e for you (it is the default on recent Fedora and RHEL, so you should be able to get it without much trouble on distros based on that). It supports the syntax you intended to use. Other than syslog-ng, it is a real drop-in replacement, meaning it works with the sysklogd config files.

Rainer
(Disclaimer: I am the rsyslog author)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure /etc/syslog.conf? samengr Linux - Server 1 03-14-2008 05:04 AM
syslog.conf s0n|k Linux - Newbie 1 02-27-2006 07:09 PM
Help with syslog.conf ? sauce Linux - Security 11 12-15-2005 04:49 PM
alternate methods of parallel port access bobbens Programming 9 10-25-2005 08:47 AM
NFS on an alternate port Syncrm Linux - Networking 0 12-11-2002 09:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration