SYS-CON MEDIA Authors: Pat Romanski, Gary Arora, Zakia Bouachraoui, Yeshim Deniz, Liz McMillan

Blog Feed Post

How to BYO Status Page with our Node-RED Integration

In the second part of this blog series on using our integration with Node-RED, we will demonstrate how to build your own status page that can be used for public or internal purposes. A status page is a great and simple way to display the current status of key web platforms, APIs, etc. This exercise will exclusively use the Catchpoint REST API to pull data in order to populate a status page.

Tech how-tos are similar in many ways to following a recipe; it’s a step-by-step process that, if you follow the instructions properly, will give you the results you’re looking for. So, put your geek apron on and go get the following ingredients:

  • 4oz large spoonful of Catchpoint REST API
  • 2oz Node-RED
  • 1oz Boostrap

In true recipe fashion, this is what the finished product will look like:

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR1-300x170.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR1-768x435.jpg 768w" sizes="(max-width: 640px) 100vw, 640px" />

 

As we are using the REST API, we will need to authenticate and retrieve a token. The token only lives for 30 minutes so we will also need to refresh the token periodically. The Node-RED flow will need to:

  • Refresh every 30 minutes
  • Pass down a key and secret and configure headers as required by the REST API
  • Send POST request to get token
  • Retrieve token, base64 encode it, and set a global variable (helpful for other nodes that might use the REST API)

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR2-300x22.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR2-768x57.jpg 768w" sizes="(max-width: 640px) 100vw, 640px" />

The next step is to create a ‘Favorite Chart’ in the Catchpoint Portal. This will contain the tests and metric(s) you wish to show on your status page. Creating a ‘Favorite Chart’ is also a very easy way to fetch data for multiple tests in a single REST API call. Once you have created the chart, you will need to take note of the chart ID. This can be done using the URL below:

https://portal.catchpoint.com/ui/Content/Charts/Performance.aspx?fav=118785

In Node-RED, we can now build out the status page itself. This all begins with a GET endpoint, to which we will pass down an authorization header including the base64 encoded token stored in the global variable.

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR3-300x16.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR3-768x41.jpg 768w" sizes="(max-width: 640px) 100vw, 640px" />

 

Now, the REST API call for a favorite chart can be made using the chart ID e.g.

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR4-300x170.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR4-768x435.jpg 768w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR4.jpg 1532w" sizes="(max-width: 640px) 100vw, 640px" />

Next, parse the response ready for insertion into the HTML template and finally respond with a 200 response.

The following code for parsing the REST API response is just an example and not production ready. If you have any suggestions for improvement, please feel free to get in touch with your comments at [email protected].

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR5-300x217.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR5-768x556.jpg 768w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR5.jpg 1520w" sizes="(max-width: 640px) 100vw, 640px" />

The HTML template I used was a basic Bootstrap template using a table to display the data; Node-RED uses Mustache for templating. The following snippet from the HTML template shows the insertion of the parsed data into a table setting colors for the buttons according to the metric value.

http://blog.catchpoint.com/wp-content/uploads/2018/01/NR6-300x110.jpg 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/NR6-768x281.jpg 768w" sizes="(max-width: 640px) 100vw, 640px" />

In my next blog post, I will show you how to use the Catchpoint Test Data Webhook and Node-RED to build out a Grafana dashboard.

The post How to BYO Status Page with our Node-RED Integration 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.

Latest Stories
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
On-premise or off, you have powerful tools available to maximize the value of your infrastructure and you demand more visibility and operational control. Fortunately, data center management tools keep a vigil on memory contestation, power, thermal consumption, server health, and utilization, allowing better control no matter your cloud's shape. In this session, learn how Intel software tools enable real-time monitoring and precise management to lower operational costs and optimize infrastructure...
"Calligo is a cloud service provider with data privacy at the heart of what we do. We are a typical Infrastructure as a Service cloud provider but it's been designed around data privacy," explained Julian Box, CEO and co-founder of Calligo, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Isomorphic Software is the global leader in high-end, web-based business applications. We develop, market, and support the SmartClient & Smart GWT HTML5/Ajax platform, combining the productivity and performance of traditional desktop software with the simplicity and reach of the open web. With staff in 10 timezones, Isomorphic provides a global network of services related to our technology, with offerings ranging from turnkey application development to SLA-backed enterprise support. Leadin...
While a hybrid cloud can ease that transition, designing and deploy that hybrid cloud still offers challenges for organizations concerned about lack of available cloud skillsets within their organization. Managed service providers offer a unique opportunity to fill those gaps and get organizations of all sizes on a hybrid cloud that meets their comfort level, while delivering enhanced benefits for cost, efficiency, agility, mobility, and elasticity.
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), while reinvention of IT Ops has lagged. However, new approaches like Site Reliability Engineering, Observability, Containerization, Operations Analytics, and ML/AI are driving a resurgence of IT Ops. In this session our expert panel will focus on how these new ideas are [putting the Ops back in DevOps orbringing modern IT Ops to DevOps].
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
Enterprises are striving to become digital businesses for differentiated innovation and customer-centricity. Traditionally, they focused on digitizing processes and paper workflow. To be a disruptor and compete against new players, they need to gain insight into business data and innovate at scale. Cloud and cognitive technologies can help them leverage hidden data in SAP/ERP systems to fuel their businesses to accelerate digital transformation success.
Concerns about security, downtime and latency, budgets, and general unfamiliarity with cloud technologies continue to create hesitation for many organizations that truly need to be developing a cloud strategy. Hybrid cloud solutions are helping to elevate those concerns by enabling the combination or orchestration of two or more platforms, including on-premise infrastructure, private clouds and/or third-party, public cloud services. This gives organizations more comfort to begin their digital tr...
Most organizations are awash today in data and IT systems, yet they're still struggling mightily to use these invaluable assets to meet the rising demand for new digital solutions and customer experiences that drive innovation and growth. What's lacking are potent and effective ways to rapidly combine together on-premises IT and the numerous commercial clouds that the average organization has in place today into effective new business solutions.
Keeping an application running at scale can be a daunting task. When do you need to add more capacity? Larger databases? Additional servers? These questions get harder as the complexity of your application grows. Microservice based architectures and cloud-based dynamic infrastructures are technologies that help you keep your application running with high availability, even during times of extreme scaling. But real cloud success, at scale, requires much more than a basic lift-and-shift migrati...
David Friend is the co-founder and CEO of Wasabi, the hot cloud storage company that delivers fast, low-cost, and reliable cloud storage. Prior to Wasabi, David co-founded Carbonite, one of the world's leading cloud backup companies. A successful tech entrepreneur for more than 30 years, David got his start at ARP Instruments, a manufacturer of synthesizers for rock bands, where he worked with leading musicians of the day like Stevie Wonder, Pete Townsend of The Who, and Led Zeppelin. David has ...
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Addteq is a leader in providing business solutions to Enterprise clients. Addteq has been in the business for more than 10 years. Through the use of DevOps automation, Addteq strives on creating innovative solutions to solve business processes. Clients depend on Addteq to modernize the software delivery process by providing Atlassian solutions, create custom add-ons, conduct training, offer hosting, perform DevOps services, and provide overall support services.