[syslog-ng] DOMAIN Name Variable
Rob Munsch
rmunsch at solutionsforprogress.com
Tue Mar 14 22:55:10 CET 2006
i knew if we tossed the theory around enough, a shell script would be
the inevitable result...
if the template() function doesn't accept such an operation on the $FQDN
macro, within syslog's conf itself, could program() do it, or is that
just too ugly?
Breitman, Jason wrote:
>To clarify what I want
>
>servername.domainname.com or servername.city.domainame.com
>
>I believe the first name is the server name and everything else is the
>domain name.
>
>
>================================================
>#!/bin/sh
>
>if [ $# != 1 ] ; then
> echo "USAGE: $0 fqdn"
> exit 1
>fi
>
>FQDN=$1
>DOMAINNAME=`echo ${FQDN} | cut -d. -f2,3,4,5`
>
>echo ${DOMAINNAME}
>================================================
>
>I would like to put all servers in the same domain under one directory.
>This will allow me to allow access to different user groups based on
>domain name.
>Also, If I wanted, I can leave out the host name and have one big file
>for each domain name.
>
>
>
>-----Original Message-----
>From: syslog-ng-bounces at lists.balabit.hu
>[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Rob Munsch
>Sent: Tuesday, March 14, 2006 4:03 PM
>To: Syslog-ng users' and developers' mailing list
>Subject: Re: [syslog-ng] DOMAIN Name Variable
>
>oh yes, of course i forgot. we certainly wouldn't want the US to stick
>.us on the end of their domains and create the impression of a global
>standard or anything, sigh...
>
>David Anderson wrote:
>
>
>
>>Rob,
>>
>>Monday, March 13, 2006, 11:47:52 PM, you wrote:
>>
>>
>>
>>
>>
>>>that would be the TLD, yes: but i got the impression jason means
>>>'domain' more like xyz.com foo.edu how.de
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>>so therefore 'starting with the string before the last dot.'
>>>
>>>
>>>
>>>
>>That doesn't work, as many domains outside of the US have a 3-part
>>domain, as in xyz.co.uk.
>>
>>
>>
>>
>>
>
>
>--
>Rob Munsch
>Solutions For Progress IT
>
>_______________________________________________
>syslog-ng maillist - syslog-ng at lists.balabit.hu
>https://lists.balabit.hu/mailman/listinfo/syslog-ng
>Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>
>
>THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.
>_______________________________________________
>syslog-ng maillist - syslog-ng at lists.balabit.hu
>https://lists.balabit.hu/mailman/listinfo/syslog-ng
>Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>
>
>
--
Rob Munsch
Solutions For Progress IT
More information about the syslog-ng
mailing list