Solved

Configuring custom syslog facilities, Solaris 2.6

Posted on 2000-05-12
7
694 Views
Last Modified: 2013-12-27
I am trying to create a custom facility and also trying to get the reserved local ones to work. My ultimate goal is to write apache access logs to this facilty and send them to another server.

I added this to syslog.conf

local0.info         /var/adm/web_access

and then used logger as follows:

logger -p local0.info "some mesg"

But this file never gets written too. I have restarted syslog (and even gone as far as rebooted the box)

I am trying to get syslog to write to this new file first, and then worry about routing it to another machine.

Any ideas?

Also, can a completely custom facility be created such as web.access as opposed to user.info for example?

Thanks,
Chuck

0
Comment
Question by:rhugga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Expert Comment

by:etdey
ID: 2809455
Syslogd uses the M4 macro libraries. Thus, field delimeters are the TAB character. Are you putting a tab between the service filter (local0.info) and the log file name?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 2818456
You can test the above by running syslog with the '-d' (debug) flag, which will cause it to print out what it thinks its rule base is.

Also, as for adding facilities, you can't do this unless you modify the source code to syslogd, logger, and syslog() on your system.  This is one of the biggest shortcomings of syslog (along with security concerns and the fact that the messaes are unformatted).  Like Brian Kernighan said (about X Windows) "Sometimes when you fill a vacuum it still sucks."
0
 
LVL 2

Expert Comment

by:ish
ID: 2851466
2 things:

#1:  the file /var/adm/web_access must exist, and must be writeable by your syslog.

#2: etdey is right, the TAB is the MOST IMPORTANT thing about this operation.    ONE SPACE in the line can hose your logging.

using vi on  the syslog.conf, try this

<esc>se list

this sill turn on SPECIAL CHARACTER LISTING, causing the TABS to all appear as ^I and carriage returns as $

here's an example of mine:
local7.notice^I^I^I/var/log/tcpd.log$    
local7.alert^I^I^I/var/log/tcpd-alert.log$

this causes my tcpd wrappers to log to a special set of files.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:ianB
ID: 2855576
We have opened up a new Solaris Topic Area.  

To increase the visibility of questions, we moved questions we felt
appropriate to the new Solaris Topic Area where they will be easier for
Solaris experts to find and answer. You may view your question at
http://www.experts-exchange.com/Computers/Operating_Systems/Solaris/

If you have any questions about the new topic area you can contact
Community Support by posting a comment at the following URL or by
emailing us at cs@experts-exchange.com.
http://www.experts-exchange.com/Customer_Service/Experts_Exchange/

Ian
Community Support @ Experts Exchange
0
 
LVL 3

Expert Comment

by:darinw
ID: 2969966
Hi rhugga,

Please come back and update your thread. What is your status? Have the comments the Experts have made helped you?

darinw
Customer Service
0
 
LVL 2

Accepted Solution

by:
ish earned 100 total points
ID: 3074230
I already answered this question, not sure how it become unlocked again...

Received email:
Regarding rhugga's question in the Experts Exchange Solaris
topic area titled "Configuring custom syslog facilities, Solaris 2.6"...

Congratulations! You earned 300 quality points and a grade of 'B' for
answering rhugga's question! These points will be added to
your expert score in the Solaris topic area.

rhugga also left a comment along with their grade.
0
 
LVL 5

Expert Comment

by:ianB
ID: 3110595
Answer accepted
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question