Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-27 Thread Tahir Almas
Thanks for your  suggestions

*Tahir Almas*

Managing Partner
ICT Innovations
http://www.ictinnovations.com
http://www.ictbroadcast.com

On Mon, Feb 27, 2017 at 6:38 AM, Tzafrir Cohen 
wrote:

> On Mon, Feb 27, 2017 at 06:00:30PM +0500, Tahir Almas wrote:
> > Sorry  ,  I  forget  it  for another monitoring tool  monit  that we have
> > used  in  our production systems  to restart  asterisk  in case of
> asterisk
> > crash or  halt.
>
> [snip]
>
> Some notes regarding the asterisk monit configuration:
>
> > check process asterisk with pidfile /var/run/asterisk/asterisk.pid
> > group asterisk
> > start program = "/bin/bash -c 'ulimit -n 16386 &&
> /etc/init.d/asterisk start'"
>
> If you use systemd, this ulimit will have no effect: when you restart a
> service, it is restarted from a separate systemd context (cgroup) and
> not directly under your own.
>
> It would generalyl be a good idea not to embed such settings in your
> scripts and rather put them in a proper configuration file. What happens
> in you happen to run '/etc/init.d/asterisk restart'? It seems that all's
> well, until you're suddenly out of file descriptors.
>
> > stop program = "/etc/init.d/asterisk stop"
> > if does not exist for 2 cycles then restart
> > if failed port 5060 type udp protocol SIP
> > and target "011@127.0.0.1" maxforward 10
> > for 2 cycles then restart
> > if failed host 127.0.0.1 port 5038 with timeout 15 seconds for 2
> cycles then restart
> > if 5 restarts within 5 cycles then timeout
>
> Nice.
>
> Also: what happens when you run 'core stop now' from within asterisk?
>
> --
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-27 Thread Tzafrir Cohen
On Mon, Feb 27, 2017 at 06:00:30PM +0500, Tahir Almas wrote:
> Sorry  ,  I  forget  it  for another monitoring tool  monit  that we have
> used  in  our production systems  to restart  asterisk  in case of asterisk
> crash or  halt.

[snip]

Some notes regarding the asterisk monit configuration:

> check process asterisk with pidfile /var/run/asterisk/asterisk.pid
> group asterisk
> start program = "/bin/bash -c 'ulimit -n 16386 && /etc/init.d/asterisk 
> start'"

If you use systemd, this ulimit will have no effect: when you restart a
service, it is restarted from a separate systemd context (cgroup) and
not directly under your own.

It would generalyl be a good idea not to embed such settings in your
scripts and rather put them in a proper configuration file. What happens
in you happen to run '/etc/init.d/asterisk restart'? It seems that all's
well, until you're suddenly out of file descriptors.

> stop program = "/etc/init.d/asterisk stop"
> if does not exist for 2 cycles then restart
> if failed port 5060 type udp protocol SIP 
> and target "011@127.0.0.1" maxforward 10 
> for 2 cycles then restart
> if failed host 127.0.0.1 port 5038 with timeout 15 seconds for 2 cycles 
> then restart
> if 5 restarts within 5 cycles then timeout

Nice.

Also: what happens when you run 'core stop now' from within asterisk?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-27 Thread Tahir Almas
Sorry  ,  I  forget  it  for another monitoring tool  monit  that we have
used  in  our production systems  to restart  asterisk  in case of asterisk
crash or  halt.

I have attached a monit configuration for your reference. it  will work
almost in all cases

This configuration will check Asterisk for following

1. will check for Asterisk process.
2. will check Asterisk via AMI
3. will check Asterisk by sending a SIP request

You simply need to install monit and place attached file on your server as
/etc/monit.d/asterisk.conf and then restart monit service daemon



*Tahir Almas*

Managing Partner
ICT Innovations
http://www.ictbroadcast.com
http://www.ictinnovations.com
Leveraging open source in ICT



On Thu, Feb 23, 2017 at 3:45 PM, Olivier  wrote:

>
>
> 2017-02-21 14:09 GMT+01:00 Tahir Almas :
>
>> Why  not  to use  Fail2ban  https://www.voip-info.org/wiki
>> /view/Fail2Ban+%28with+iptables%29+And+Asterisk
>>
>> How would fail2ban detect that Asterisk needs to be restarted ?
>
>
>>
>>
>> *Tahir Almas*
>>
>> Managing Partner
>> ICT Innovations
>> http://www.ictinnovations.com
>> http://www.ictbroadcast.com
>> Leveraging open source in ICT
>>
>>
>>
>> On Tue, Feb 21, 2017 at 12:28 AM, Tzafrir Cohen > > wrote:
>>
>>> On Mon, Feb 20, 2017 at 11:36:24AM -0300, Victor Villarreal wrote:
>>> > Hi, Oliver.
>>> >
>>> > Maybe something like this (add this script to your crontab):
>>> >
>>> > 8<--
>>> >
>>> > #!/bin/bash
>>> > #
>>> > # File: asterisk-watchdog.sh
>>> > # Date: 2015.05.26
>>> > # Build:v1.0
>>> > # Brief:Secuencia para monitorizar procesos.
>>> > #
>>> > # ${PATH}: Variable de entorno con las rutas a los ejecutables.
>>> > PATH=/bin:/sbin:/usr/bin:/usr/sbin
>>> >
>>> > # ${DAEMON}: Demonio a monitorizar.
>>> > DAEMON="asterisk"
>>> >
>>> > # ${MSG}: Cuerpo del mensaje a enviar por mail.
>>> > MSG="$(date '+%F %T'): ${DAEMON} se ha caido!"
>>> >
>>> > pidof ${DAEMON} > /dev/null 2>&1
>>> >
>>> > [ $? -ne 0 ] && { echo ${MSG}; service ${DAEMON} start; }
>>> >
>>> > exit 0
>>>
>>> Both Debian 8 and Centos 7 have systemd. Systemd gives you this type of
>>> monitoring almost for free (see previous reply).
>>>
>>> Using cron is generally not a good idea here:
>>>
>>> 1. No way to stop Asterisk when you need it.
>>>
>>> 2. If Asterisk has failed, it may take up to a minute to restart it.
>>>
>>> --
>>>Tzafrir Cohen
>>> icq#16849755  jabber:tzafrir.co...@xorcom.com
>>> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
>>> http://www.xorcom.com
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> 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 --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> 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 --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
check process asterisk with pidfile /var/run/asterisk/asterisk.pid
group asterisk
start program = "/bin/bash -c 'ulimit -n 16386 && /etc/init.d/asterisk 
start'"
stop program = "/etc/init.d/asterisk stop"
if does not exist for 2 cycles then restart
if failed port 5060 type udp protocol SIP 
and target "011@127.0.0.1" maxforward 10 
for 2 cycles then restart
if failed host 127.0.0.1 port 5038 with timeout 15 seconds for 2 cycles 
then restart
if 5 restarts within 5 cycles then timeout
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   h

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-23 Thread Olivier
2017-02-21 14:09 GMT+01:00 Tahir Almas :

> Why  not  to use  Fail2ban  https://www.voip-info.org/
> wiki/view/Fail2Ban+%28with+iptables%29+And+Asterisk
>
> How would fail2ban detect that Asterisk needs to be restarted ?


>
>
> *Tahir Almas*
>
> Managing Partner
> ICT Innovations
> http://www.ictinnovations.com
> http://www.ictbroadcast.com
> Leveraging open source in ICT
>
>
>
> On Tue, Feb 21, 2017 at 12:28 AM, Tzafrir Cohen 
> wrote:
>
>> On Mon, Feb 20, 2017 at 11:36:24AM -0300, Victor Villarreal wrote:
>> > Hi, Oliver.
>> >
>> > Maybe something like this (add this script to your crontab):
>> >
>> > 8<--
>> >
>> > #!/bin/bash
>> > #
>> > # File: asterisk-watchdog.sh
>> > # Date: 2015.05.26
>> > # Build:v1.0
>> > # Brief:Secuencia para monitorizar procesos.
>> > #
>> > # ${PATH}: Variable de entorno con las rutas a los ejecutables.
>> > PATH=/bin:/sbin:/usr/bin:/usr/sbin
>> >
>> > # ${DAEMON}: Demonio a monitorizar.
>> > DAEMON="asterisk"
>> >
>> > # ${MSG}: Cuerpo del mensaje a enviar por mail.
>> > MSG="$(date '+%F %T'): ${DAEMON} se ha caido!"
>> >
>> > pidof ${DAEMON} > /dev/null 2>&1
>> >
>> > [ $? -ne 0 ] && { echo ${MSG}; service ${DAEMON} start; }
>> >
>> > exit 0
>>
>> Both Debian 8 and Centos 7 have systemd. Systemd gives you this type of
>> monitoring almost for free (see previous reply).
>>
>> Using cron is generally not a good idea here:
>>
>> 1. No way to stop Asterisk when you need it.
>>
>> 2. If Asterisk has failed, it may take up to a minute to restart it.
>>
>> --
>>Tzafrir Cohen
>> icq#16849755  jabber:tzafrir.co...@xorcom.com
>> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
>> http://www.xorcom.com
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> 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 --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-21 Thread Tahir Almas
Why  not  to use  Fail2ban
https://www.voip-info.org/wiki/view/Fail2Ban+%28with+iptables%29+And+Asterisk



*Tahir Almas*

Managing Partner
ICT Innovations
http://www.ictinnovations.com
http://www.ictbroadcast.com
Leveraging open source in ICT



On Tue, Feb 21, 2017 at 12:28 AM, Tzafrir Cohen 
wrote:

> On Mon, Feb 20, 2017 at 11:36:24AM -0300, Victor Villarreal wrote:
> > Hi, Oliver.
> >
> > Maybe something like this (add this script to your crontab):
> >
> > 8<--
> >
> > #!/bin/bash
> > #
> > # File: asterisk-watchdog.sh
> > # Date: 2015.05.26
> > # Build:v1.0
> > # Brief:Secuencia para monitorizar procesos.
> > #
> > # ${PATH}: Variable de entorno con las rutas a los ejecutables.
> > PATH=/bin:/sbin:/usr/bin:/usr/sbin
> >
> > # ${DAEMON}: Demonio a monitorizar.
> > DAEMON="asterisk"
> >
> > # ${MSG}: Cuerpo del mensaje a enviar por mail.
> > MSG="$(date '+%F %T'): ${DAEMON} se ha caido!"
> >
> > pidof ${DAEMON} > /dev/null 2>&1
> >
> > [ $? -ne 0 ] && { echo ${MSG}; service ${DAEMON} start; }
> >
> > exit 0
>
> Both Debian 8 and Centos 7 have systemd. Systemd gives you this type of
> monitoring almost for free (see previous reply).
>
> Using cron is generally not a good idea here:
>
> 1. No way to stop Asterisk when you need it.
>
> 2. If Asterisk has failed, it may take up to a minute to restart it.
>
> --
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-20 Thread Tzafrir Cohen
On Mon, Feb 20, 2017 at 11:36:24AM -0300, Victor Villarreal wrote:
> Hi, Oliver.
> 
> Maybe something like this (add this script to your crontab):
> 
> 8<--
> 
> #!/bin/bash
> #
> # File: asterisk-watchdog.sh
> # Date: 2015.05.26
> # Build:v1.0
> # Brief:Secuencia para monitorizar procesos.
> #
> # ${PATH}: Variable de entorno con las rutas a los ejecutables.
> PATH=/bin:/sbin:/usr/bin:/usr/sbin
> 
> # ${DAEMON}: Demonio a monitorizar.
> DAEMON="asterisk"
> 
> # ${MSG}: Cuerpo del mensaje a enviar por mail.
> MSG="$(date '+%F %T'): ${DAEMON} se ha caido!"
> 
> pidof ${DAEMON} > /dev/null 2>&1
> 
> [ $? -ne 0 ] && { echo ${MSG}; service ${DAEMON} start; }
> 
> exit 0

Both Debian 8 and Centos 7 have systemd. Systemd gives you this type of
monitoring almost for free (see previous reply).

Using cron is generally not a good idea here:

1. No way to stop Asterisk when you need it.

2. If Asterisk has failed, it may take up to a minute to restart it.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-20 Thread Victor Villarreal
Hi, Oliver.

Maybe something like this (add this script to your crontab):

8<--

#!/bin/bash
#
# File: asterisk-watchdog.sh
# Date: 2015.05.26
# Build:v1.0
# Brief:Secuencia para monitorizar procesos.
#
# ${PATH}: Variable de entorno con las rutas a los ejecutables.
PATH=/bin:/sbin:/usr/bin:/usr/sbin

# ${DAEMON}: Demonio a monitorizar.
DAEMON="asterisk"

# ${MSG}: Cuerpo del mensaje a enviar por mail.
MSG="$(date '+%F %T'): ${DAEMON} se ha caido!"

pidof ${DAEMON} > /dev/null 2>&1

[ $? -ne 0 ] && { echo ${MSG}; service ${DAEMON} start; }

exit 0

--->8---

2017-02-20 11:29 GMT-03:00 Tech Support :

> Hello;
>
> Over time, we’ve built a huge enterprise level monitoring system for
> our internal and customer PBX’s. Using Nagios as the core, along with
> Grafana, Graphite, Carbon, Whisper, etc. so we can also create custom
> dynamic dashboards, we typically monitor over 1,000 different metrics for
> each PBX. For something like monitoring a system process like Asterisk,
> besides just checking to see if the process is running or not, we also
> check about a dozen or so related metrics like memory and cpu usage. If
> anything gets out of whack, the system runs the event handler to restart
> Asterisk. All the plugins are written in Perl, so they’re very easy to
> modify. What I can do if there is an interest is take the Asterisk plugin,
> strip out everything that wouldn’t apply to someone not using our system,
> and make it available to the general public. It's up to you guys. What do
> you think? Would people find that useful?
>
> Regards;
>
> John V.
>
>
>
> *From:* asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
> boun...@lists.digium.com] *On Behalf Of *Olivier
> *Sent:* Friday, February 17, 2017 10:39 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* [asterisk-users] Which tool to automatically restart Asterisk ?
>
>
>
> Hello,
>
> Years ago, I used Monit to monitor Asterisk and restart it whenever it
> failed.
>
> Now, I wonder which tool I should pick for an Debian 8 (current) or CentOS
> 7 (future) environment.
>
> The main reason I'm looking for this tool is to avoid as much as possible,
> current 5 minutes delay between Asterisk's stop and first cutomers
> complains.
>
>
>
> 1. I always install Asterisk from source but I've read in Debian Stretch
> /etc/defaul/asterisk file, the following:
> # RUNASTSAFE: run safe_asterisk rather than asterisk (will auto-restart
> upon
> # crash). This is generally less tested and has some known
> issues
> # with properly starting and stopping Asterisk.
>
> Where I can read about those known issues ?
>
> (not found in [1]).
>
> 2. For systemd envs where /etc/init.d files are still used, what do you
> recommend ?
>
> 3. For systemd envs where /etc/init.d files are not used anymore, what do
> you recommend ?
>
> 4. Suggestions ?
>
> Regards
>
>
>
> [1] https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=
> asterisk;dist=unstable
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
GnuPG Key ID: 0x39BCA9D8
https://www.github.com/mefhigoseth
...:::[ God Rulz ! ]:::...
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-20 Thread Tech Support
Hello;

Over time, we’ve built a huge enterprise level monitoring system for our 
internal and customer PBX’s. Using Nagios as the core, along with Grafana, 
Graphite, Carbon, Whisper, etc. so we can also create custom dynamic 
dashboards, we typically monitor over 1,000 different metrics for each PBX. For 
something like monitoring a system process like Asterisk, besides just checking 
to see if the process is running or not, we also check about a dozen or so 
related metrics like memory and cpu usage. If anything gets out of whack, the 
system runs the event handler to restart Asterisk. All the plugins are written 
in Perl, so they’re very easy to modify. What I can do if there is an interest 
is take the Asterisk plugin, strip out everything that wouldn’t apply to 
someone not using our system, and make it available to the general public. It's 
up to you guys. What do you think? Would people find that useful?

Regards;

John V.

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Olivier
Sent: Friday, February 17, 2017 10:39 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Which tool to automatically restart Asterisk ?

 

Hello,

Years ago, I used Monit to monitor Asterisk and restart it whenever it failed.

Now, I wonder which tool I should pick for an Debian 8 (current) or CentOS 7 
(future) environment.

The main reason I'm looking for this tool is to avoid as much as possible, 
current 5 minutes delay between Asterisk's stop and first cutomers complains.

 

1. I always install Asterisk from source but I've read in Debian Stretch 
/etc/defaul/asterisk file, the following:
# RUNASTSAFE: run safe_asterisk rather than asterisk (will auto-restart upon
# crash). This is generally less tested and has some known issues
# with properly starting and stopping Asterisk.

Where I can read about those known issues ?

(not found in [1]).

2. For systemd envs where /etc/init.d files are still used, what do you 
recommend ?

3. For systemd envs where /etc/init.d files are not used anymore, what do you 
recommend ?

4. Suggestions ?

Regards



[1] https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=asterisk;dist=unstable

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-17 Thread Stefan Tichy
On Fri, Feb 17, 2017 at 04:38:47PM +0100, Olivier wrote:

> 3. For systemd envs where /etc/init.d files are not used anymore, what do
> you recommend ?

Even if /etc/init.d/ files are still used for other services,
asterisk may have a unit file in /etc/systemd/system/

[Unit]
Description=Asterisk
.

[Service]
Restart=on-failure
RestartSec=15s
ExecStopPost=-/usr/local/bin/send-some-mail
.



-- 
Stefan Tichy  ( asterisk3 at pi4tel dot de )

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Which tool to automatically restart Asterisk ?

2017-02-17 Thread Olivier
Hello,

Years ago, I used Monit to monitor Asterisk and restart it whenever it
failed.

Now, I wonder which tool I should pick for an Debian 8 (current) or CentOS
7 (future) environment.
The main reason I'm looking for this tool is to avoid as much as possible,
current 5 minutes delay between Asterisk's stop and first cutomers
complains.

1. I always install Asterisk from source but I've read in Debian Stretch
/etc/defaul/asterisk file, the following:
# RUNASTSAFE: run safe_asterisk rather than asterisk (will auto-restart upon
# crash). This is generally less tested and has some known
issues
# with properly starting and stopping Asterisk.
Where I can read about those known issues ?
(not found in [1]).

2. For systemd envs where /etc/init.d files are still used, what do you
recommend ?

3. For systemd envs where /etc/init.d files are not used anymore, what do
you recommend ?

4. Suggestions ?

Regards


[1] https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=asterisk;dist=unstable
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users