syslogging issues


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users syslogging issues
# 1  
Old 01-16-2003
syslogging issues

i'm having some problems with syslogging.

i figured out how to allow logging from a specific host (my webramp).

syslogd -a ipaddress subnetmask


first, what file do the logs go to? second, is there anyway i can save the webramp logs into another file?
# 2  
Old 01-16-2003
man syslogd
# 3  
Old 01-16-2003
i checked the man page... i wouldn't post something before i refer to a pertinent man page.

this is beyond that now.

i figured out what i typed earlier through the man page, but that's all i found.

however, i didn't see anything that explained how to log a specific host to it's own file.

i also didn't see a description of which file the outside device would have it's logs stored. i saw where all sorts of other service store their files, but that doesn't help me here.

i would like someone to outline these concerns please.

the man page didn't have all i was looking for, or at least i wasn't able to find it.
# 4  
Old 01-16-2003
The man page for syslog.conf actually has more information pertaining to what you are asking about.

Since you did not post your OS, a generic answer is all that can be provided. As far as most UNIX OS are concerned, you can't do what you want to do without writing a script to move the specific parts of the logging file to another.

To get messages to another server, it points to a server name - it sends the messages to the log file of that server (which means that the two servers are both adding entries into the same file.

kern.err /dev/console
kern.err @server
kern.err /var/adm/messages

All kernal errors would go to these three - on "server", whatever it's syslog.conf file shows for kern.err is where it will put it.
# 5  
Old 01-16-2003
i'm using FreeBSD 4.7

and the man page really doesn't. at least i haven't found anything other than the -a option.

it also doesn't mention anything about specifiying logging into another file.

this is all it says about "-a"

-a allowed_peer
Allow allowed_peer to log to this syslogd using UDP datagrams.
Multiple -a options may be specified.

Allowed_peer can be any of the following:

ipaddr/masklen[:service] Accept datagrams from ipaddr (in the
usual dotted quad notation) with
masklen bits being taken into account
when doing the address comparison.
ipaddr can be also IPv6 address by
enclosing the address with `[' and
`]'. If specified, service is the
name or number of an UDP service (see
services(5)) the source packet must
belong to. A service of `*' allows
packets being sent from any UDP port.
The default service is `syslog'. If
ipaddr is IPv4 address, a missing
masklen will be substituted by the
historic class A or class B netmasks
if ipaddr belongs into the address
range of class A or B, respectively,
or by 24 otherwise. If ipaddr is
IPv6 address, a missing masklen will
be substituted by 128.


i've used the following

syslogd -a x.x.x.x/11:syslog -a x.x.x.x/24:syslog

however, this isn't doing anything. i'm not even getting anything under /var/log/messages.

this is the output of netstat -a

udp4 0 0 *.syslog *.*

but it doesn't say if it's listening or if anything is established. so i don't know if it's working or not.
# 6  
Old 01-17-2003
Again, read the man page for syslog.conf. Check your /etc/syslog.conf. It will show where the error messages are going. The /etc/syslog.conf IS your configuration file.

FreeBSD.org - syslog.conf man page

See the Examples for setting up the configuration file to allow changing where and what gets logged. Make sure you are setting your logging low enough to catch messages (start with the lowest level and if you are getting more than what you wanted, cut it back).

To log to another server:
# emergency messages- log them on another machine.
*.emerg @arpa.berkeley.edu

On that other system you would need your syslog.conf to put those messages into a file:
# Emergency messages to /var/log/spoolerr
*.emerg /var/log/spoolerr

Note that this will send the messages from both servers to this file. You can't get around this via the syslog.conf.

Check that syslogd is running on both servers - once you change syslog.conf, you should be able to send a HUP signal to both syslogd processes and start getting messages from both servers into the spoolerr file.

As far as the -a option, insure the -s option isn't being used on either server (disallows logging from/to servers).

Once you insure you know where your messages are going (/etc/syslog.conf), and that your syslog daemons are allowing logging from/to remote servers (ps -ef|grep syslogd), then you can look to the -a option.
# 7  
Old 01-17-2003
Quote:
Originally posted by RTM
To log to another server:
# emergency messages- log them on another machine.
*.emerg @arpa.berkeley.edu
this is find, but it's not what i want. i don't want to log to another server. the other device is a firewall appliance, not another FreeBSD box. i've told the device to log send it's logs to a syslog server. this example tells how to have my FreeBSD box, send it's logs to another server. this isn't what i want, I want to allow the FreeBSD box to RECEIVE logs from my Webramp (Sonicawall SOHO).
[/quote]

Quote:
Note that this will send the messages from both servers to this file. You can't get around this via the syslog.conf.

Check that syslogd is running on both servers - once you change syslog.conf, you should be able to send a HUP signal to both syslogd processes and start getting messages from both servers into the spoolerr file.
one server, and one firewall appliance.

and syslogd is running on the FreeBSD device.

Quote:
As far as the -a option, insure the -s option isn't being used on either server (disallows logging from/to servers).
i caught this one, but thanks.

Quote:
Once you insure you know where your messages are going (/etc/syslog.conf), and that your syslog daemons are allowing logging from/to remote servers (ps -ef|grep syslogd), then you can look to the -a option. [/B]
the messages for the FreeBSD box itself are going to /var/log/messages. i was told that all other messages should also go there... but they're not.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sendmail issues

Hi, I'm having some problems with sendmail in Linux. The thing is when I type the following command to send an e-mail: sendmail bartoszk@companydomain.pl< test.txt it looks like it executed but I don't receive the mail. The file test.txt looks like that: To:... (3 Replies)
Discussion started by: bartoszk
3 Replies

2. Shell Programming and Scripting

Function Issues

I am converting English letters/words/punctuation in leet speak. My current script works just fine, but when I call the functions it seem to be bypassing my second function altogether. I am new to shell scripting so excuse me if its an easy fix. Also, when using SED for whole word phrases like... (4 Replies)
Discussion started by: bri09
4 Replies

3. Shell Programming and Scripting

Issues when dividing

Hi, I do have a very simple task to divide 2 variables and display the result. I CANNOT use bc when i try var1=2 var2=4 var3=$(($var1 / $var2)) echo $var3 the output is always 0 What can I change to get a dotted decimal result such as 0.5 ? Thanks! (5 Replies)
Discussion started by: svetoslav_sj
5 Replies

4. UNIX for Advanced & Expert Users

Issues in setting up remote syslogging

Hello, I am using Ubuntu Linux and having problems in setting up remote syslogging. Appreciate your help on this. On the server unix host, I have made following changes. uncommented following lines in /etc/rsyslog.conf $ModLoad imudp $UDPServerRun 514 Now i am trying to run rsyslog in... (0 Replies)
Discussion started by: ravi.videla
0 Replies

5. Shell Programming and Scripting

Script issues

#!/bin/bash glist=`cat /etc/group | cut -d ":" -f1,4` ulist=`cat /etc/passwd | cut -d ":" -f1,6` for i in $glist do echo "$glist" done for i in $ulist do echo "$ulist" done chkgrp=`cat /etc/group | cut -d ":" -f1` for a in chkgrp do (4 Replies)
Discussion started by: mduduzi
4 Replies

6. Emergency UNIX and Linux Support

rm -rf issues

We are using the solaris server and if i am using rm -rf to delete the directories its asking the confirmation for each and every file inside the directory.Is there any way to disable ( should not ask the confirmation) only for a particular session? (12 Replies)
Discussion started by: sureshbabuc
12 Replies

7. Shell Programming and Scripting

Issues with Expect

Here is a snippet of code that work for me: expect "abc" {send_log "abc found" } \ "def" {send_log "def found" } \ "123" {send_log "123 found} however the following does not and according to the book "Exploring Expect" it should be equivalent: expect { "abc"... (1 Reply)
Discussion started by: twk
1 Replies

8. Shell Programming and Scripting

while loop issues

Hi guys, Been sifting through these forums for awhile, but never had an account or needed to post. Shoutouts to a great forum with heaps of useful info. Now i consider myself a noob when it comes to linux and to bash scripting. I recently started to learn to use Vmware ESX server which uses... (4 Replies)
Discussion started by: ryath
4 Replies

9. Shell Programming and Scripting

SU issues

Hi, I have automated a build process that does the following activities. 1. check out code from cvs to a specific directory 2. build the revision checked out with 'ANT' 3. integrate the compiled code with the QA/UAT or new environment (/apps/QA or /apps/UAT or /apps/new directory) I... (1 Reply)
Discussion started by: yoi2hot4ya
1 Replies

10. Linux

CISCO syslogging in linux

Hi, I have a cisco router router and a linux box. I would like to know how to configure both the device so that everything that passes through my router gets logged in the linux box. Also I am very much new in cisco router. Is it ok to post such question in this forum, or i need to post it... (4 Replies)
Discussion started by: RajaRC
4 Replies
Login or Register to Ask a Question