Skip to content

ddepaoli3/monit2sns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

monit2sns

A simple script to send Monit alerts using AWS SNS.

By default, Monit only sends alert notifications via email. But we can also set a hook to execute a script. When executing the script, Monit sets a few environment variables about the alert.

This tiny script transforms those variables into a text message and pipes them to AWS SNS.

This script is inspired by Monit2Twilio and monit2telegram

How to install

  1. Edit monit2snsrc configuring region and topic ARN
  2. chmod +x sendsns.sh
  3. Copy sendsns.sh to /usr/local/bin: cp sendsns.sh /usr/local/bin
  4. Optionally copy config file to /etc: cp monit2snsrc /etc/monit2snsrc

How to execute script

After installing the script:

sendsns.sh -m "message to send to topic ARN" -c monit2snsrc

If the config file is copied to /etc/monit2snsrc:

sendsns.sh -m "message to send to topic ARN" 

About

script to send monit notification with AWS SNS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages