Tutorial Freeboard and StatusHub

Jackbox

Active Member
Joined
Jan 2, 2016
Messages
171
Reaction score
88
Points
74
Age
25
StatusHub is a service offered to you by Vivid Amber Ltd. We are the owner of the StatusHub Software as a Service (the Service).
Freeboard is a damn-sexy, open source real-time dashboard builder for IOT and other web mashups. A free open-source alternative to Geckoboard.

Want to use them together? Easy.

Setting up Freeboard is an important part. Start with a typical LAMP stack:
Code:
sudo su
apt-get -y install git
cd /var/www/html
git clone https://github.com/Freeboard/freeboard.git
ls
You will need an API key from StatusHub. You can do a cURL check with (replace API_KEY_HERE):
Code:
curl -X GET -H "Content-type: application/json" -d '{"api_key":"API_KEY_HERE"}' https://api.statushub.io/api/status_pages
From the Freeboard panel, add a source:

Type: JSON
Name: StatusHub
URL: https://api.statushub.io/api/status_pages
TRY THINGPROXY: YES
REFRESH EVERY: 10
METHOD: GET
BODY: {"api_key":"APY_KEY_HERE"}
Headers: Content-type application/json

Now that you have the StatusHub source added, you are able to create an indicator widget for example:
Code:
"widgets": [
                {
                    "type": "indicator",
                    "settings": {
                        "title": "",
                        "value": "datasources[\"Test\"][0][\"down_services_count\"]",
                        "on_text": "datasources[\"Test\"][0][\"down_services_count\"] + \" down service(s)\"",
                        "off_text": "No problems"
                    }
                }
 
Last edited:

Top