Get your AT&T M2X based project off the ground quickly using sample app code and deploy in one-step.
AT&T M2X is a cloud-based fully managed time-series data storage service for network connected machine-to-machine (M2M) devices and the industrial Internet of Things (IoT). From trucks and turbines to vending machines and freight containers, M2X enables the devices that power your business to connect and share valuable data.
This QuickStart contains several demo applications that report data to AT&T M2X:
All the steps required to set up all demos are in
.openshift/action_hooks/deploy, so if you want to replicate any part of this setup on your own systems, you can easily see what we've done.
Please note that the virtual machine and M2X are using times in UTC, not in your local time zone.
After you deploy your app you'll need to get your M2X API Master Key. Log into M2X, and click your name in the upper right-hand corner, then the "Account Settings" dropdown, then the "Master Keys" tab. Here's a direct link.
Then you'll need to send those changes to OpenShift:
rhc env set M2X_API_KEY=long-string-of-master-key-here
You should now be sending data on 1-minute, 5-minute, and 15-minute load averages from your OpenShift application to AT&T M2X. It should be updating every minute, and if you refresh your AT&T M2X "loadreport-openshift" Device page, you should be able to click each load average and see graphs showing your load averages over time.
If not, you can look at loadreport.log in the
$OPENSHIFT_LOG_DIR, which records any errors in sending the data to M2X. You can also SSH to the OpenShift gear with the
rhc ssh command to run standard Linux/Unix troubleshooting commands.
Your stockreport.py should now be reporting the price of AT&T's stock to AT&T M2X every minute. (Please note that the NYSE is open from 9:30 AM to 4 PM Eastern Time, and the stock price reported outside those hours will not change.)
If there are any errors from stockreport.py, they will be logged in stockreport.log in your
$OPENSHIFT_LOG_DIR directory, or you can
rhc ssh to the OpenShift gear for troubleshooting.
This library is released under the MIT license. See
LICENSE for the terms.