Web Performance is a Journey, Not a Destination

Mehdi Daoudi

Subscribe to Mehdi Daoudi: eMailAlertsEmail Alerts
Get Mehdi Daoudi: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Blog Feed Post

Catchpoint Integration: Node-RED

One of the factors that make Catchpoint so flexible is the three different APIs available for use. This includes the Test Data Webhook and Alert Webhook for pushing data out to a public endpoint, and the REST API for GET and POST requests.

As a Performance Engineer, I like to find new and innovative ways to use the APIs. Recently, I discovered a product called Node-RED. Node-RED is an open source flow-based programming tool. It comes standard with any full installation of Raspbian on your Raspberry Pi (which is where I discovered it).

It soon dawned on me that I should be able to use Node-RED in conjunction with the Catchpoint APIs, but in what capacity? After sifting through the numerous community-generated ‘nodes,’ I stumbled upon the node-red-contrib-web-worldmap, a world map for plotting ‘things’ on. Light bulb moment! How about plotting live test data from Catchpoint? The idea was to place markers on the map and color-code them according to the performance metric value returned.

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w, http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 768w" sizes="(max-width: 795px) 100vw, 795px" />

The flow process was simple. Create a public endpoint to receive the Test Data Webhook, parse the data, and extract what was needed to inject into the world map node.

By default, Node-RED, is accessible via port 1880, so I opened up my router to allow requests to port 1880 to forward to my Raspberry Pi.

The first step is to create an endpoint using the ‘http in’ node and define a URL:

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w" sizes="(max-width: 756px) 100vw, 756px" />

I defined the URL to be /data, which meant my public endpoint would become http://<raspberrypi>:1880/data. This is the URL to use in the Test Data Webhook configuration in the Catchpoint portal.

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w" sizes="(max-width: 733px) 100vw, 733px" />

The only configuration needed in the Catchpoint portal was:

  1. Enable the Test Data Webhook
  2. Enter the endpoint URL as above
  3. Select JSON as the payload format
  4. Enter e-mail address for failure alerts

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w, http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 768w" sizes="(max-width: 821px) 100vw, 821px" />

Node-RED: attaching a ‘debug’ node to the ‘http in’ node allowed me to check that I was receiving the JSON payload.

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w, http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 768w" sizes="(max-width: 798px) 100vw, 798px" />

Next, a ‘function’ node is required to parse the incoming JSON and generate the payload that is required by the ‘World Map’ node. It is also important to note that you need to add an ‘http response’ node to send a 200 response, as the Test Data Webhook expects this.

http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 300w, http://blog.catchpoint.com/wp-content/uploads/2017/12/Screen-Shot-2017-1... 768w" sizes="(max-width: 815px) 100vw, 815px" />

The final step is to add the ‘World Map’ node and set up the properties, like how long the markers live for, zoom level, etc.

Check out our integrations page to learn more about all of the integrations we offer.

 

 

The post Catchpoint Integration: Node-RED appeared first on Catchpoint's Blog - Web Performance Monitoring.

Read the original blog entry...

More Stories By Mehdi Daoudi

Catchpoint radically transforms the way businesses manage, monitor, and test the performance of online applications. Truly understand and improve user experience with clear visibility into complex, distributed online systems.

Founded in 2008 by four DoubleClick / Google executives with a passion for speed, reliability and overall better online experiences, Catchpoint has now become the most innovative provider of web performance testing and monitoring solutions. We are a team with expertise in designing, building, operating, scaling and monitoring highly transactional Internet services used by thousands of companies and impacting the experience of millions of users. Catchpoint is funded by top-tier venture capital firm, Battery Ventures, which has invested in category leaders such as Akamai, Omniture (Adobe Systems), Optimizely, Tealium, BazaarVoice, Marketo and many more.