Display your website availability / performances from Catchpoint® SaaS service.
This using the Catchpoint® Pull API.
This gather data for the current day (from midnight to now).
- The Rickshaw graph widget
- Gems :
- httparty
- json
- base64
- time
- Catchpoint® Pull API
key
andsecret
Add this to your erb
dashboard file :
<!-- Catchpoint response time -->
<li data-row="1" data-col="2" data-sizex="6" data-sizey="3">
<div data-id="catchpoint-average-response" style="background: #555b7f;" data-title="Average response time" data-view="Rickshawgraph" data-renderer="area" data-stroke="true" data-colors="#898eab" data-raw-number="true" data-suffix=" ms"></div>
</li>
<!-- Catchpoint availability -->
<li data-row="1" data-col="3" data-sizex="3" data-sizey="3">
<div data-id="catchpoint-average-availability" data-title="Availability" data-view="Meter" data-min="0" data-max="100" data-moreinfo="in % for today"></div>
</li>
Log in to the Catchpoint® portal to configure the API
Then set up the Pull API
There is only 3 mandatory settings :
testId = "<CATCHPOINT_TEST_ID>"
clientId = "<CATCHPOINT_PULL_API_KEY>"
clientSecret = "<CATCHPOINT_PULL_API_SECRET>"
You can customize as you wish the widgetId
, but it must match with the data-id
.
respWidgetId = "my-custom-catchpoint-average-response"
availWidgetId = "my-custom-catchpoint-average-availability"
This is for use with Catchpoint® Favorites charts so the testId
must be the favorite chart id.
More info about this API call here