[asterisk-users] Which tool to automatically restart Asterisk ?
Tahir Almas
tahir at ictinnovations.com
Mon Feb 27 22:12:45 CST 2017
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 <tzafrir.cohen at xorcom.com>
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 at 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.cohen at xorcom.com
> +972-50-7952406 mailto:tzafrir.cohen at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170227/0c8bc7c9/attachment.html>
More information about the asterisk-users
mailing list