One place for hosting & domains


      The 11 Most Important SEO Metrics to Track

      Affiliate Disclosure: DreamHost maintains relationships with some of our recommended partners, so if you click through a link and purchase, we may receive a commission. We only recommend solutions we believe in.

      Search Engine Optimization (SEO) is a collection of techniques used in web design and content creation to increase your website’s reach. When done right, your search engine rankings should improve and your website’s traffic can increase. That’s why knowing to what extent your SEO strategy is making a difference is essential.

      Fortunately, tracking your website’s metrics and analyzing the trends you find helps you understand how users are interacting with your content. Knowing the most crucial SEO metrics to track — such as page views, bounce rates, and conversions — helps you evaluate which strategies might need to be tweaked and which ones are hitting a home run.

      In this article, we’ll share the 11 most important SEO metrics to track. You’ll learn what they mean and how to apply them to your business. We’ll also offer some helpful tips and tools for making sense of the data you collect. Let’s get started!

      Looking for a Shortcut to SEO Success?

      Partner with DreamHost! Our automatic updates and strong security defenses take server management off your hands so you can focus on SEO results.

      Why You Need to Track the Right SEO KPIs

      Tracking your SEO data and crunching the numbers so they provide you with insightful information definitely requires an investment of time and often money. However, 63% of marketers actively invest in SEO, as well as tracking the data that results.

      Without identifying the right key performance indicator (KPI) for your website, your SEO strategy is “flying blind.” This is because SEO metrics tell you exactly how your campaigns are performing, what keywords are getting a response, and which tactics you can stop wasting time on.

      When you track and analyze your SEO metrics appropriately, you’ll have access to specific data points that can inform your decisions and increase your leads, conversions, and more. All you need to get started is to know which numbers matter most.

      The 11 Most Important SEO Metrics to Track

      Websites and their users create a lot of data. To help you sort through the chaos, we’ll take a look at 11 of the most important metrics to track when evaluating your SEO effort.

      1. Keyword Ranking

      Keyword rankings indicate where your website appears in search engine results for specific words and phrases. For example, if you have a construction company, a search including the word building may result in your site only appearing on page three of the results. However, if you’ve used more SEO strategies that focus on the keyword contractor, your site should appear in a better position for searches including that term.

      The higher your site is ranked for relevant keywords, the more visibility it will have to your audience. This means that in order to improve this metric, you’ll want to do some research to determine which terms and phrases your target audience is searching for.

      To start tracking keyword rankings and other related data, there are several SEO tools you can use (check out these 15 awesome options). Google Search Console is the best place to start if you have a small (or nonexistent) budget, while the other products offer scalable pricing depending on your needs.


      If you’re looking for a more robust tool, we recommend SEMrush, an SEO suite that’s trusted by 5 million marketers around the world. Its Position Tracking tool makes it easy to see how your site is ranking for target keywords and paid results each day. Plus, you get in-depth insights into your competitors’ top terms.

      The good news? We’ve worked out a special two-week trial with SEMrush so you can see if this tool is a good fit for your site!

      2. Backlinks

      Backlinks are links to your website from another site. Many backlinks operate like citations, noting where the information came from and referring readers to the original source. Search engines tend to give preference to sites with lots of backlinks, especially if they’re coming from high-quality sources.

      Building backlinks can be tricky since you don’t have direct control over who links to your site. Most of the tools out there related to backlinks are focused on tracking existing backlinks and using that information to help you build better content strategies.

      For example, Linkody is a backlink-specific tool that delivers a lot of useful features.

      The Linkody home page.

      This backlink tool enables you to not just track who is linking to you, but also identify and correct any link errors. It can also be connected to Google Analytics.

      Just remember that when it comes to getting a backlink, quality matters just as much as quantity. So while it’s good to see the overall number of backlinks going up, you’ll want to make sure that as many of them as possible are coming from relevant and highly-ranked websites.

      3. Organic Search Traffic

      Organic search traffic includes visitors who arrive at your website from search engine results rather than through other channels such as social media, paid advertising, or backlinks. One of the easiest ways to track this type of traffic is with Google Analytics.

      Real-time organic search data in Google Analytics.

      Organic search is significant because users who find your site this way are typically searching with a specific goal in mind. In fact, 51% of all web traffic comes from organic search, and over 40% of revenue is generated from it.

      In other words, growing this metric is one of your best options for improving conversions.

      Generating organic traffic requires sharp SEO tactics and effective audience targeting.  This means that tracking this metric over time is vital, so you can see immediately what strategies are working and which need to be amended.

      4. Top Exit Pages for Organic Traffic

      Another common analytic you can track is the last page each user was on right before leaving your website. This is called the “exit page.” Having this information at hand can be just as important as monitoring your overall organic traffic.

      This is because the more you understand why users choose to leave your website, the easier it is to convince them to stick around longer. If the top exit pages share certain elements in common, such as a particular type or style of content, this can be a clue that your target audience is looking for something different.

      Google Analytics is one of the best tools for tracking your site’s top exit pages. You can easily access an Exit Page report and see a breakdown of all the related data.

      5. Breakdown of Organic Traffic from Search Engines

      There’s a lot more to discover about your organic traffic data than simply how many users found you through keyword searches. In fact, Google Analytics offers a detailed breakdown of this traffic.

      Under the Acquisition > All Traffic > Channels menu, you’ll find keywords displayed in context with a number of other key data points.

      Organic search data in Google Analytics.

      This includes how many new users used certain keywords, how long they viewed pages, and whether they generated revenue for your site. Learning about where your organic traffic is coming from and what they’re doing enables you to pinpoint problems to be fixed (such as a high organic traffic rate with few resulting conversions).

      6. Page Views Per User

      Next up: page views. Page views measure how many times the pages on your site have been viewed in a given period of time. This isn’t the same as your traffic number, since many users may visit more than one page.

      This means that page views is a metric best considered in context with other numbers. For example, average page views per session or user can tell you how engaged most visitors are with your site.

      You can also look at this metric in combination with the length of time users spend on your pages. This provides valuable insight into how your content is performing. Are people moving from page to page too quickly, or spending time with each new piece of content?

      If any of these numbers appear troubling, reviewing your content and revisiting your market research are two steps you can take to create a more engaging experience for your users.

      7. Average Time on Page

      Tracking your website users’ average time on page can be tricky. This is because there are many factors that influence user behavior. For example, a tab left open but idle in a browser for hours shouldn’t really be counted as part of the user’s “time on page.”

      According to CrazyEgg, 15 seconds is the average time users spend on a web page. If you find that your numbers are below this benchmark, it might be worth doing some market research to make sure you’re targeting the right audiences.

      Technical issues can also lead to difficulty keeping users on your site. If you suspect this is a problem, you can try checking your page loading speed with a tool like Pingdom.

      Pingdom performance monitoring tools.

      You can also use one of several optimization tactics for boosting the performance of your website.

      8. New vs. Returning Users

      Keeping an eye on your number of new and returning users can be a good indicator of how your audience is responding to your marketing and SEO efforts. For example, if you have more returning customers than new users, that likely means you’ve successfully built some trust and loyalty among your visitors.

      However, this might also mean that while your existing customer base is steady and reliable, you may need to spend more time and resources on attracting new customers. One way to do this is to revisit your target market research and see if anything has changed, or if new markets have emerged where you can focus your SEO effort.

      Alternatively, high numbers of new users are a great sign that your promotional strategies are working. However, if the number of returning visitors is low, you may need to do some work on your site to better capture the attention of those new users.

      9. Bounce Rate

      Your bounce rate is a metric that represents how many visitors leave your website without engaging in any content at all. A user might land on your home page, look around but not click on anything, and leave. If no other actions are taken or pages visited, that’s considered a “bounce.”

      Bounce rates in Google Analytics.

      This rate is found by dividing the number of “no activity” users by the number of overall visitors to the website during the same time frame. Alternatively, you can use Google Analytics’ Behavior > Overview report to get a quick view of your site’s bounce rate.

      Normal bounce rates vary by industry and website type. As a general rule, however, a bounce rate higher than 50 to 60% may indicate a problem with your site’s content. You can take a look at some of the other metrics we’ve discussed, such as the top exit pages and average time on page, to see what’s causing users to bounce away. Then you can make adjustments to your content and strategies in order to keep them around.

      10. Page Speed

      A slow page loading time can have negative consequences on your overall success online.  Whether you’re running a blog or an e-commerce page, no one wants to wait around for your content to fully load.

      In fact, one Google study found that a wait time of just one to three seconds increases the probability that users will bounce away from your website by 32%. The golden rule is to keep your page loading times under two seconds, but the lower they are the better.

      Fortunately, you can easily optimize your website for speed. A great place to start is by testing your site’s performance with a tool like Pingdom or GTmetrix. These solutions will also help you identify aspects of your site that may be hurting its performance.

      11. Conversion Rate

      In many cases, conversion rates are the most crucial SEO metric to track.

      A conversion happens when a visitor to your site completes an action you’ve prompted them to do. For example, if you have a blog, a conversion might happen when a follower signs up for your newsletter. For businesses, a conversion is often measured as a completed sale.

      Whatever your goal might be, conversions are a great way to directly investigate whether your SEO strategy is working. If you’re not happy with your rates, you can use your analytics tools to look closely at your conversion data and see where improvements might be necessary.

      In Google Analytics, for example, you can set up “goals” in your dashboard. These are the specific actions that will count as conversions and be tracked. This enables you to focus on your unique objectives and gather a robust and comprehensive set of conversion data.

      How to Keep Your SEO Momentum Going With Quality Control Checks

      It’s necessary to keep in mind that your metrics are a reflection of the work you put into improving your site and growing your audience. This means there are several other elements not directly related to SEO that you’ll still need to keep an eye on.

      Here are a few other elements that can have an impact on how well your website performs in search engines:

      All of these pieces are key parts of the SEO puzzle. Of course, the quality of your content also has a significant impact on how well your site performs in the rankings, so that’s a factor to keep in mind as well.

      SEO Expert in Your Inbox

      Whether you need help picking the right engagement metric, understanding digital marketing, or creating an SEO campaign, we can help! Subscribe to our monthly digest so you never miss an article.

      Improving SEO Performance

      Now that you have an idea of which metrics are most important for SEO, it should be easier to develop a solid web analytics plan. Your unique goals will also affect what numbers are most relevant to you and your site.

      Google Analytics is a great place to start when it comes to navigating key data such as conversions, page speed, user behavior, and more. If you’re using WordPress, it’s even easier to integrate analytics tools right into your admin dashboard, using plugins like Google Site Kit and MonsterInsights.

      Here at DreamHost, we offer many reliable WordPress hosting plans. Whether your site is big or small, we’ll handle the hosting so you can focus on your favorite SEO metric to track the data you need to succeed!

      Source link

      20 Metrics Every Blogger Needs to Track to Measure Success 

      Affiliate Disclosure: DreamHost maintains relationships with some of our recommended partners, so if you click through a link and purchase, we may receive a commission. We only recommend solutions we believe in.

      When it comes to your blog, success can come in many different forms. Regardless of your website’s niche, gathering certain data can help you determine whether your readers are loving the content you’re putting out or if you need to make some changes to increase engagement. 

      While collecting data about your blog might seem overwhelming at first, rest assured that there are many great tools to help you! Google itself offers several highly-valuable resources for data gathering, and once you know what to look for, finding it isn’t too tricky. 

      In this article, we’ll go over 20 different metrics you can track to measure your blog’s success. 

      1. Page Views
      2. Traffic by Channel
      3. Time Spent on Page
      4. Bounce Rate
      5. Pages Per Visit
      6. Returning Visitors
      7. Top Traffic Posts
      8. SERP Rankings
      9. Average Inbound Links Per Blog Post
      10. Average Comments Per Blog Post
      11. Social Shares Per Blog Post
      12. Clicks from Social Platforms
      13. New Blog Leads and Customers
      14. Posts That Bring in the Most Leads and Customers
      15. Conversion Rates
      16. Lead Source Breakdown
      17. Total Email Subscribers
      18. Email Open Rates
      19. Email Click-Through Rates
      20. Number of Blog Posts Published

      We’ll help you understand why this data is valuable and how to start collecting it on your own website. Ready to get started? Let’s talk blog metrics!


      Traffic measures the number of people who visit your blog. Keeping tabs on all of those visitors can provide you with valuable information about the demographics of your site’s users, as well as how you can drive more traffic to your blog.

      In the following sections, we’ll be focusing on many of the tools Google provides. This is because it’s tough to beat Google’s analytics tools when it comes to gathering insights about your blog’s traffic.  

      1. Page Views

      A “page view” is a measure of any time a user views a page on your website. This includes multiple visits and page refreshes as well. That means you’ll need to look deeper into the numbers to find out specifics about who’s visiting your blog.

      Page views can often be tracked through your hosting provider. For example, our fully-hosted DreamHost plans include access to this information in your user dashboard. Alternatively, you can leverage Google’s page views tracking tool.

      “The Google Analytics dashboard showing page view information.”

      You can use Google Analytics to create a custom metric that uses other elements, such as session data, to provide deeper insights into audience behavior. Plus, some filters will be able to help you quickly sort out and view the most important details.

      There is no one correct number when it comes to page views. It will differ radically depending on your goals, audience, niche, and so on. However, in a general sense, you should be looking for a slow but steady increase over time. If you’re not getting the numbers you expect, you may want to look into some of your other traffic metrics to fully understand where the problem lies.

      2. Traffic by Channel

      When it comes to marketing and analytics, a “channel” is any path visitors take to reach your website and other content. For example, some users may arrive at your blog through your social media profiles (one channel) while others may get there via paid search (a second channel).

      In Google Analytics, you can take your page view data and filter it by channel. Google provides a list of channel definitions as they pertain to tagging in its analytics system. This is so you can appropriately tag different funnels, to keep tabs on where your traffic is coming from. “The Google Analytics dashboard showing page view information.”

      You might want to look at all the traffic that comes to your blog via social media links, for example. You can compare that result to the traffic coming in through your email marketing campaigns. This can tell you which of your marketing campaigns are most successful and can be built upon and which might need more work to improve their Return on Investment (ROI). 

      3. Time Spent on Page

      How long your blog’s visitors spend on the pages they visit can be a complicated metric to track. With that being said, Google does provide a solid breakdown of the averages for each page on your site.

      “Google’s individual page data.”

      If your average “time on page” is low, you might want to look to see whether your marketing is pulling in the right kind of traffic. While the average time users spend on a web page is around 15 seconds, a well-designed page with valuable and relevant content can hold someone’s attention much longer. 

      Additionally, if this metric is quite low, you could have a technical issue, such as a page that loads slowly. This can lead visitors to exit as soon as they try to open that page. Fortunately, there are plenty of ways to optimize your website’s performance.

      4. Bounce Rate

      Your blog’s “bounce rate” is a measurement of how many viewers came to your site, took a look, had no interaction with your blog post, and then left.

      Bounce rate can be a much more effective measure of reader interest than traffic stats. While a count of aggregate page views might tell you how many people visited your website, it doesn’t tell you how many stayed and explored further.

      A high bounce rate may indicate that your content isn’t resonating with your audience. Alternatively, it could also be an indication that your traffic sources aren’t very good. If you’re blogging about fitness and your traffic is coming from sites about credit card debt, for example, you may have high traffic, but it’s unlikely to be traffic that is meaningful in terms of true audience building.

      A bounce rate in the range of 25 percent to 40 percent is considered excellent. Anything higher than 70 percent probably indicates that your audience-building approach requires changing.

      5. Pages Per Visit

      When you measure “pages per visit” on your website, you’ll typically start with an average of the number of pages viewed over a given hour or day, divided by the number of site visitors during that same time frame. This can give you an idea of how users are interacting with your blog. 

      If you have pretty substantial traffic overall, but your pages per visit average is on the low side, you might want to investigate your linking strategy

      For example, if you have content with a lot of external links but not many internal links, you might be losing visitors who might otherwise stay on your website and explore your other content. 

      6. Returning Visitors

      When you look at your “returning visitor” numbers versus your “new visitor” numbers, there are some assumptions you can make about your blog’s overall traffic. You’ll be able to see whether your readership is growing, staying steady mainly due to loyal regulars, or declining. 

      You can view these stats by going to Behavior > Overview > +New Segment in your Google Analytics dashboard. Alternatively, you can install the MonsterInsights plugin.

      "The MonsterInsights plugin for WordPress.”

      This is the most popular WordPress plugin for Google Analytics. It enables you to display your data right in your dashboard, so you don’t have to go to another page to view it.

      If you aren’t seeing a lot of return visitors, you may be attracting readers but struggling to really catch their attention. In that case, you’ll want to work on improving engagement on your blog.

      7. Top Traffic Posts

      Tracking your top posts can tell you what kind of content is hitting home with your readers. This can help you determine where to focus resources or how to best increase your content output. 

      For example, your audience might respond more favorably to video than text-based content or vice versa.  

      One of the ways you can use “top blog post” data is by guiding visitors to content that others have found valuable. If you’re willing to experiment with adding some code to your site, you can even display a “popular posts” tab to highlight content based on traffic counts. 


      Search Engine Optimization (SEO) encompasses several tactics that work together to improve your site’s rankings in Search Engine Results Pages (SERPs). A variety of elements on your website contribute to its SEO, many of which can be measured.

      8. SERP Rankings

      SERPs are the lists of results returned by search engine queries. Each of your blog’s pages will fall on different positions in SERPs for relevant keywords and phrases.

      One tool you can use to track your SERP rankings is the Ahrefs Rank Tracker.

      “SERP rankings tracked via Ahrefs.”

      Ahrefs offers a suite of tools, but you can also choose just the ones you want. This solution will enable you to get an accurate picture of whether your SEO efforts are producing results, or if you need to focus on different strategies or better keywords.

      9. Average Inbound Links Per Blog Post

      Inbound links are links to your blog from other websites. For example, another blog may highlight your content, or a social media post may call out a specific page or resource. These links are highly valuable, as they contribute to your domain authority and page authority

      While you can use Google Analytics to view information on “referrals” to see how many inbound links you have, there are other tools out there designed to explicitly track link data. For example, check out the Moz Link Explorer.

      “The Moz Link Explorer tool.”

      You can try this tool for free or as a part of Moz’s comprehensive SEO product offerings. Either way, understanding what posts attract the most inbound links can tell you more about what content on your blog is resonating with readers.


      Engagement can take many forms online. In a general sense, it’s any way readers interact with your blog (besides simply reading its content). Establishing what you consider to be valuable engagement is key — this may include clicks, comments, social shares, and so on.

      10. Average Comments Per Blog Post

      On many blogs, one of the most significant forms of engagement is comments. To track your comments, you can use a plugin like wpDiscuz.

      “The wpDiscuz plugin for WordPress.”

      This tool gives you full control over the comment experience on your blog. Not only can you track comments by user logins, but you can also implement a comment voting system. This can help to increase engagement if your numbers aren’t quite where you want them to be. 

      11. Social Shares Per Blog Post

      Social media engagement is also crucial, although your target platforms and numbers will be specific to your individual marketing strategies. To get a true picture of this metric, you might want to look into a specialized tool such as Hootsuite. This enables you to track all of your social media engagement in one easy-to-use dashboard.

      “The Hootsuite social media engagement tracking tool.”

      Since engagement online is not always linear, you might want to consider other kinds of tracking as well. 

      For example, the plugin for WordPress has a paid service that tracks all social sharing from your website, including “Dark Social” shares. Those are harder data points to track because they take place through text messages or chat applications when content links are copied and pasted. 

      12. Clicks from Social Platforms

      The referral links we discussed earlier are another way to measure user engagement. Through Google Analytics, you can see how many users are coming to your blog via your social media profiles and posts. 

      If you’re running a marketing campaign that’s heavy on social media, you’ll likely want this metric to show plenty of clicks from your social content. Weak or static numbers can be addressed through smarter social media promotion strategies.


      Conversions are often used to track sales, but a “conversion” can be any action you’d like to encourage on your blog. For example, you may measure sign-ups to an email list, or downloads of a free e-book. No matter what it represents, understanding your conversion rate helps you implement Conversion Rate Optimization (CRO), in order to make positive changes for your blog.

      13. New Blog Leads and Customers

      Using your blog to drive traffic and gain customers can be a crucial part of any content marketing strategy. To know how well you’re doing, however, you’ll need to track how many new leads are generated by your content.

      One way to do this is to use trackable links throughout your blog, especially on Call-to-Action (CTA) buttons and links to related internal content. You can use Google Analytics and MonsterInsights for this, or create a more custom approach with a plugin like Pretty Links.

      “The Pretty Links plugin.”

      This tool enables you to create custom, shortened URLs that maintain your branding. It also provides valuable tracking of links on your site and other platforms, so you can see whether your blog is attracting a steady stream of new leads.

      14. Posts That Bring in the Most Leads and Customers

      Once you establish a way to track the leads generated by your content, as explained above, you can aggregate and filter that data in your chosen analytics tool. This will help you determine which posts and pages are generating the most leads and/or customers. 

      Knowing what kind of content gets people to take action is key. Conversion-generating posts on your blog let you know what strategies are working, so you can replicate that success in future content.

      15. Conversion Rates

      Your blog’s channels, post views, page views, leads, and so on are often tracked with a primary goal in mind — improving conversion rates. Google Analytics offers an abundance of options for customizing your views of different conversion rates, in comparison to other metrics.

      “An e-commerce conversion rates report.”

      However, the most basic way to determine your rate without a built-in tool is to divide the number of conversions you’re getting by the total number of site visitors in the same time frame. It’s essential to keep in mind that different industries have various benchmarks for what is considered a successful conversion rate. 

      16. Lead Source Breakdown

      Your lead source breakdown primarily comes from the channel data we discussed earlier. It can include information from other sources as well, however, so using a full Customer Resource Management (CRM) system can be helpful.

      The goal is to find out not only what sources or channels are leading readers to your blog, but which ones are ultimately generating the most conversions. If your social media posts attract a lot of visitors, but almost none of those visitors convert, it’s time to consider whether you’re focusing on the wrong audience or failing to answer their particular pain points.

      Email Marketing

      Email marketing remains one of the most successful approaches for online businesses and blogs. This means that communication by email as a marketing tool is a highly-recommended approach. Plus, it also provides a wealth of trackable data. 

      17. Total Email Subscribers

      Creating an email newsletter for your blog is an excellent strategy for giving readers a way to engage and provides a useful metric to track. The most effective way to get the numbers you need is to leverage a tool like MailChimp, which can be easily integrated with WordPress websites.

      “The Mailchimp email marketing platform.”

      The first and most basic metric to track is your number of subscribers. Obviously, the more subscribers you have, the better. Just as with page views, however, what you’re looking for isn’t an exact number so much as a slow-but-steady increase in subscribers over time. 

      18. Email Open Rates

      An email’s “open rate” represents how many recipients actually opened it in their inboxes. Mailchimp’s benchmarking data puts the average open rate between 15% and just over 28%, depending on your industry. 

      While there are many ways to encourage people to open your emails, one of your best options is to try a variety of strategies and keep an eye on the numbers to see which ones result in the most engagement. Just keep in mind that tracking open rates really does require email-specific tracking tools.

      19. Email Click-Through Rates

      Next up are your Click-Through Rates (CTRs). This represents how many people not only opened a given email but also clicked on one of the links it contained. This can include links back to your blog and social media platforms, as well as all kinds of direct CTAs.

      The average benchmark for CTRs is 2.6% across all industries. Again, however, the specific metric you’re aiming for will depend on your audience, niche, and goals. A poor CTR on a given link may mean you need to spend some time developing stronger CTAs that appeal to your audience’s interests and needs.


      For the most part, your blog’s “output” can be quantified in terms of the number of posts you publish. For that reason, conducting a content audit can provide you with vital information to consider alongside the various metrics outlined in this article.

      While there are a lot of great content audit tools on the market, we recommend SEMrush, an SEO software suite that’s trusted by 5 million marketers around the world.

      You can use its Content Audit feature to get an overview of your most important metrics: user behaviour metrics (number of sessions, session duration, and bounce rate), social impact (number of shares across major social networks) and websites linking to your content. Then turn to the Content Analyzer to see how different articles and authors compare. Based on the results, you’ll be able to determine which articles, authors, and topics get you the most traffic and which ones could use some work.

      If this sounds like something you’re interested in, we’ve worked out a free trial with SEMrush for our readers, so you can see if the tool is a good fit for your site without a long-term commitment!


      20. Number of Blog Posts Published

      Experts tend to advise new bloggers to view their content plan as a marathon, not a sprint. This means you don’t have to do it all in one day, and it can take a while to build up a meaningful collection of content. 

      With that being said, there are some things you can do to start collecting the data that will tell you whether your blog is making an impact. This includes sticking to a consistent publishing schedule, as well as keeping an eye on how much content your blog has in total.

      Depending on your industry and topic, you’ll often start to see your audience grow when you amass between 75 and 215 blog posts. However, quality plays a significant role as well. So while the overall output is important, you shouldn’t prioritize this number over the quality of your blog posts.

      Managing Your Blog’s Data So You Can Measure Your Success

      All websites create a data trail. Investing in the resources to follow that trail can help you leverage all the blog metrics we’ve discussed. Not only can this data inform your marketing strategies, but it can also help you keep track of whether you’ve hit your goals. 

      It almost goes without saying that Google Analytics is one of the most accessible and budget-friendly options out there. Since it can be integrated with many other tools and plugins, and you’ll have some of the most critical metrics right at your fingertips, it’s worth setting up

      If you’re not happy with the numbers you’re seeing and you want to start fresh with a new web host, check out our shared hosting plans. We even offer a free website migration plugin, so you can move your blog without the hassle and start seeing better performance and engagement!

      Source link

      How To Gather Infrastructure Metrics with Metricbeat on CentOS 7

      The author selected the Computer History Museum to receive a donation as part of the Write for DOnations program.


      Metricbeat, which is one of several Beats that helps send various types of server data to an Elastic Stack server, is a lightweight data shipper that, once installed on your servers, periodically collects system-wide and per-process CPU and memory statistics and sends the data directly to your Elasticsearch deployment. This shipper replaced the earlier Topbeat in version 5.0 of the Elastic Stack.

      Other Beats currently available from Elastic are:

      • Filebeat: collects and ships log files.
      • Packetbeat: collects and analyzes network data.
      • Winlogbeat: collects Windows event logs.
      • Auditbeat: collects Linux audit framework data and monitors file integrity.
      • Heartbeat: monitors services for their availability with active probing.

      In this tutorial, you will use Metricbeat to forward local system metrics like CPU/memory/disk usage and network utilization from a CentOS 7 server to another server of the same kind with the Elastic Stack installed. With this shipper, you will gather the basic metrics that you need to get the current state of your server.


      To follow this tutorial, you will need:

      Note: When installing the Elastic Stack, you must use the same version across the entire stack. In this tutorial, you will use the latest versions of the entire stack, which are, at the time of this writing, Elasticsearch 6.7.0, Kibana 6.7.0, Logstash 6.7.0, and Metricbeat 6.7.0.

      Step 1 — Configuring Elasticsearch to Listen for Traffic on an External IP

      The tutorial How To Install Elasticsearch, Logstash, and Kibana (Elastic Stack) on CentOS 7 restricted Elasticsearch access to the localhost only. In practice, this is rare, since you will often need to monitor many hosts. In this step, you will configure the Elastic Stack components to interact with the external IP address.

      Log in to your Elastic Stack server as your non-root user:

      • ssh sammy@Elastic_Stack_server_ip

      Use your preferred text editor to edit Elasticsearch’s main configuration file, elasticsearch.yml. This tutorial will use vi:

      • sudo vi /etc/elasticsearch/elasticsearch.yml

      Find the following section and modify it so that Elasticsearch listens on all interfaces. Enter insert mode by pressing i, then add the following highlighted item:



      The address is assigned specific meanings in a number of contexts. In this case, means “any IPv4 address at all.”

      When you’re finished, press ESC to leave insert mode, then :wq and ENTER to save and exit the file. To learn more about the text editor vi and its successor Vim, check out our Installing and Using the Vim Text Editor on a Cloud Server tutorial. After you have saved and exited the file, restart the Elasticsearch service with systemctl to apply the new settings:

      • sudo systemctl restart elasticsearch

      Now, allow access to the Elasticsearch port from your second CentOS server. In order to configure access coming from specific IP addresses or subnets, use the rich rule functionality of firewalld:

      • sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="second_centos_server_ip/32" port protocol="tcp" port="9200" accept'

      Rich rules allow you to create more complex and customizable firewalld rules to gain greater control over your firewall. In this command, you are adding a rule that accepts ipv4 traffic from the source, which you have set as the IP address of the second CentOS server, to port 9200 of your Elastic Stack server.

      Next, reload firewalld to activate the new rule:

      • sudo firewall-cmd --reload

      Repeat these commands for each of your servers if you have more than two. If your servers are on the same network, you can allow access using one rule for all hosts on the network. To do this, you need to replace the /32 after the IP address with a lower value, for example /24.

      Next, test the connection. Log in to your second CentOS server as your non-root user:

      • ssh sammy@second_centos_server_ip

      Use the curl command to test the connection to the Elastic Stack server:

      • curl Elastic_Stack_server_ip:9200

      You’ll receive output similar to the following:


      { "name" : "tl5Is5f", "cluster_name" : "elasticsearch", "cluster_uuid" : "W9AcSNWHQ3mYs2uE8odklA", "version" : { "number" : "6.7.0", "build_flavor" : "default", "build_type" : "rpm", "build_hash" : "3bd3e59", "build_date" : "2019-03-06T15:16:26.864148Z", "build_snapshot" : false, "lucene_version" : "7.6.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }

      Now that you know the connection works, you are ready to send metrics to your Elastic Stack server.

      Step 2 — Installing and Configuring Metricbeat on the Elastic Stack Server

      In the next two steps, you will first install Metricbeat on the Elastic Stack server and import all the needed data, then install and configure the client on the second CentOS server.

      Log into your Elastic Stack server as your non-root user:

      • ssh sammy@Elastic_Stack_server_ip

      Since you previously set up the Elasticsearch repositories in the prerequisite, you only need to install Metricbeat:

      • sudo yum install metricbeat

      Once the installation is complete, load the index template into Elasticsearch. An Elasticsearch index is a collection of documents that have similar characteristics. Specific names identify each index, which Elasticsearch will use to refer to the indexes when performing various operations. Your Elasticsearch server will automatically apply the index template when you create a new index.

      To load the template, use the following command:

      • sudo metricbeat setup --template -E 'output.elasticsearch.hosts=["localhost:9200"]'

      You will see the following output:


      Loaded index template

      Metricbeat comes packaged with example Kibana dashboards, visualizations, and searches for visualizing Metricbeat data in Kibana. Before you can use the dashboards, you need to create the index pattern and load the dashboards into Kibana.

      To load the templates, use the following command:

      • sudo metricbeat setup -e -E output.elasticsearch.hosts=['localhost:9200'] -E

      You will see output that looks like this:


      ... 2019-03-20T09:51:32.096Z INFO instance/beat.go:281 Setup Beat: metricbeat; Version: 6.7.0 2019-03-20T09:51:32.136Z INFO add_cloud_metadata/add_cloud_metadata.go:323 add_cloud_metadata: hosting provider type detected as digitalocean, metadata={"instance_id":"133130541","provider":"digitalocean","region":"fra1"} 2019-03-20T09:51:32.137Z INFO elasticsearch/client.go:165 Elasticsearch url: http://localhost:9200 2019-03-20T09:51:32.137Z INFO [publisher] pipeline/module.go:110 Beat name: elastic 2019-03-20T09:51:32.138Z INFO elasticsearch/client.go:165 Elasticsearch url: http://localhost:9200 2019-03-20T09:51:32.140Z INFO elasticsearch/client.go:721 Connected to Elasticsearch version 6.7.0 2019-03-20T09:51:32.148Z INFO template/load.go:130 Template already exists and will not be overwritten. 2019-03-20T09:51:32.148Z INFO instance/beat.go:894 Template successfully loaded. Loaded index template Loading dashboards (Kibana must be running and reachable) 2019-03-20T09:51:32.149Z INFO elasticsearch/client.go:165 Elasticsearch url: http://localhost:9200 2019-03-20T09:51:32.150Z INFO elasticsearch/client.go:721 Connected to Elasticsearch version 6.7.0 2019-03-20T09:51:32.151Z INFO kibana/client.go:118 Kibana url: http://localhost:5601 2019-03-20T09:51:56.209Z INFO instance/beat.go:741 Kibana dashboards successfully loaded. Loaded dashboards

      Now you can start Metricbeat:

      • sudo systemctl start metricbeat

      To make Metricbeat start automatically at boot from now on, use the enable command:

      • sudo systemctl enable metricbeat

      Metricbeat will begin shipping your system stats into Elasticsearch.

      To verify that Elasticsearch is indeed receiving this data, query the Metricbeat index with this command:

      • curl -XGET 'http://localhost:9200/metricbeat-*/_search?pretty'

      You will see an output that looks similar to this:


      ... { "took" : 3, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 108, "max_score" : 1.0, "hits" : [ { "_index" : "metricbeat-6.7.0-2019.03.20", "_type" : "doc", "_id" : "A4mU8GgBKrpxEYMLjJZt", "_score" : 1.0, "_source" : { "@timestamp" : "2019-03-20T09:54:52.481Z", "metricset" : { "name" : "network", "module" : "system", "rtt" : 125 }, "event" : { "dataset" : "", "duration" : 125260 }, "system" : { "network" : { "in" : { "packets" : 59728, "errors" : 0, "dropped" : 0, "bytes" : 736491211 }, "out" : { "dropped" : 0, "packets" : 31630, "bytes" : 8283069, "errors" : 0 }, "name" : "eth0" } }, "beat" : { "version" : "6.7.0", "name" : "elastic", "hostname" : "elastic" }, ...

      The line "total" : 108, indicates that Metricbeat has found 108 search results for this specific metric. Any number of search results indicates that Metricbeat is working; if your output shows 0 total hits, you will need to review your setup for errors. If you received the expected output, continue to the next step, in which you will install Metricbeat on the second CentOS server.

      Step 3 — Installing and Configuring Metricbeat on the Second CentOS Server

      Perform this step on all CentOS servers from which you want to send metrics to your Elastic Stack server. If you also have Ubuntu servers, you can install Metricbeat by following Step 3 of How To Gather Infrastructure Metrics with Metricbeat on Ubuntu 18.04.

      Log into your second CentOS server as your non-root user:

      • ssh sammy@second_centos_server_ip

      The Elastic Stack components are not available through the yum package manager by default, but you can install them by adding Elastic’s package repository.

      All of the Elastic Stack’s packages are signed with the Elasticsearch signing key in order to protect your system from package spoofing. Your package manager will trust packages that have been authenticated using the key. In this step, you will import the Elasticsearch public GPG key and add the Elastic package source list in order to install Metricbeat.

      To begin, run the following command to download and install the Elasticsearch public signing key:

      • sudo rpm --import

      Next, add the Elastic repository. Use your preferred text editor to create the file elasticsearch.repo in the /etc/yum.repos.d/ directory:

      • sudo vi /etc/yum.repos.d/elasticsearch.repo

      To provide yum with the information it needs to download and install the components of the Elastic Stack, enter insert mode by pressing i and add the following lines to the file:


      name=Elasticsearch repository for 6.x packages

      When you’re finished, save and close the file.

      Next, install Metricbeat with this command:

      • sudo yum install metricbeat

      Once Metricbeat is finished installing, configure it to connect to Elasticsearch. Open its configuration file, metricbeat.yml:

      • sudo vi /etc/metricbeat/metricbeat.yml

      Note: Metricbeat’s configuration file is in YAML format, which means that indentation is very important! Be sure that you do not add any extra spaces as you edit this file.

      Metricbeat supports numerous outputs, but you’ll usually only send events directly to Elasticsearch or to Logstash for additional processing. Find the following section and update the IP address:


      #-------------------------- Elasticsearch output ------------------------------
        # Array of hosts to connect to.
        hosts: ["Elastic_Stack_server_ip:9200"]

      Save and close the file.

      You can extend the functionality of Metricbeat with modules. In this tutorial, you will use the system module, which allows you to monitor your server’s stats like CPU/memory/disk usage and network utilization.

      In this case, the system module is enabled by default. You can see a list of enabled and disabled modules by running:

      • sudo metricbeat modules list

      You will see a list similar to the following:


      Enabled: system Disabled: aerospike apache ceph couchbase docker dropwizard elasticsearch envoyproxy etcd golang graphite haproxy http jolokia kafka kibana kubernetes kvm logstash memcached mongodb munin mysql nginx php_fpm postgresql prometheus rabbitmq redis traefik uwsgi vsphere windows zookeeper

      You can see the parameters of the module in the /etc/metricbeat/modules.d/system.yml configuration file. In the case of this tutorial, you do not need to change anything in the configuration. The default metricsets are cpu, load, memory, network, process, and process_summary. Each module has one or more metricset. A metricset is the part of the module that fetches and structures the data. Rather than collecting each metric as a separate event, metricsets retrieve a list of multiple related metrics in a single request to the remote system.

      Now you can start and enable Metricbeat:

      • sudo systemctl start metricbeat
      • sudo systemctl enable metricbeat

      Repeat this step on all servers where you want to collect metrics. After that, you can proceed to the next step in which you will see how to navigate through some of Kibana’s dashboards.

      Step 4 — Exploring Kibana Dashboards

      In this step, you will take a look at Kibana, the web interface that you installed in the Prerequisites section.

      In a web browser, go to the FQDN or public IP address of your Elastic Stack server. After entering the login credentials you defined in Step 2 of the Elastic Stack tutorial, you will see the Kibana homepage:

      Kibana Homepage

      Click the Discover link in the left-hand navigation bar. On the Discover page, select the predefined meticbeat-* index pattern to see Metricbeat data. By default, this will show you all of the log data over the last 15 minutes. You will find a histogram and some metric details:

      Discover page

      Here, you can search and browse through your metrics and also customize your dashboard. At this point, though, there won’t be much in there because you are only gathering system stats from your servers.

      Use the left-hand panel to navigate to the Dashboard page and search for the Metricbeat System dashboard. Once there, you can search for the sample dashboards that come with Metricbeat’s system module.

      For example, you can view brief information about all your hosts:

      Syslog Dashboard

      You can also click on the host name and view more detailed information:

      Sudo Dashboard

      Kibana has many other features, such as graphing and filtering, so feel free to explore.


      In this tutorial, you’ve installed Metricbeat and configured the Elastic Stack to collect and analyze system metrics. Metricbeat comes with internal modules that collect metrics from services like Apache, Nginx, Docker, MySQL, PostgreSQL, and more. Now you can collect and analyze the metrics of your applications by simply turning on the modules you need.

      If you want to understand more about server monitoring, check out An Introduction to Metrics, Monitoring, and Alerting and Putting Monitoring and Alerting into Practice.

      Source link