StatusPage () is a 3rd party service that allows you to create a dedicated web page for any service/website that you host, listing the status(es) (e.g., operational, partial service outage, complete service outage, scheduled maintenance, etc.) of those services/websites. Services incidents can be created manually through the StatusPage web interface or triggered automatically by other 3rd party services integrated with StatusPage. For example, if a website is is monitored by Pingdom, Pingdom can send an alert to StatusPage when a website goes down or becomes slow to respond, allowing StatusPage to automatically create an incident.
StatusPage also supports what it calls "components". Since larger websites can have multiple pieces/processes, such as their core services, APIs, single sign-on connectivity, databases, etc., StatusPage allows you to display and report statuses on each of these items individually. Because websites can be partially operational when only some services are offline (e.g. an API link to a 3rd party), StatusPage provides status reporting on each component individually.
When an incident is created, users can be alerted to the incident by email if they subscribe to the StatusPage for the associated service/website or web pages for the service/website via the StatusPage API (assuming that the website/service is still sufficiently operational to retrieve the message and display it to users).
CF Foundry uses ServerDensity for website monitoring. ServerDensity doesn't have an integration with StatusPage, but ServerDensity and StatusPage both integrate with PagerDuty. Thus, CF Foundry websites that are connected to StatusPage do so through PagerDuty.
Loading the StatusPage API Library
StatusPage provides an API that is accessible via JavaScript library (StatusPage refers to this as their Status Widget). To display StatusPage information about any monitored service/website, the library must be loaded prior to making any requests for information as follows:
Once the library is loaded, you can retrieve the operational status or listing of incidents, scheduled maintenances, or subscriber to StatusPager alerts. Also, you can retrieve a summary, which includes a status indicator (text), component statuses, unresolved incidents, and any upcoming or in-progress scheduled maintenances.
The StatusPage API returns all information as a JSON object.
StatusPage will then then respond with a JSON response:
{
"page": {
"id": "y4pdqhxny8rp",
"name": "Matchmaker",
"url": "https://cffoundry.statuspage.io",
"updated_at": "2019-03-04T14:20:05-05:00"
},
"status": {
"description": "Partial System Outage",
"indicator": "major"
}
"components": [
{
"created_at": "2014-05-03T01:22:07.274Z",
"description": null,
"id": "b13yz5g2cw10",
"name": "API",
"page_id": "y4pdqhxny8rp",
"position": 1,
"status": "partial_outage",
"updated_at": "2014-05-14T20:34:43.340Z"
},
{
"created_at": "2014-05-03T01:22:07.286Z",
"description": null,
"id": "9397cnvk62zn",
"name": "Management Portal",
"page_id": "y4pdqhxny8rp",
"position": 2,
"status": "major_outage",
"updated_at": "2014-05-14T20:34:44.470Z"
}
],
"incidents": [
{
"created_at": "2014-05-14T14:22:39.441-06:00",
"id": "cp306tmzcl0y",
"impact": "critical",
"incident_updates": [
{
"body": "Our master database has ham sandwiches flying out of the rack, and we're working our hardest to stop the bleeding. The whole site is down while we restore functionality, and we'll provide another update within 30 minutes.",
"created_at": "2014-05-14T14:22:40.301-06:00",
"display_at": "2014-05-14T14:22:40.301-06:00",
"id": "jdy3tw5mt5r5",
"incident_id": "cp306tmzcl0y",
"status": "identified",
"updated_at": "2014-05-14T14:22:40.301-06:00"
}
],
"monitoring_at": null,
"name": "Unplanned Database Outage",
"page_id": "y4pdqhxny8rp",
"resolved_at": null,
"shortlink": "http://stspg.dev:5000/Q0E",
"status": "identified",
"updated_at": "2014-05-14T14:35:21.711-06:00"
}
],
"scheduled_maintenances": [
{
"created_at": "2014-05-14T14:24:40.430-06:00",
"id": "w1zdr745wmfy",
"impact": "none",
"incident_updates": [
{
"body": "Our data center has informed us that they will be performing routine network maintenance. No interruption in service is expected. Any issues during this maintenance should be directed to our support center",
"created_at": "2014-05-14T14:24:41.913-06:00",
"display_at": "2014-05-14T14:24:41.913-06:00",
"id": "qq0vx910b3qj",
"incident_id": "w1zdr745wmfy",
"status": "scheduled",
"updated_at": "2014-05-14T14:24:41.913-06:00"
}
],
"monitoring_at": null,
"name": "Network Maintenance (No Interruption Expected)",
"page_id": "y4pdqhxny8rp",
"resolved_at": null,
"scheduled_for": "2014-05-17T22:00:00.000-06:00",
"scheduled_until": "2014-05-17T23:30:00.000-06:00",
"shortlink": "http://stspg.dev:5000/Q0F",
"status": "scheduled",
"updated_at": "2014-05-14T14:24:41.918-06:00"
},
{
"created_at": "2014-05-14T14:27:17.303-06:00",
"id": "k7mf5z1gz05c",
"impact": "minor",
"incident_updates": [
{
"body": "Scheduled maintenance is currently in progress. We will provide updates as necessary.",
"created_at": "2014-05-14T14:34:20.036-06:00",
"display_at": "2014-05-14T14:34:20.036-06:00",
"id": "drs62w8df6fs",
"incident_id": "k7mf5z1gz05c",
"status": "in_progress",
"updated_at": "2014-05-14T14:34:20.036-06:00"
},
{
"body": "We will be performing rolling upgrades to our web tier with a new kernel version so that Heartbleed will stop making us lose sleep at night. Increased load and latency is expected, but the app should still function appropriately. We will provide updates every 30 minutes with progress of the reboots.",
"created_at": "2014-05-14T14:27:18.845-06:00",
"display_at": "2014-05-14T14:27:18.845-06:00",
"id": "z40y7398jqxc",
"incident_id": "k7mf5z1gz05c",
"status": "scheduled",
"updated_at": "2014-05-14T14:27:18.845-06:00"
}
],
"monitoring_at": null,
"name": "Web Tier Recycle",
"page_id": "y4pdqhxny8rp",
"resolved_at": null,
"scheduled_for": "2014-05-14T14:30:00.000-06:00",
"scheduled_until": "2014-05-14T16:30:00.000-06:00",
"shortlink": "http://stspg.dev:5000/Q0G",
"status": "in_progress",
"updated_at": "2014-05-14T14:35:12.258-06:00"
}
]
}
For complete details on the Status Widget API, see the StatusPage documentation.
For us to integrate the StatusPage status information into a website, we generate basic JavaScript code that loads the data into pre-defined, empty divs on the HTML page. Generally the divs are hidden for maintenance or incident-based information and then triggered and populated via jQuery as so: