Monitor your WordPress site with Grafana Cloud

Have you ever wanted to know how your WordPress blog was running after you just published a new article? Or maybe you just installed or updated a new WordPress plugin and you are not sure how the site is responding. Well in this post I will show you how to send your WordPress telemetry data to Grafana Cloud so you can visualize and monitor your front end user experience. Then we will setup an external monitor to ping your site and alert you if it goes down.

Let’s get started!

First you will need to sign up for a free Grafana Cloud Account

Don’t worry, the link is legit and it doesn’t require a credit card. It is pro version for a week but then converts to free forever. What I am showing in this blog post is all working in a free account. Still not sure? I also work for Grafana check my LinkedIn here!

Once you are logged in to Grafana Cloud go through the Wizard to create a new stack, I just used the defaults, then click Launch

You should see a page like this, you may have to click through some getting started guides.

Navigate to Frontend and then click Create New

Enter a name for this new monitor then enter the originating domain full address and click next.

Now select CDN and copy the Java Script code to the clipboard then click continue

Now in your WordPress Admin page Navigate to Code Snippets then click Header/Footer

Now carefully paste the code from Grafana Cloud into the header and click save changes.

Open a browser and refresh your WordPress site a couple times to get some data into Grafana Cloud.

Now go back to Grafana Cloud and click complete

Notice you have some page loads, now click on your app to expand the full view.

Now you can see how your blog is performing for your end users. You may want to update your theme or plug-ins or remove a new plugin if you see degraded performance.

But what if your site goes down? How would you know?

Let’s setup a an external monitor for you site

Navigate to Synthetics and click Get started

Click Create Check

Click the API Endpoint

Add a Job Name then choose HTTP and enter your blog url and click Define uptime

Add 200 as a valid status code, if you are using SSL set the option to check for SSL, Set the timeout or leave as default then click Lables

If you want to add labels you can add them here or just click Alerting

Set alerting to high so you can configure alerts to e-mail later, then click Execution

Now choose a location to check from, I choose Oregon. Then choose the frequency and click test.

If it passsed, Click the x to close it and then click save.

After about 20 min you should see the following. It will need to run a couple checks to get your stats. Click View Dashboard to see more details.

See detailed uptime of your WordPress site.

To send alerts to your e-mail see the following instructions https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/configure-alerts/synthetic-monitoring-alerting

Remember sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.