Reader small image

You're reading from  Learn Grafana 10.x - Second Edition

Product typeBook
Published inDec 2023
PublisherPackt
ISBN-139781803231082
Edition2nd Edition
Right arrow
Author (1)
Eric Salituro
Eric Salituro
author image
Eric Salituro

Eric Salituro is currently a Software Engineering Manger with the Enterprise Data and Analytics Platform team at Zendesk. He has an IT career spanning over 30 years, over 20 of which were in the motion picture industry working as a pipeline technical director and software developer for innovative and creative studios like DreamWorks, Digital Domain, and Pixar. Before moving to Zendesk, he worked at Pixar helping to manage and maintain their production render farm as a Senior Software Developer. Among his accomplishments there was the development of a Python API toolkit for Grafana aimed at streamlining the creation of rendering metrics dashboards
Read more about Eric Salituro

Right arrow

Cloud Monitoring AWS, Azure, and GCP

In this final chapter of Learn Grafana 10.x, we’ll take a brief look at Grafana’s cloud integration capabilities. Grafana treats cloud monitoring as just another data source, so adding monitoring features to your cloud deployments is not much more than filling in a few fields in a data source configuration. Most of the work lies on the provider side as you will need to spend some time on cloud console pages registering applications and generating authentication credentials.

Once you have completed the walk-throughs for each cloud provider, you should have a good idea of how to navigate parts of a cloud services management console. You will be able to create the policies, service accounts, and credentials necessary to link Grafana with cloud providers. Armed with these credentials, you should have no trouble configuring future cloud monitoring data sources.

Then, once you have access to a vast variety of cloud monitoring data...

Configuring an AWS CloudWatch data source

This section assumes that you have an AWS account with administrative privileges. You’ll also need to be logged into the AWS Management Console so that you can work through these steps. The basic process is straightforward:

  1. Create a policy to grant access to CloudWatch.
  2. Create a user and attach the policy to the user.
  3. Capture the user credentials.
  4. Configure an AWS data source with the user credentials.

Now, let’s look at each of these steps in more detail.

Creating the policy

The first step toward creating a policy to grant our data source access to CloudWatch is using AWS and its Identity and Access Management (IAM) service. To get to the service, simply type iam into the search box on the Management Console page:

Figure 17.1 – AWS IAM service

Figure 17.1 – AWS IAM service

We will be creating a policy that allows Grafana to use the AWS CloudWatch API to get metrics data. Grafana has helpfully supplied a basic...

Configuring a Microsoft Azure Monitor data source

The next stop in our tour of the big cloud providers takes us to Microsoft Azure. The Azure Monitor data source supports four different services:

  • Azure Monitor
  • Azure Log Analytics
  • Application Insights
  • Application Insights Analytics

Fortunately, you can configure Azure to allow the data source to access all four services.

As you may recall from Chapter 16, Authenticating Grafana Logins Using LDAP or OAuth 2 Providers, to generate OAuth2 client IDs and secrets, we needed to register our Grafana server as an application with the cloud service. The process for Microsoft Azure is very similar:

  1. Copy your Tenant ID from Microsoft Entra ID.
  2. Register a new application for the Grafana data source and establish its proper role.
  3. Generate a Client ID value and secret for authentication from Grafana.
  4. Create and configure the Azure Monitor Grafana connection with the Tenant ID and Client credentials...

Configuring a GCM data source

Our last stop on our tour of cloud providers is GCP and its GCM service. We’ll go through the procedure to connect the GCM data source. The process for connecting a local data source with GCM involves only a few steps:

  1. Enable the relevant monitoring APIs.
  2. Create a service account with appropriate permissions.
  3. Generate a JSON Web Token (JWT).
  4. Load the JWT into the GCM data source configuration.

To get started, log in to your Google Cloud console and select the appropriate project. It is in this project that we’ll define our service account. This will be the only one our data source can access. You will need to create a separate data source for each GCP project you want to monitor.

Enabling a Google Cloud API

After selecting your project, use the left-hand menu to navigate to APIs & Services. Then, follow these steps:

  1. Select + Enable APIs and Services.
  2. Use the search box to locate Stackdriver...

Summary

In this chapter, we covered Grafana integrations for three of the world’s biggest cloud providers. Grafana currently provides built-in data sources for Amazon CloudWatch, Azure Monitor Logs, and Google Cloud Monitoring. While each service can have its own interfaces of varying complexity, the procedures are remarkably similar. They consist mainly of registering an application (or application service account), assigning a role to enable or restrict the application permissions, and generating a client ID and secret. Once you have the secrets, it’s only a matter of plugging them into the data source.

Not only have we reached the end of this chapter, but we’ve reached the end of this book! I hope you found the previous chapters as informative and enjoyable to read as it was for me to write them. By the time you read this, Grafana 10 will have undoubtedly experienced several feature releases beyond the initial rollout and will only continue to grow in terms...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learn Grafana 10.x - Second Edition
Published in: Dec 2023Publisher: PacktISBN-13: 9781803231082
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Eric Salituro

Eric Salituro is currently a Software Engineering Manger with the Enterprise Data and Analytics Platform team at Zendesk. He has an IT career spanning over 30 years, over 20 of which were in the motion picture industry working as a pipeline technical director and software developer for innovative and creative studios like DreamWorks, Digital Domain, and Pixar. Before moving to Zendesk, he worked at Pixar helping to manage and maintain their production render farm as a Senior Software Developer. Among his accomplishments there was the development of a Python API toolkit for Grafana aimed at streamlining the creation of rendering metrics dashboards
Read more about Eric Salituro