Syslog.conf: looking for a simple answer on a simple question | Unix Linux Forums | Red Hat

  Go Back    


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Syslog.conf: looking for a simple answer on a simple question

Red Hat


Tags
red hat, syslog.conf

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-27-2013
dr1zzt3r dr1zzt3r is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 28 June 2013, 9:57 AM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
RedHat Syslog.conf: looking for a simple answer on a simple question

Cheers!

In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to know if they are still logged or not.

I hope its a pretty simple question to get a simple answer Just asking because the manuals I checked did not say "everything else that is not specified will be logged in whateveryoulike.log", so I am unsure.

Big thanks
Sponsored Links
    #2  
Old 06-27-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 24 October 2014, 5:58 PM EDT
Location: Simplicity
Posts: 1,976
Thanks: 127
Thanked 578 Times in 524 Posts
I think all vendors define all severe types. This is the minimum level, e.g. err includes crit.
You can test with the logger command

Code:
logger -p user.crit 'this is user.crit'

Sponsored Links
    #3  
Old 06-27-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 24 October 2014, 3:13 PM EDT
Location: Lancashire, UK
Posts: 1,869
Thanks: 599
Thanked 322 Times in 290 Posts
Can you paste the content of syslog.conf without the comments?

Code:
grep -v "^#" /etc/syslog.conf



Robin
    #4  
Old 06-28-2013
dr1zzt3r dr1zzt3r is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 28 June 2013, 9:57 AM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
unfortunately I am not the admin of the server and cannot issue commands, but could ask earlier for the settings:

*.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log


As you can see crit and err level messages are not specified here, and I am not sure if they are not specified then they are logged at all.
Sponsored Links
    #5  
Old 06-28-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 24 October 2014, 3:13 PM EDT
Location: Lancashire, UK
Posts: 1,869
Thanks: 599
Thanked 322 Times in 290 Posts
The logger command that MadeInGermany suggests should not be a privileged command. What command can you not issue?

Looking at your records from syslog.conf, the theory is that the first record that captures *.info along with other things to /var/log/messages should actually capture all messages of severity level info or higher.

Try:-
Code:
tail -f /var/log/messages &
sleep 3
echo "Going to send message to syslog"
sleep 1
logger "This is a default message"
logger -p user.crit 'this is user.crit'

Does that produce any logging output?



Robin
Sponsored Links
    #6  
Old 06-28-2013
dr1zzt3r dr1zzt3r is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 28 June 2013, 9:57 AM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Just tried logger and it triggers the alert in the messages. I did not know *.info means to log everything info or above. Thanks a log guys for the help, I got the answer I was looking for
Sponsored Links
    #7  
Old 06-28-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 24 October 2014, 3:13 PM EDT
Location: Lancashire, UK
Posts: 1,869
Thanks: 599
Thanked 322 Times in 290 Posts
You are most welcome.

I've learnt lots from this board, and I've got lots more to learn still. Keep looking at threads that seem interesting - you can subscribe to them without posting if you wish under the "Thread Tools" and see what gets said by others and that's a great way to learn about other stuff which is interesting.


Robin
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help making simple perl or bash script to create a simple matrix torchij Shell Programming and Scripting 16 04-26-2012 04:05 AM
TAR question (probably a very simple answer) chatguy UNIX for Dummies Questions & Answers 4 09-17-2010 05:20 PM
Solaris JumpStarting?... Simple Yes/No Question... Unless the answer's 'No' Bradj47 Solaris 3 08-10-2009 04:43 AM
Simple C question... Hopefully it's simple Xeed Programming 6 12-15-2006 01:29 PM
Ok simple question for simple knowledge... Corrail UNIX for Dummies Questions & Answers 1 11-28-2005 12:03 PM



All times are GMT -4. The time now is 08:40 PM.