How to check the status of Transifex's service using your own monitoring tool


#1

In this tip we’ll show you how to programmatically fetch information about the status of Transifex’s services.

First, some background: as many may already know, Transifex has a web page, located at status.transifex.com which is automatically updated by our monitoring systems in case an issue is detected, and which is also updated with relevant information by the team during and after any incident (updates also go out via twitter at @TransifexStatus).

Some users, who may be responsible for their company’s integration with the Transifex service may find it convenient to be able to access this information using their own monitoring systems (for example a monitoring dashboard). Fortunately the Transifex status page also exposes a Web API, available and documented at status.transifex.com/api/, which can be used to retrieve the same data that is available via the regular status page.

The examples in the documentation we linked at above are meant for integrating with a web-based dashboard, which is fine for some use cases. If you want to do something more complicated, such as triggering alerts or writing to a database, you can use the API directly of course, but how you do it will depend on the platform you are developing this functionality on. There also exist many wrapper libraries built by the statuspage.io community for doing so more conveniently. Below is an example on Node.js using the statuspage-node wrapper:

'use strict';

const statusPageFactory = require('statuspage-node'),
      statusPage = statusPageFactory('transifex');

statusPage.getReport('status').then(function (summary) {
    if (summary.status.indicator != 'none') {
        console.log('Transifex is having issues');
        console.log(summary.status);
    } else {
        console.log('all good');
    };
});

Feel free to ask any questions in the comments below!