[arm-allstar] email alerts from our nodes

Doug Crompton wa3dsp at gmail.com
Fri Dec 13 01:44:45 EST 2019


CAVEATS to the aforementioned script.

This is for permanent connects and OUTBOUND (from the hub) ONLY. Allstar
does retries from the originating end. It will not work for inbound
connections. The destination has no knowledge the link is broken. So you
need to use permanent connects from your hub to important nodes and then
detect a connecting state at the hub which is what the check_nodes script
does.. A startup macro pointing to a script file with all the outbound
connections would establish this at boot or restart. The check_nodes script
should have a delay of a minute or so at its start to ensure all
connections that worked were made before a warning is issued.

This is why supermon is a good choice to check things. It uses the AMI
attached to each individual node to check and control status there. Of
course this involves setting up an AMI connection to each node but once you
have it setup it is a great way to manage your nodes.


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*

On Fri, Dec 13, 2019 at 12:20 AM Doug Crompton <wa3dsp at gmail.com> wrote:

> For those that want to experiment - here is a script that determines if
> any of a group of nodes connected to a hub is in the connecting state. This
> script will output nodes that are connecting and if there are no nodes
> connecting. It mkes no attempt to do anything more than notify by text on
> the screen but the script is annotated to show where you would call other
> scripts or programs to send mail, text, voice announcement using Asterisk
> etc. I will leave the alert method up to the user. The script is called
> check_nodes.sh  It checks every 30 seconds. There is no reason to run this
> more often and even once a minute or two would be fine. In its final state
> it probably would be run in the background.
>
> #!/bin/bash
>
> # WA3DSP 12/2019
> # Determine if a node is in connecting state.
>
> if [ -z "$1" ]
>    then
> echo -e "\nEX: check_nodes.sh <node>\n"
> exit
> fi
> hub_node=$1
>
> while :
> do
> Connecting=0
> asterisk -rx "rpt nodes $hub_node" > /tmp/nodes
>
> values=$(tail -n+4 /tmp/nodes | tr , " ")
>
> for X in $values
> do
> if [[ ${X::1} == "C" ]]
>    then
>        ((Connecting=Connecting+1))
>        echo "Warning! Node ${X:1} in connecting state"
>        # DO SOMETHING HERE LIKE SEND TEXT OR MAIL ABOUT WARNING
> fi
> done
> if [ "$Connecting" == 0 ]
>     then
>         echo "No nodes in Connecting state"
>         # DO SOMETHING HERE TO SHOW ALL CLEAR
> fi
> sleep 30
> done
>
>
> *73 Doug*
>
> *WA3DSP*
>
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>
> On Wed, Dec 11, 2019 at 10:06 AM "Rory Bowers via ARM-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> FTDNA has not answered my question about that yet.  If I don't hear
>> something from them by tomorrow I will bug them again.
>> Rory
>>
>> On Wed, Dec 11, 2019 at 9:04 AM "Jay Urish via ARM-allstar" <
>> arm-allstar at hamvoip.org> wrote:
>>
>> > I'm sure a script can be written in python to query asterisk and if the
>> > results don't match what is expected, fire off a canned email..
>> >
>> > How are your python skills?
>> >
>> > On 12/11/19 8:48 AM, "Jed Barton via ARM-allstar" wrote:
>> > > Hey guys,
>> > >
>> > > OK, so a dumb question.  Not sure if it can be done but thought i
>> would
>> > ask.
>> > > We have several nodes that connect to a hub and they pretty much stay
>> > > parked there all the time.  We do this obviously cause it's a link
>> > > system.
>> > > Is there any way we can get an email alert or something when there is
>> > > no connection from a particular node for a certain amount of time?
>> > > This would be helpful if we lose a link for whatever reason, at least
>> > > we'll know.
>> > > Any thoughts?
>> > >
>> > > Cheers,
>> > >
>> > > Jed
>> > > _______________________________________________
>> > >
>> > > 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