Leon Welicki: Hello there and thank you very much for
joining us today in this new Azure Portal How-To Video.
Today we'll learn how to use Azure Resource Graph, Azure
Service Health, and logs in Azure Workbooks. And for that,
we have Shikha Jain, who's going to show us how to do
that. So, thank you very much for joining us
today, Shikha.
Shikha Jain: Thank you, Leon, for having me again here. It
has been fun doing the first video, and now I'm here to
talk about the second step as to how do you use
Workbooks? Do you bring data from logs? Workbooks, as
you know, is a visualization tool that's available in Azure
Monitor, and you can build your troubleshooting guides or
the narratives that you have around different data, like
how are my resources doing? How's the health? How's the
performance? So often you're getting questions on how do
I get started? And this is where I'm going to show you
today, how to build a complex narrative.
So, folks let's get started. This time I'm going to show you
how to build a workbook which has data coming in from
Azure Resource Graph to use selectors and some other
capabilities like where my
resources are, how they're doing?
So ,we're going to show the health. And then we're also
going to go do logs just to see what is the log usage and
how the alerts are getting
triggered. So, we're going to use
the same components, but build a story around it. And as
they say, let's start from the very beginning.
I'm going to start with an empty workbook. And here,
what I'm going to do is, this is a blank canvas for me. Last
time when we talked about, we started with ad metrics.
So, now we are going to start with adding the parameters.
Now, as in any programming language parameters helps
you identify or scope down things that you want to
represent in this particular case. Since we talked about
Azure Resource Graph and everything in Azure Portal
starts with a subscription, I'm going to start there.
So, I'm going to add a parameter for a subscription.
So, it starts with clicking the add parameter and giving it
the name. And so, you see there is a display name and
there is a parameter name. So, this is the name that we
will use as an author behind the scene. And display name
is what the user using the workbook will see. So, this is
the description and the name and then we have a set of
parameter types that are
already built in. So, subscription
picker, since it's an Azure Portal construct is already
available to you and you can choose either default
subscriptions or all
subscriptions. These are tied to the
directory settings that you have here. And this is a field
that would be required, like I have to make a choice of a
subscription, so I'll mark it as required. Right now, we're
going to do one subscription at a time, but there is an
option to do multiple subscriptions as well.
So, having said that, this is now ready to use and I can go
and set it to one of my subscriptions. So, you see how I
got the list of all my subscriptions
and I now selected one.
So, now the question comes up quite often, where are my
resources in all these
subscription? I can very well go and
run queries and find out the information, but I'll tell you a
very quick and neat way of doing this. This is where query
comes into view. So, query basically means anything in
Workbook that can query different data sources and by
data sources, once I click the add query, you would see we
have a list of data sources here. So, Azure Resource Graph
is one of the data sources. Logs is one of the key which
opens as a default. You can even query Azure Resource
Manager, Kusto instance, like Data Explorer, if you have
any. Azure Health, which I'm going to demo. And then
there are these custom ones which are more
programmatically, and we will do it in more advanced
courses later on. So, let's start
with Azure Resource Graph.
And what I wanted to point out, why we select a
parameter is, now I don't have to keep selecting my
subscriptions again and again and going through that
process. I'm going to use this parameter that I have
defined, right on the top here and say, okay, get me all
the, so what I'm doing is, I'm getting a list of locations
and where the resources
are. So, I'm just writing a simple
query here and for this
particular subscription, when I run
it, it'll get me this list. So, you see, I have my primary
users in East U.S., I can see that, but this is good
information. Picture-wise,
let's paint it a little bit better
because I'm a visual person. I like to see it on a map.
There you go. So, with one click here, the visualization,
which are different controls that we discussed last time as
well. And you can find more information about it in the
documentation sections, I just switched it to map. Now
this tells me, very visually I can see where all the spread
is, where the concentration is, and these are some of the
settings that I can change to, you know, change the
experience of how much region size I want to show.
Let's just change the color here right now. A very basic
thing that we will do and make it much more presentable.
So, now I'm done with this and this is my view. There you
go. I can make it more complex by segmenting it by
resource group and adding one more parameter here and
keep entering into this.
Now let's step into the next process of it, which is I know
how many resources I have, but I do not know how they're
performing, like what's their health? I can always go to
resource health or in each of these resources and find that
out or go to a subscription and resource group. But since
I'm building a story, let's do things right here. I will again,
select a query because it's going to be a data source. So,
the data source this time is going to be Azure Health.
That's what I'm trying to query. And it's looking for
resource types. So, what I can go and do is, I can again go
and add another parameter, and this is how you kind of
build the story with Workbooks. I don't have to define the
parameter upfront. If I have the design, I can do that.
But as you are thinking
about it, this helps in building it.
And resource type is another picker that's available out of
box. Basically it brings all the Azure known resource types
and you can use this. Again, I can make it required,
non-required and other things, so let's just go here and go
with this. The other thing I wanted to also mention is,
sometimes some parameters you don't want to expose to
users, you just want to use it like a control factor. Let's say
if I want to do verification, is the data in or not? I could do
this parameter as a hidden parameter and this is what you
would see here. The parameter would be hidden, but I can
use it as an author building the story.
So, right now I don't want anybody to select resource
type, I'm just going to use it as a parameter.
So you see when I'm done editing, it's not visible, but
when I'm in the edit mode, when I'm the author, I can use
that. So, now coming back to our Health query, so instead
of specifying it here, now you would see there as a
parameter that pops up. I'm just going to use that. And for
the resources, again, I'm going to use my subscription
because what I'm saying is, give me the health of all the
resources in the subscription because I didn't set the
resource type yet. And I can either do a summary or a
detail view of it. So, while this query is running, let me
switch over to the mode where the data has already been
populated. So, when I ran the query in summary mode,
it'll give me this information, like 134 resources that are
available, 112 are unavailable, 68 is unknown, and nine
are degraded.
Now notice this is not matching the count here because
this is specific resource types that I had set up. And the
detail view looks like this grid. So, in terms of
presentation, now, one piece of the workbook is fetching
the data, which is what we did with running the query.
Now let's make it presentable, just like what we did with
map. We could either go and customize these columns, or
we can go and change the
visualization. For this I feel like
pie chart would make more sense because then I can see
the distribution and the
percentage and all that good stuff.
And another thing you would notice is, that there is a
different color coding for
different states. So, I can go and
change these color coding. I have full customization to do,
like I have set available to
green, unavailable to red, but if
you think unknown should not be gray, maybe it should be
blue, I can go and change that. This basically gives me a
lot of flexibility in how I want to represent things.
So, what having said that, this becomes your view on the
summary of how my resources are doing. So, I'm curious
about those 112, which ones are those? So, what I'm going
to do is now I'm going to deep dive into the detail ones.
So, in the detail, if you notice,
I have got the data again in
a grid, and I think the
consumption experience in grid is
much better here. One thing that I have gone ahead and
done again, if you notice availability state has a
representation, which quickly tells me which one is
available, which one is
unavailable. Because of each of the
columns, I can go and change what rendering needs to be
done and I have used thresholds here, and thresholds
allows me either to put an icon here or a color.
So ,I've chosen icon and given the values and said okay,
show me these icons when the states are these, these,
these.
The other good thing is now I get the whole list of
resources, but I don't know where these resources are
because I usually organize my subscription through
resource group. I do have that data, so let's go ahead and
do one thing, which is a capability that we have in
Workbook called group by. So, you can group these
elements in a grid by a particular column name. So, I'm
going to group these by resource group. And this is just
the setting so that every time I open it, it'll have them
expanded. So, when I do that application, you see now it's
grouping it. But the experience of reading this GUID, like
this is the resource ID, so I want to make it much more
presentable, so that I can
read exactly how I read it in the
Azure Portal browser blades and other places.
So, what I'm going to do is I'm going to go and edit this
column because this is the group by column that's been
added and the rendering is automatic, but I can go and
change this to resource type. I can pick any one of these,
but the one that applies here is resource type. And if you
notice now it will actually - - resource type will show this,
but it actually is resource. So, it will give the resource
name with the icon. So, now I can read this information
much more clearly and then go into these.
So here, if I click on it, it'll take me to the resource
overview blade directly. I can link this resource group as
well and go to that resource
group too. So, if I want to drill
down into further as to rest of what's happening, and each
of these icons here tells me what kind of resource it is. So,
that's about resource health. So, now once we've done
this, your view looks like, you have the resource locations,
you have their health data, and I can add labels to it. And
then I have the detailed view of the health of these
resources when it happened, what's the reason, and all
that good information is available to me.
Leon: Thank you very much, Shikha, that was
great.
And thanks, every one of
you, for watching. Please just try
this out and let us know what you think. Please share your
workbooks with us. We'd love to see them. Leave us a
comment in the comment
section, follow us on Twitter and
look forward seeing you in the next video, where we will
have more Workbooks stuff to share. So, thank you very
much and see you soon.
Shikha: Thank you, Leon.