Script to get UptimeRobot notifications and post them to twitter
PHP
Latest commit ca01e2b Feb 4, 2016 @nerdbaggy First Upload
Permalink
Failed to load latest commit information.
twitteroauth First Upload Feb 4, 2016
LICENSE Initial commit Feb 3, 2016
README.md Added the most important part! Feb 4, 2016
config.php First Upload Feb 4, 2016
urtb.php First Upload Feb 4, 2016

README.md

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