Welcome!

Web Performance is a Journey, Not a Destination

Mehdi Daoudi

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


Blog Feed Post

How to Build a Grafana Dashboard with Node-RED & InfluxDB

In this final part of our Node-RED integration blog series, I will be covering how you can accelerate your website performance monitoring strategy by building a custom dashboard using the popular open data visualization platform, Grafana.

We will be using Node-RED to act as the endpoint for the Test Data Webhook, which will parse and inject the payload into InfluxDB, which Grafana will then query to build the dashboard. Grafana supports a number of data sources by default, but for this exercise, InfluxDB is used.

The Node-RED portion of this implementation is actually very simple, and to make things even easier, you can grab a skeleton flow directly from GitHub and import this into Node-RED. You will need to install the InfluxDB node in Node-RED.

This is done by going to ‘manage palette,’ selecting the install tab, and searching for InfluxDB.

http://blog.catchpoint.com/wp-content/uploads/2018/01/Node-RED-integrati... 300w" sizes="(max-width: 766px) 100vw, 766px" />

The imported flow creates an endpoint and an extract, transform, and load function into InfluxDB.

This will need to be updated to reflect your InfluxDB configuration. The node defaults to http://127.0.0.1:8086 and a database name of ‘Catchpoint.’

http://blog.catchpoint.com/wp-content/uploads/2018/01/Node-RED-workflow-... 300w" sizes="(max-width: 746px) 100vw, 746px" />

It’s necessary that your Node-RED instance is a public endpoint so the Test Data Webhook can POST data.

InfluxDB and Grafana do not need to be publically exposed; I’ve used Docker to run both as containers on my Mac.

A fresh installation of InfluxDB doesn’t have any databases so you will need to create one. You’ll also need to connect to the InfluxDB instance and create a database:

http://blog.catchpoint.com/wp-content/uploads/2018/01/Node-RED-database-... 300w" sizes="(max-width: 600px) 100vw, 600px" />

You can now configure the Test Data Webhook to point to your new endpoint running in Node-RED and the database will start to populate. The ETL flow in Node-RED will inject data into three new measurements, test_counter, test_byte and test_timing.

The ETL function can easily be edited to suit your own needs by including additional metrics over the ones already defined.

Login into Grafana and from the main menu, select ‘Data Sources.’ Add a new data source and complete the details for your own instance.

http://blog.catchpoint.com/wp-content/uploads/2018/01/Node-RED-integrati... 300w" sizes="(max-width: 743px) 100vw, 743px" />

http://blog.catchpoint.com/wp-content/uploads/2018/01/How-to-integrate-N... 300w" sizes="(max-width: 714px) 100vw, 714px" />

An example JSON schema for a dashboard is available on GitHub; copy this to your clipboard. From the Dashboards menu, select the sub-menu item ‘Import.’ Paste the contents of your clipboard into the ‘Or paste JSON’ text area and click ‘Load.’

http://blog.catchpoint.com/wp-content/uploads/2018/01/Importing-Catchpoi... 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/Importing-Catchpoi... 750w" sizes="(max-width: 751px) 100vw, 751px" />

The dashboard will default to the name ‘Catchpoint,’ so just click Import to continue.

If you have data in InfluxDB, you will see the dashboard display data. The screenshot below is the example dashboard showing last seven days of data for a given test for all nodes.

http://blog.catchpoint.com/wp-content/uploads/2018/01/Catchpoint-perform... 300w, http://blog.catchpoint.com/wp-content/uploads/2018/01/Catchpoint-perform... 768w" sizes="(max-width: 770px) 100vw, 770px" />

If all is working well, you can do a direct comparison with data views from within the Catchpoint portal.

http://blog.catchpoint.com/wp-content/uploads/2018/01/Performance-graph-... 300w" sizes="(max-width: 747px) 100vw, 747px" />

Using tools that work well together is a key element of a sound website performance monitoring strategy, which is why we continue to frequently add new integrations.

If you have any suggestions, feedback, or comments regarding our integration capabilities, please feel free to reach out to blog@catchpoint.com, or start a discussion in our new User Community if you’re already a user.

 

If you’d like to learn more about our integrations and website performance monitoring solutions, check out our website.

The post How to Build a Grafana Dashboard with Node-RED & InfluxDB 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.