syslogging issues


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users syslogging issues
# 8  
Old 01-18-2003
There are two primary aspects to syslog. First, there are user and system defined 'logging levels' that are defined by the programmer who wrote the code. Each of these or groups of these 'logging levels' can be directed to local and remote log files (configured in syslog.conf).

Sometimes it is hard to know the user and system defined logging levels a programmer used if they have not documented this is the specific application.

What program are you using that you are trying to log?
# 9  
Old 01-19-2003
Quote:
Originally posted by Neo
What program are you using that you are trying to log?
i am using the vanilla syslogd on my FreeBSD 4.7 box.

i'm typing the command as follows:

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

the network is set like this:

webramp<----->cisco 806<----->internal network (FreeBSD box)

they are in different networks. i've opened a hole in the 806 (using reflexive access lists) on UDP 514 to allow for the syslog information to pass through.

the webramp has it's own method for logging to a syslog server (just a matter of checking a box and clicking update). the 806, does it by telling it through the IOS, which most of you probably know as it is.

i've run tcpdump and i do see some messages comming from the cisco 806... but very few... and they're not being stored anywhere i can gather.
# 10  
Old 01-19-2003
From your reply it systems you are logging a CISCO router to a syslog host, is that right?

If that is the case, you must search the CISCO documentation for how to configure logging levels and ' and set the router to log appropriately. Then, with the user (or system) defined levels, you configure syslogd.conf to direct these logfile entries to any file you want.

Here is an example of how to do this:

http://colin.bitterfield.com/Syslog_...atacenter.html

Note both the CISCO configuration and syslogd.conf configuration is in the example above. Also notice that they use local6 as the defined user logging level:

Quote:
Sample CISCO Configuration File:

logging facility local6

logging 192.168.1.10 (Ip of your syslog server)
The example shows one example syslogd.conf file to match the CISCO configuration.

That is why I asked 'what is the application that is logging'... to properly configure syslog, it is necessary to consider both the logging application (in this case a CISCO device) and the logging process (in this case, syslogd, which we all knew). The critical missing information was the device or application that you are logging (a CISCO router, in this case).

Then again, maybe not.... when I reread your post I think you might be trying to log a 'webramp process'....... if that is the case, you must understand how that application uses the syslog facility.


You can get more information by a Google search with keywords: syslog CISCO configuration which yields:

http://www.google.com/search?hl=en&l...=Google+Search
# 11  
Old 01-20-2003
okay, the issues seems to have been an incorrect ACL entry that debared access.

now /var/log/messages has being filled with information from the firewall.

however, one issue still remains, the logs are all being sent to /var/log/messages and not the other locations.

i did the following to allow the logs to be directed to other files. in my /etc/syslog.conf file i have this entry:

# external hosts (router and firewall)
!router
local7.* /var/log/router-logs
local7.alert /var/log/router-logs
local7.crit /var/log/router-logs
local7.debug /var/log/router-logs
local7.emerg /var/log/router-logs
local7.err /var/log/router-logs
local7.info /var/log/router-logs
local7.notice /var/log/router-logs
local7.warn /var/log/router-logs

i made the files ahead of time by doing a "touch router-logs"

i've scoured the man pages which are a really poor source for this information because they don't tell me how to do what i want to do here. your link about the solaris system was somewhat better, and i found something on cisco's site.

i really don't think what i've done is right because the file isn't being populated by anything.

Last edited by xyyz; 01-20-2003 at 05:23 AM..
# 12  
Old 01-20-2003
Perhaps a stupid question:

Did you kill and restart syslogd after making configuration changes to syslogd.conf?


Also, in your syslogd.conf configuration, you only need one entry:

Code:
local7.* /var/log/router-logs

This entry takes care of all the others for local7 you have defined.


Forgot to add.... be sure that the permissions of the /var/log-router-logs are correct to allow syslogd to write to those files.
# 13  
Old 01-21-2003
Quote:
Originally posted by Neo
Perhaps a stupid question:

Did you kill and restart syslogd after making configuration changes to syslogd.conf?

yes, i did. everytime i alter my syslog.conf i kill and restart syslogd.

the permissions on messages and router-log are the same.

i commented out the excess lines.

i'm thinking that, the following might be an issue.


*.err;kern.debug;auth.notice;mail.crit /dev/console
*.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages


the "*.notice" second line, i'm assuming means that all notices, regardless of source, are to be sent to /var/log/messages.

unfortunately, i don't know the severity rating of the messages that the firewall is sending.

maybe you can help me out. a typical message looks like this:

Jan 20 20:19:08 <16.5> (806 hostname) id=firewall sn=(serial number of webramp) time="2003-01-20 20:19:07" fw=(some ip address) pri=5 c=256 m=38 msg="ICMP packet dropped" n=2956 src==(some ip address) dst==(some ip address) rule=0^M

again, an assumption, but i think that pri=5 means priority 5, which seems to be a notification level event with the cisco router.

if this is the case, how could i redirect only FreeBSD notifications to go to messages?

i didn't get a clear indication of how to do it in the documentation? is it local0.notice or something?

Last edited by xyyz; 01-21-2003 at 06:28 AM..
# 14  
Old 01-21-2003
One of the issues that make syslog a bit less effective than it could be is inconsistent ways that programmers use the facility. This includes the format of the actual message. I once led a project for a major financial organization to use syslog to correlate network intrusion events. It was sometimes difficult because of the lack of standards for programmers using syslog. OK, enough of the flashback to days-gone-by and back to your situation:

I would suggest that you start simple with syslogd.conf and work your way to more complex, and carefully watch what is going on (and when things break). In other words, start with just your local7 entries in syslogd.conf and comment out all the others. Insure that is working properly first.... then uncomment one line at a time until you find the configuration conflict/problem.

Hint: Wildcards (*) in syslogd.conf Smilie

You are almost there!!!
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