-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Improved debugging, error checking.
- Test setup in conf file without input arguments - Set a default sendgrid URL or allow it to be configured. - Start adding what is needed to send alerts to when sending messages fails
- Loading branch information
Showing
2 changed files
with
169 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# configuration is sourced by the shell script | ||
# the following locations are checked. | ||
# | ||
# $HOME/.sendgrid_zabbix_alert.conf # /etc/zabbix/sendgrid_zabbix_alert.conf | ||
|
||
# Mandatory variables: | ||
# Where the mail should be send from | ||
MAILFROMADDR="[email protected]" | ||
|
||
|
@@ -7,3 +13,28 @@ MAILFROMNAME="Zabbix Alert Script" | |
# Your sendgrid api key | ||
SENDGRID_API_KEY="abc123" | ||
|
||
# optional configuration | ||
#SCRIPTTMPDIR= | ||
# by default /tmp/sendgrid_zabbix_alert_USERNAME | ||
|
||
# Optional debugging / testing settings | ||
|
||
# DEBUG writes debug information stuff to stdout and logged files in /tmp (separate files with unix time) | ||
# | ||
# 1 - script output only | ||
# 2 - enviroment variables and | ||
# 3 - curl"--trace-ascii" output is logged NOTE THAT THIS WILL EXPOSE YOUR API KEY | ||
|
||
# test without input parameters ( set them in config) | ||
# | ||
#TESTPARAMSINCONF=1 | ||
#MAILTO="[email protected]" | ||
#MAILSUBJECT="test subject" | ||
#MAILBODY="let's test this" | ||
|
||
# | ||
# EXIT_BEFORE_CURL=1 | ||
|
||
# CURL_URL | ||
# the script defaults to "https://api.sendgrid.com/v3/mail/send" | ||
# shouldn't need to change this if you are using sendgrid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters