A block showing the website's uptime ratio (e.g. 99,98%).
Website statistics are only complete with uptime information. It shows you care about server reliability and makes you look more trustworthy for potential customers.
It uses the service from UptimeRobot.com:
"Monitors your websites every 5 minutes, totally free.
Get alerts by e-mail, SMS, Twitter, RSS or push notifications for iPhone/iPad."
- Optionally show the block for specific roles e.g. only the webmaster.
- Customize colors to match your theme with only some basic CSS knowledge.
- Optionally add a copyright notice that automatically updates to the current year.
At 'admin/config/system/uptime' fill in your 'API key':
Go to http://www.uptimerobot.com ▶ Sign-up (free) ▶ Account Activation ▶ Login ▶ Add New Monitor ▶ Monitor Type: HTTP(s) ▶ Create Monitor ▶ My Settings ▶ Create the main API key ▶ Copy & paste it.
Fill in your 'Monitor ID':
Go to http://api.uptimerobot.com/getMonitors?apiKey=FILL-IN-YOUR-API-KEY-HERE, change the last part of the URL, reload and copy your monitor ID.
Optionally enable the copyright notice that auto updates to the current year, like:
© 2008-2014 www.example.com
Two versions are available:
◦ A visually appealing widget, by default enabled in the footer.
◦ A simple text version, by default disabled.
Block settings at '/admin/structure/block/manage/uptime/uptime_widget/configure'
for the widget or at '/admin/structure/block/manage/uptime/uptime_text/configure'
for the text version.
To use only a simple text, disable the 'Uptime widget' block and enable 'Uptime text only'.
To change the color of the widget:
- Copy & paste the code in the uptime.css into your theme's custom CSS file.
- Make your changes. The concerning lines are commented.
Tip: Use human readable color names instead of codes. It makes your CSS easier to understand. A list of color names.
- Clear both your browser and site cache.
To change the content in the widget (for example to put the ratio first):
- Copy the uptime.tpl.php file to your theme's template folder.
- Make your changes.
- Clear the site cache at '/admin/config/development/performance'.
To override the string "Uptime" or other text strings, you can also use http://drupal.org/project/stringoverrides which provides an easy way to replace any text on your site that's wrapped in the t() function.
- "Can I reset the monitor?"
Go to http://www.uptimerobot.com/myMonitors.asp. In the 'Actions' column delete the monitor and re-create it again.
- "During development my site might be down. Can I pause the monitor?"
Disable uptime in the settings form. This pauses monitoring and removes the ratio display.
- The UpTime gets refreshed every 24 hours or after saving the UpTime settings.
- If the region ‘footer’ is not available in the used theme, the block should be enabled “manually”.
- It should be noted that the cascading stylesheets defined by modules are by default loaded before theme CSS (see Drupal API). UpTime's style might be overwritten by the theme stylesheets. Copy and paste the CSS code in the uptime.css file into your theme's custom CSS file or use this solution.
- The module depends on the curl PHP extension which is usually present on most hosts, otherwise it produces a Fatal Error warning. Check on your site at admin/reports/status/php#module_curl.
Fully functional. Tested on Drupal 8.0-alpha 4-6. No simple text version widget is offered, only the fancy one. Another difference with previous versions is that the block should be 'placed' first at admin/structure/block. A stable version will be released once a stable D8 gets released.
In the same series
The module PageRank Widget.