Skip to content

Script to get UptimeRobot notifications and post them to twitter

License

Notifications You must be signed in to change notification settings

nerdbaggy/uptimerobot-twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UptimeRobot Twitter Bot

I created this tool to post UptimeRobot alerts to twitter. Everything is customizable
alt text


Live Example

Install

  • Download Latest Release Here
  • Unzip and upload to a web accessible folder
  • Add a new alert in UptimeRobot in the 'Web-Hook' category
    For example if your script is at spencerl.com/twitterbot/urtb.php the URL to Notify will be spencerl.com/twitterbot/urtb.php?
  • Configure twitter. See below

Twitter

You need to make 4 keys from twitter to get this working.
Click Here for Directions
Once you have the 4 keys put them in the config.php

Message

You can customize how the messages look when posting to Twitter. You can customize it to however you would like. Just needs to be below 140 chacters. But it can inculde emoji, ascii, links, hashtags, anything! You can customize the message with the variables below.

Example

✔ {{host}} is now now up after {{downtime}} [{{timestamp}} {{timezone}}]
✖ {{host}} has gone down [{{timestamp}} {{timezone}}]
Variable Example Description
{{host}} Website Name of the check
{{id}} 59426326 ID of the check
{{status}} Up Status of the check
{{url}} spencerl.com Host of the check
{{details}} Timeout Why the check failed
{{downtime}} 4 Minutes How long a check was down for
{{timestamp}} 05:24 PM Current time
{{timezone}} UTC Timezone to get timestamp

About

Script to get UptimeRobot notifications and post them to twitter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages