Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue finding twilio-sms.conf file #1

Open
spauldingportraits opened this issue Aug 14, 2020 · 16 comments
Open

Issue finding twilio-sms.conf file #1

spauldingportraits opened this issue Aug 14, 2020 · 16 comments

Comments

@spauldingportraits
Copy link

trying to implement this in my zabbix install.

using the script test command works correctly and sends SMS. Once I add it as a media type and try to test it, it fails with an error saying it can't find the configuration file.

The error I get is as follow's.
Details Media type test failed.
AccountSid not set, it must be provided in the config file, or on the command line.
Usage: twilio-sms [-v] [-c configfile] [-d callerid] [-u accountsid] [-p authtoken] number [number[number[...]]]

I've provided the -c /usr/lib/zabbix/alertscripts/twilio-sms.conf both in the script name and as a parameter and it still fails to find the script.

@coconutservices
Copy link

I also had this issue, what is the correct way to setup this script in the media type settings?

@ericallenpaul
Copy link
Owner

@ericallenpaul
Copy link
Owner

This is what my action looks like:
https://github.com/ericallenpaul/Zabbix-Twilio.sh/blob/master/Image%2011.jpg

@ang3lwitch
Copy link

ang3lwitch commented Dec 5, 2020

Hello, I did test this out and POC, seems to work great.
my question is, are there any settings via twilio console I will need to set or tweak.

Currently using a free trial account and according to twilio, should be functional with no restrictions.

I do get sms messages to my phone, however it says something along the lines of,

sent via twilio to free account to "my name"

thanks a bunch...other than that this seems fairly easy to implement.
appreciate you.

having that said, it wont send the actual zabbix messages. I did check the
.jpg files you sent up to mimic what you have.

@ericallenpaul
Copy link
Owner

ericallenpaul commented Dec 5, 2020 via email

@ang3lwitch
Copy link

ok, thanks for that
Enjoy the weekend

@spauldingportraits
Copy link
Author

spauldingportraits commented Dec 5, 2020 via email

@ang3lwitch
Copy link

ang3lwitch commented Dec 5, 2020 via email

@spauldingportraits
Copy link
Author

spauldingportraits commented Dec 5, 2020 via email

@ang3lwitch
Copy link

Well, I do get alerts every time I manipulate a trigger.
A message does come to my phone, that is good.

What I am failing to understand or do is to get the whole body of the zabbix alert, i.e. "host is down" or " diskspace is low on {HOST.NAME} etc...

All i get is "Sent from your Twilio trial account: then nothing else.
Is that by design or am i doing it wrong, lol?

I would not think the trial account would limit my messages, they say it is fully functional.

so my guess is either I am possibly missing an rpm package to assist (CentOS7) and zabbix 5.0.5.

@spauldingportraits
Copy link
Author

spauldingportraits commented Dec 6, 2020 via email

@ericallenpaul
Copy link
Owner

Yep. You just need to make sure you're using the right variables in your action based on the text message you want to see.
My default message is:
{TRIGGER.STATUS} : {TRIGGER.NAME} - {HOSTNAME} ({IPADDRESS})
Trigger severity: {TRIGGER.SEVERITY}

@frank3427
Copy link

what is the best way to filter our hosts from the SMS, for example I do not want to be altered if dev or testing servers have an event?

@ericallenpaul
Copy link
Owner

ericallenpaul commented Apr 28, 2021

Put the hosts in maintenance. Add a rule to your action for "Maintenance status not in maintenance"

@vali5k
Copy link

vali5k commented Feb 15, 2022

trying to implement this in my zabbix install.

using the script test command works correctly and sends SMS. Once I add it as a media type and try to test it, it fails with an error saying it can't find the configuration file.

The error I get is as follow's. Details Media type test failed. AccountSid not set, it must be provided in the config file, or on the command line. Usage: twilio-sms [-v] [-c configfile] [-d callerid] [-u accountsid] [-p authtoken] number [number[number[...]]]

I've provided the -c /usr/lib/zabbix/alertscripts/twilio-sms.conf both in the script name and as a parameter and it still fails to find the script.

i got the same problem with my sms alerts. did someone find a solution to this problem?
image

@ericallenpaul
Copy link
Owner

ericallenpaul commented Feb 16, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants