VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
gavin.henry at gmail.com Guest
|
Posted: Fri Jun 13, 2008 3:51 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by date?
|
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/ |
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sat Jun 14, 2008 9:04 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
Gavin,
I really do appreciate your one-liner. But is there any more insight into
this? I know I have to use Logrotate, but I have no idea how I can actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives. So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by date?
|
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ddunkin at netos.net Guest
|
Posted: Sat Jun 14, 2008 10:49 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sun Jun 15, 2008 2:23 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
On Sat, Jun 14, 2008 at 08:49:04PM -0700, Darryl Dunkin wrote:
Quote: | It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
|
"logger reload" rotates logs. But not CSV . That's because the CSV CDR
files are not held open.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
atis at iq-labs.net Guest
|
Posted: Sun Jun 15, 2008 5:50 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
On Sun, Jun 15, 2008 at 10:23 AM, Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:
Quote: | On Sat, Jun 14, 2008 at 08:49:04PM -0700, Darryl Dunkin wrote:
Quote: | It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
|
"logger reload" rotates logs. But not CSV . That's because the CSV CDR
files are not held open.
|
If they are not held open, you can can just move them away with "mv",
next CDR should just write new file.
Regards
A,tis
--
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835 |
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sun Jun 15, 2008 10:46 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
Ok, now I'm confused.. logger reload or no logger reload? I want the
Master.csv to rotate.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Atis Lezdins
Sent: June 15, 2008 6:50 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
On Sun, Jun 15, 2008 at 10:23 AM, Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:
Quote: | On Sat, Jun 14, 2008 at 08:49:04PM -0700, Darryl Dunkin wrote:
Quote: | It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
|
"logger reload" rotates logs. But not CSV . That's because the CSV CDR
files are not held open.
|
If they are not held open, you can can just move them away with "mv",
next CDR should just write new file.
Regards
A,tis
--
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sun Jun 15, 2008 10:48 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
I'm attempting to use this now as is, but Tzafrir points out that this might
not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl Dunkin
Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Sun Jun 15, 2008 10:50 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
While maybe a little too non-cli for some folks, I like to use
Webmin's GUI for setting up log rotation. Nice, quick, easy, hard to
get it wrong....
Thanks,
Steve Totaro
On Sun, Jun 15, 2008 at 11:48 AM, Mark Hamilton <mark.h at cage151.com> wrote:
Quote: | Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
I'm attempting to use this now as is, but Tzafrir points out that this might
not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl Dunkin
Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sun Jun 15, 2008 11:11 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
Would that help the rotation of Master.csv too?
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Totaro
Sent: June 15, 2008 11:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
While maybe a little too non-cli for some folks, I like to use
Webmin's GUI for setting up log rotation. Nice, quick, easy, hard to
get it wrong....
Thanks,
Steve Totaro
On Sun, Jun 15, 2008 at 11:48 AM, Mark Hamilton <mark.h at cage151.com> wrote:
Quote: | Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
I'm attempting to use this now as is, but Tzafrir points out that this
| might
Quote: | not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl
| Dunkin
Quote: | Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
philipp.kempgen at amo... Guest
|
Posted: Sun Jun 15, 2008 11:34 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
Mark Hamilton schrieb:
Quote: | I'm attempting to use this now as is, but Tzafrir points out that this might
not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
|
Quote: | -----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl Dunkin
Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
|
logrotate can be used to rotate any files you want. So just add
a logrotate definition to /etc/logrotate.d/asterisk:
/path/to/my/cdr-custom/Master.csv {
daily
rotate 7
compress
missingok
notifempty
}
Gr??e,
Philipp Kempgen
--
http://www.das-asterisk-buch.de - http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Sun Jun 15, 2008 11:35 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
In my installations, I have total control via Webmin and can create
and alter existing log file rotations via an easy to follow GUI.
YMMV. Maybe you have a dev box you can try it on? Installation is
simple. I recommend putting it on a non-standard port and not using
the default username admin. You could also install it but don't have
it run as a service.
Webmin is nice for a good many things nix, I am a fan. Just secure it
as much as possible.
Thanks,
Steve T
On Sun, Jun 15, 2008 at 12:11 PM, Mark Hamilton <mark.h at cage151.com> wrote:
Quote: | Would that help the rotation of Master.csv too?
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Totaro
Sent: June 15, 2008 11:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
While maybe a little too non-cli for some folks, I like to use
Webmin's GUI for setting up log rotation. Nice, quick, easy, hard to
get it wrong....
Thanks,
Steve Totaro
On Sun, Jun 15, 2008 at 11:48 AM, Mark Hamilton <mark.h at cage151.com> wrote:
Quote: | Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
I'm attempting to use this now as is, but Tzafrir points out that this
| might
Quote: | not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl
| Dunkin
Quote: | Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sun Jun 15, 2008 11:41 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
I actually use it on a couple other boxes and I agree with you completely.
Just didn't want to use it on this box which I'm trying to keep as secure as
possible.
I'm a fan of Webmin too.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Totaro
Sent: June 15, 2008 12:35 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
In my installations, I have total control via Webmin and can create
and alter existing log file rotations via an easy to follow GUI.
YMMV. Maybe you have a dev box you can try it on? Installation is
simple. I recommend putting it on a non-standard port and not using
the default username admin. You could also install it but don't have
it run as a service.
Webmin is nice for a good many things nix, I am a fan. Just secure it
as much as possible.
Thanks,
Steve T
On Sun, Jun 15, 2008 at 12:11 PM, Mark Hamilton <mark.h at cage151.com> wrote:
Quote: | Would that help the rotation of Master.csv too?
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Totaro
Sent: June 15, 2008 11:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
While maybe a little too non-cli for some folks, I like to use
Webmin's GUI for setting up log rotation. Nice, quick, easy, hard to
get it wrong....
Thanks,
Steve Totaro
On Sun, Jun 15, 2008 at 11:48 AM, Mark Hamilton <mark.h at cage151.com>
| wrote:
Quote: | Quote: | Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
I'm attempting to use this now as is, but Tzafrir points out that this
| might
Quote: | not rotate Master.csv in /cdr-custom. In such a case, what would I need
|
| to
Quote: | Quote: | do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl
| Dunkin
Quote: | Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mark.h at cage151.com Guest
|
Posted: Sun Jun 15, 2008 11:41 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
That works, thanks a lot!
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Philipp
Kempgen
Sent: June 15, 2008 12:35 PM
To: Asterisk Users
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Mark Hamilton schrieb:
Quote: | I'm attempting to use this now as is, but Tzafrir points out that this
| might
Quote: | not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
|
Quote: | -----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl
| Dunkin
Quote: | Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
|
logrotate can be used to rotate any files you want. So just add
a logrotate definition to /etc/logrotate.d/asterisk:
/path/to/my/cdr-custom/Master.csv {
daily
rotate 7
compress
missingok
notifempty
}
Gr??e,
Philipp Kempgen
--
http://www.das-asterisk-buch.de - http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Sun Jun 15, 2008 11:55 am Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
On Sunday 15 June 2008 10:46:18 Mark Hamilton wrote:
Quote: | Ok, now I'm confused.. logger reload or no logger reload? I want the
Master.csv to rotate.
|
Don't. A 'mv' is enough. This is also the case for any of the CDR csv files,
not just Master.csv.
--
Tilghman |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Sun Jun 15, 2008 12:18 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
On Sun, Jun 15, 2008 at 11:46:18AM -0400, Mark Hamilton wrote:
Quote: | Ok, now I'm confused.. logger reload or no logger reload? I want the
Master.csv to rotate.
|
If you use the same logrotate file for both the logs and Master.csv, it
should have a 'logger reload' line, as you must re-open the logs.
E.g: /etc/logrotate.d/asterisk
/var/log/asterisk/debug /var/log/asterisk/messages /var/log/asterisk/full /var/log/asterisk/*_log /var/log/asterisk/cdr-*/Master.csv {
missingok
sharedscripts
postrotate
asterisk -rx "logger rotate" >/dev/null 2>&1
endscript
}
But if you have different configuration for the CSV file (e.g: rotate it
by size as well, or daily, unlike the system default, which is weekly),
you can put it in a separate logrotate file, that will not rotate logs.
E.g:
/var/log/asterisk/debug /var/log/asterisk/messages /var/log/asterisk/full /var/log/asterisk/*_log {
missingok
sharedscripts
postrotate
asterisk -rx "logger rotate" >/dev/null 2>&1
endscript
}
/var/log/asterisk/cdr-*/Master.csv {
daily
missingok
sharedscripts
}
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|