ericallenpaul / Zabbix-Twilio.sh

A set of shell scripts to send SMS messages with Zabbix. It supports scheduling
16 stars 8 forks source link

Template configuration for Alert trigger and user #9

Open alexeinporiss opened 1 year ago

alexeinporiss commented 1 year ago

Hi! Everyone can someone show me all the configuration to make the trigger action work to receive the SMS. image image image image

I attached the setting I have for now. Can someone tell me what I'm doing wrong... ?

alexeinporiss commented 1 year ago

You can closed de topic. To put the bash variable $OnCallNumber work. I modified the script to have multiple phone number

# get the phone number

if [ "$UseWeeklySchedule" -eq 1 ];
then
        PHONENUMBER=$(cat $PHONEFILE)
else
        PHONENUMBER="$OnCallNumber"
fi

# Send SMS to the first on call number
echo "$1" | $DIRECTORY/twilio-sms.sh -c $DIRECTORY/twilio-sms.conf $PHONENUMBER

# Check if there is a second on-call number
if [ -n "$OnCallNumber2" ]; then
    # Use the second OnCallNumber
    PHONENUMBER="$OnCallNumber2"
    # Send SMS to the second on call number
    echo "$1" | $DIRECTORY/twilio-sms.sh -c $DIRECTORY/twilio-sms.conf $PHONENUMBER
fi

echo ok