Re: configure syslog prefix

2013-07-03 Thread Mike Hoskins (michoski)
-Original Message-

From: Shawn Bakhtiar 
Date: Wednesday, July 3, 2013 12:15 PM
To: "bind-us...@isc.org" 
Subject: RE: configure syslog prefix

>hhhmmm
>
>I have not run multiple binds on the same box, but according to the man
>pages for named.conf (assuming you have a different configuration file
>for each instance) setup each to report to a different logging facility
>ie:
>
>in named.conf:
>
>
>logging {
>  channel default_syslog {
>syslog local7;
>severity info;
>  };
>
>...
>
>
>and in /etc/rsyslog.conf
>
># Save named messages firstnamedinstance.log
>local7.*  
>/var/log/firstnamedinstance.log
>
>(If you have logrotate installed)You may also want to add a file in
>/etc/logrotate.d with the following info:
>
>/var/log/firstnamedinstance.log {
>sharedscripts
>postrotate
>/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2>
>/dev/null || true
>endscript
>}

Good call, and if you're running rsyslog go to rsyslog.conf/doc and read
about templates...  You can rewrite anything to your heart's content with
a little effort.

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


RE: configure syslog prefix

2013-07-03 Thread Shawn Bakhtiar
hhhmmm

I have not run multiple binds on the same box, but according to the man pages 
for named.conf (assuming you have a different configuration file for each 
instance) setup each to report to a different logging facility ie:

in named.conf:


logging {
  channel default_syslog {
syslog local7;
severity info;
  };

...


and in /etc/rsyslog.conf

# Save named messages firstnamedinstance.log
local7.*
/var/log/firstnamedinstance.log

(If you have logrotate installed)You may also want to add a file in 
/etc/logrotate.d with the following info:

/var/log/firstnamedinstance.log {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || 
true
endscript
} 


So it will rotate the logs 


> Date: Tue, 2 Jul 2013 13:49:35 +0200
> From: klaus.mailingli...@pernau.at
> To: bind-us...@isc.org
> Subject: configure syslog prefix
> 
> Hi!
> 
> I have several bind instances running on the same host. All of them use 
> the same logging prefix, e.g:
> 
> named[11926]: zone mydomain/IN: Transfer started.
> named[11926]: transfer of 'mydomain/IN' from 2.3.4.5#53: connected using 
> 2.3.4.5#44224
> named[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
> AXFR-style IXFR started: TSIG mydomain
> named[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
> AXFR-style IXFR ended
> 
> 
> So I only have the PID to separate the different bind processes.
> 
> Some software allows to configure the syslog prefix, but I couldn't find 
> that for bind.
> 
> Is there a workaround to get something like that?
> 
> named-incoming[11926]: zone mydomain/IN: Transfer started.
> named-incoming[11926]: transfer of 'mydomain/IN' from 2.3.4.5#53: 
> connected using 2.3.4.5#44224
> named-outgoing[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
> AXFR-style IXFR started: TSIG mydomain
> named-outgoing[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
> AXFR-style IXFR ended
> 
> Thanks
> Klaus
> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
> from this list
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
  ___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: configure syslog prefix

2013-07-03 Thread Matus UHLAR - fantomas

On 02.07.13 13:49, Klaus Darilion wrote:
Some software allows to configure the syslog prefix, but I couldn't 
find that for bind.


Is there a workaround to get something like that?

named-incoming[11926]: zone mydomain/IN: Transfer started.
named-incoming[11926]: transfer of 'mydomain/IN' from 2.3.4.5#53: 
connected using 2.3.4.5#44224
named-outgoing[13479]: client 2.3.4.5#44224: transfer of 
'mydomain/IN': AXFR-style IXFR started: TSIG mydomain
named-outgoing[13479]: client 2.3.4.5#44224: transfer of 
'mydomain/IN': AXFR-style IXFR ended


You seem to want different process names for different log types.
I'm afraid you can not do that and playing with named process name or links 
won't help


However: you can use "print-category yes" which will give you a category
name to which the particular logs belong to.

http://ftp.isc.org/isc/bind9/cur/9.9/doc/arm/Bv9ARM.ch06.html#id2576269

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Windows 2000: 640 MB ought to be enough for anybody
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: configure syslog prefix

2013-07-02 Thread Doug Barton

On 07/02/2013 06:34 AM, Sam Wilson wrote:

In article ,
  Tony Finch  wrote:


Klaus Darilion  wrote:


Some software allows to configure the syslog prefix, but I couldn't find
that
for bind.


Rename the named executable.


Assuming a Unix-like OS would having multiple links (hard or soft) have
the correct effect?


Yeah, hard links work of course, but symlinks are slightly preferable 
here because they make upgrades transparent.


hth,

Doug
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: configure syslog prefix

2013-07-02 Thread Tony Finch
Sam Wilson  wrote:
> Tony Finch  wrote:
> > Klaus Darilion  wrote:
> > >
> > > Some software allows to configure the syslog prefix, but I couldn't
> > > find that for bind.
> >
> > Rename the named executable.
>
> Assuming a Unix-like OS would having multiple links (hard or soft) have
> the correct effect?

Yes. The syslog tag comes from named's idea of its progname, which it gets
from argv[0], which is the name you used to invoke it.

Tony.
-- 
f.anthony.n.finchhttp://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: configure syslog prefix

2013-07-02 Thread Klaus Darilion



On 02.07.2013 14:59, Tony Finch wrote:

Klaus Darilion  wrote:


Some software allows to configure the syslog prefix, but I couldn't find that
for bind.


Rename the named executable.


I would prefer a configuration options, but I guess I have to use this 
workaround.


Tested with symlinks, it works.

Thanks
Klaus
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: configure syslog prefix

2013-07-02 Thread Sam Wilson
In article ,
 Tony Finch  wrote:

> Klaus Darilion  wrote:
> >
> > Some software allows to configure the syslog prefix, but I couldn't find 
> > that
> > for bind.
> 
> Rename the named executable.

Assuming a Unix-like OS would having multiple links (hard or soft) have 
the correct effect?

Sam

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: configure syslog prefix

2013-07-02 Thread Tony Finch
Klaus Darilion  wrote:
>
> Some software allows to configure the syslog prefix, but I couldn't find that
> for bind.

Rename the named executable.

Tony.
-- 
f.anthony.n.finchhttp://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


configure syslog prefix

2013-07-02 Thread Klaus Darilion

Hi!

I have several bind instances running on the same host. All of them use 
the same logging prefix, e.g:


named[11926]: zone mydomain/IN: Transfer started.
named[11926]: transfer of 'mydomain/IN' from 2.3.4.5#53: connected using 
2.3.4.5#44224
named[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
AXFR-style IXFR started: TSIG mydomain
named[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
AXFR-style IXFR ended



So I only have the PID to separate the different bind processes.

Some software allows to configure the syslog prefix, but I couldn't find 
that for bind.


Is there a workaround to get something like that?

named-incoming[11926]: zone mydomain/IN: Transfer started.
named-incoming[11926]: transfer of 'mydomain/IN' from 2.3.4.5#53: 
connected using 2.3.4.5#44224
named-outgoing[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
AXFR-style IXFR started: TSIG mydomain
named-outgoing[13479]: client 2.3.4.5#44224: transfer of 'mydomain/IN': 
AXFR-style IXFR ended


Thanks
Klaus
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users