[arm-allstar] detect if Allstar is not running
Kevin Davis
blu666z at gmail.com
Fri Jun 17 19:05:47 EDT 2022
If you know the PID, could you check for the existence of /proc/{PID}?
> On Jun 17, 2022, at 3:46 PM, Don Sayler via ARM-allstar <arm-allstar at hamvoip.org> wrote:
>
> Cool. Thanks JAson.
>
>> On Fri, Jun 17, 2022 at 2:18 PM "Jason Schollenberger via ARM-allstar" <
>> arm-allstar at hamvoip.org> wrote:
>>
>> I use cron to write out a file that UptimeRobot monitors. The check ensures
>> that the node number is found in the output otherwise I get an alert.
>>
>> */5 * * * * asterisk -rx "rpt localnodes 50420" >
>> /srv/http/.astmonitor.html
>>
>> I like querying for localnodes and then having the check ensure the NodeID
>> is in the output since it's a bit more comprehensive. It ensures asterisk
>> is running and responsive and that things are likely working. There are
>> some other commands you could run to set up other checks as well.
>>
>> Jason
>>
>> On Fri, Jun 17, 2022 at 1:35 PM "Don Sayler via ARM-allstar" <
>> arm-allstar at hamvoip.org> wrote:
>>
>>> Thanks Ken, I'll give that a try. I'm not a Linux guy, so I didn't know
>>> that one.
>>>
>>> On Fri, Jun 17, 2022 at 9:42 AM "Ken Arck via ARM-allstar" <
>>> arm-allstar at hamvoip.org> wrote:
>>>
>>>> Why don't you just do a 'ps aux | grep asterisk' via a cronjob every
>>>> once in a while?
>>>>
>>>>
>>>>
>>>> At 09:07 AM 6/17/2022, you wrote:
>>>>> Not verbally. I already have a supervisory app that periodically
>> checks
>>>>> things on our repeaters, and notifies me if something is amiss. I'd
>> like
>>>> to
>>>>> add the Allstar status to that.
>>>>>
>>>>> On Fri, Jun 17, 2022 at 8:31 AM "wrhowell amphibiansolutions.us via
>>>>> ARM-allstar" <arm-allstar at hamvoip.org> wrote:
>>>>>
>>>>>> So you want something that verbally says to you that Asterisk
>> Server
>>> is
>>>>>> not running once it stops?
>>>>>>
>>>>>>
>>>>>> KI5PHN
>>>>>> ________________________________
>>>>>> From: ARM-allstar <arm-allstar-bounces at hamvoip.org> on behalf of
>>> "Don
>>>>>> Sayler via ARM-allstar" <arm-allstar at hamvoip.org>
>>>>>> Sent: Friday, June 17, 2022 9:50 AM
>>>>>> To: ARM Allstar <arm-allstar at hamvoip.org>
>>>>>> Cc: Don Sayler <don.sayler at gmail.com>
>>>>>> Subject: Re: [arm-allstar] detect if Allstar is not running
>>>>>>
>>>>>> I know that. I'm trying to create a headless remote monitoring
>>> system.
>>>>>>
>>>>>> On Fri, Jun 17, 2022 at 7:40 AM "Michael Webb via ARM-allstar" <
>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>
>>>>>>> Ok, so if it says cannot connect to Asterisk, that's all you need
>>> to
>>>>>> know.
>>>>>>> If it can't connect, it's not running.
>>>>>>>
>>>>>>> On Fri, Jun 17, 2022, 12:58 AM "Don Sayler via ARM-allstar" <
>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>
>>>>>>>> Right, but that's not part of the url.
>>>>>>>>
>>>>>>>> On Thu, Jun 16, 2022, 10:14 PM "Larry via ARM-allstar" <
>>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>>
>>>>>>>>> Type the node number in the filter box --- upper right corner
>>>>>>>>>
>>>>>>>>> Larry - N7FM
>>>>>>>>>
>>>>>>>>> On 6/16/22 10:01 PM, "Don Sayler via ARM-allstar" wrote:
>>>>>>>>>> I thought about using this...
>>>>>>>>>> https://www.allstarlink.org/nodelist/
>>>>>>>>>>
>>>>>>>>>> and looking at the Last Seen time.
>>>>>>>>>>
>>>>>>>>>> But there doesn't seem to be a way to query a specific node
>>> in
>>>> the
>>>>>>> url.
>>>>>>>>>>
>>>>>>>>>> On Thu, Jun 16, 2022 at 9:32 PM Don Sayler <
>>>> don.sayler at gmail.com>
>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> If I use the AST STOP button, the spinner does stop on
>> that
>>>> page
>>>>>>> for a
>>>>>>>>> few
>>>>>>>>>>> seconds.
>>>>>>>>>>> But eventually, the node info box says 'Could not connect
>> to
>>>>>>> Asterisk
>>>>>>>>>>> Manager.' and the spinner starts again.
>>>>>>>>>>>
>>>>>>>>>>> Now that I think about it though, it doesn't really matter
>>>> since
>>>>>> the
>>>>>>>>> html
>>>>>>>>>>> itself doesn't change.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jun 16, 2022 at 6:13 PM "Dave Petrie via
>>> ARM-allstar"
>>>> <
>>>>>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> you have to refresh your browser to make sure
>>>>>>>>>>>> after you do a restart from supermon if you don't
>> refresh,
>>>> the
>>>>>>>>> spinning /
>>>>>>>>>>>> stays steady when
>>>>>>>>>>>> it really is running, that's what i see with firefox
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jun 16, 2022 at 8:27 PM "Don Sayler via
>>> ARM-allstar"
>>>> <
>>>>>>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks Michael.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Good idea! I just checked, and the spinny thing keeps
>>>> spinning.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Jun 16, 2022 at 3:00 PM "Michael Webb via
>>>> ARM-allstar" <
>>>>>>>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Doesn't the spinning symbol at the bottom stop when the
>>>> Allstar
>>>>>>>>>>>> service
>>>>>>>>>>>>> is
>>>>>>>>>>>>>> stopped?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Jun 16, 2022, 3:54 PM "Don Sayler via
>>> ARM-allstar"
>>>> <
>>>>>>>>>>>>>> arm-allstar at hamvoip.org> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Is there a way to remotely detect if Allstar is not
>>>> running on
>>>>>>> the
>>>>>>>>>>>>> node?
>>>>>>>>>>>>>>> It looks like the HTML is the same whether Allstar is
>>>> running
>>>>>> or
>>>>>>>>>>>> not.
>>>>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>>>> Don
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ARM-allstar mailing list
>>>>>>>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>>>>>>>
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Visit the BBB and RPi2/3/4 web page -
>>> http://hamvoip.org
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ARM-allstar mailing list
>>>>>>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>>>>>>
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Visit the BBB and RPi2/3/4 web page -
>> http://hamvoip.org
>>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>> ARM-allstar mailing list
>>>>>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>>>>>
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>>>>>
>>>>>>>>>>>>> Visit the BBB and RPi2/3/4 web page -
>> http://hamvoip.org
>>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>
>>>>>>>>>>>> ARM-allstar mailing list
>>>>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>>>>
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>>>>
>>>>>>>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>>
>>>>>>>>>> ARM-allstar mailing list
>>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>>
>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>>
>>>>>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>>>> _______________________________________________
>>>>>>>>>
>>>>>>>>> ARM-allstar mailing list
>>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>>>
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>>
>>>>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>>
>>>>>>>> ARM-allstar mailing list
>>>>>>>> ARM-allstar at hamvoip.org
>>>>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>>
>>>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>>
>>>>>>> ARM-allstar mailing list
>>>>>>> ARM-allstar at hamvoip.org
>>>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>>
>>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>> ARM-allstar mailing list
>>>>>> ARM-allstar at hamvoip.org
>>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>
>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>> _______________________________________________
>>>>>>
>>>>>> ARM-allstar mailing list
>>>>>> ARM-allstar at hamvoip.org
>>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>>
>>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> ARM-allstar mailing list
>>>>> ARM-allstar at hamvoip.org
>>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>>
>>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>
>>>>
>>>>
>>>
>> ------------------------------------------------------------------------------
>>>> President and CTO - Arcom Controllers
>>>> Makers of repeater controllers and accessories
>>>> Phone: (503) 678 6182
>>>> https://www.arcomcontrollers.com/
>>>> Authorized Dealers for Kenwood and Telewave.
>>>> We offer complete turn-key repeater packages!
>>>> "We don't just make 'em. We use 'em!"
>>>> []
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> ARM-allstar mailing list
>>>> ARM-allstar at hamvoip.org
>>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>>
>>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>>
>>> _______________________________________________
>>>
>>> ARM-allstar mailing list
>>> ARM-allstar at hamvoip.org
>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>
>>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>>
>> _______________________________________________
>>
>> ARM-allstar mailing list
>> ARM-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list