serviceStatus() method provides a simple way to query the health of IBM Watston IoT Platform in your region. The response is a Python dictionary that firstly, tells you the region your service instance is running in (e.g.
de), and below that will provide a simple
red overview of the health of the platform broken down by different capabilities:
dashboardAvailability of the dashboard
messagingAvailability of the core messaging service (for events, commands, device management protocol etc)
thirdPartyAvailability of the third party connector service (for ARM)
The three status' represent:
greenNo known issues currently
orangeDegraded performance, by service is available
redService outage, or performance significantly impacted as to be unusable
Handling the ServiceStatus data
wiotp.sdk.api.status.ServiceStatusResult class extends defaultdict allowing you to treat the reponse as a simple Python dictionary that contains the json response body of the API call made under the covers if you so choose, however it's designed to make it easy to interact with the API results by providing convenient properties representing the data available from the API:
regionThe Watson IoT Platform region where your organization runs.
messagingThe status of core messaging services in your region.
dashboardThe availability of the web dashboard (UI) in your region.
thirdPartyThe status of third party connector service (for ARM) in your region.
import wiotp.sdk.application options = wiotp.sdk.application.parseEnvVars() appClient = wiotp.sdk.application.ApplicationClient(options) status = appClient.serviceStatus() # If you don't know what region you are in you can look it up from the status region = status.region print("Messaging is %s" % (status.messaging)) print("Dashboard is %s" % (status.dashboard))