Grafana master course | Dániel Ernő Szabó | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

10 Lessons (1h 15m)
    • 1. Grafana Introduction

      1:53
    • 2. Grafana The environment

      2:20
    • 3. Grafana Installation and firewall

      11:16
    • 4. Grafana Reconfigure http

      4:24
    • 5. Grafana Configure https

      8:06
    • 6. Grafana postgres setup

      11:02
    • 7. Grafana Initialize dashboards

      15:02
    • 8. Grafana Users and teams

      6:34
    • 9. Grafana API Users and teams

      12:28
    • 10. Grafana Outro

      2:01
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

52

Students

--

Projects

About This Class

This course will get you up to speed with grafaan and all of its nifty details. We will get started with the installation, then setup and finally some  serious devops stufff.  THERE IS A DEVOPS HIDDEN IN THIS COURSE,

Meet Your Teacher

Teacher Profile Image

Dániel Ernő Szabó

Pythonista in the making

Teacher

Hello, I'm Dániel Ernő.

I currently work as a devops engineer. I have several years of experience with various platforms and I'm here to teach some advanced techniques which may attribute your job security ;)

Cheers,

Daniel

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Grafana Introduction: Hello there and welcome to my course on the Griffon a product. So technically discourse is going to teach you how you can create fans dashboards from data pulled from either time. Siri's database or standard database with sequel choir is or no sicker carries because Graf on a supposed both of them or each three of them. And, ah, this course, you will get the environment when environments set up, how you can install your graph, in instance, how you can set up your database, where you pull your data from, and we are going to look into the securing off the Graffanino stance. Obaidi Fort comes with http, and we can secure it with either error, access and certificate or a certificate, which comes from certificate authority. And after that we would like to inspect the A P I. So the FBI is what gives the let's see greatest ah, opportunities or possibilities to this solution because it allows you to create dynamically dashboards, users, views and other stuff that allows you to configure your instance and make it as as beautiful as possible. So if you are interested in taking your, uh, dash boarding or reporting skills to the next level than discourse is definitely something that you should take seeing them 2. Grafana The environment: welcome to the Environment Video. So in this video we are going to talk about what you can expect. And what is the That's a technical side of set off that you may be interested in if you want to reproduce these videos, or at least the contents. And ah, in my experience from previous courses, it was Ah, that's a disappointment from my students that they didn't have ah, single source of truth. So if they wanted to reproduce what they saw in the video, they need needed to look, that's we deal again. And for that reason, I have created get harbor repository. So this get up repository is going to contain everything that you see in this video or in these videos and ah, how you can reproduce the environment and the set up that I have. And for example, the next video is going to be about installation. And if you go to the installation markdown, you will see Ah, on our notated version what is in the video as to how you can set up a graph are final and ah, what you will see after you follow the set up and basically what we would like to do is to have a Santo s machine, which is the latest center s. I think it's 7.6 or five that I have installed, and this is a very basic machine. It has to process or course two weeks of RAM, 20 G's gigs of stories. So that's more than enough for experimentation. And, ah, here we are going to also install a post Grey sequel, databases that is going to serve our dashboards or feed our dashboards with data. And we will write some custom scripts to populate the dashboard it with it and ah, this is all I wanted toe value this video see in the next. 3. Grafana Installation and firewall: Welcome. Now, in this video, we're going to start with the installation of the graph on a instance. So I have my Santo s machine up and running. Let me close the other. We have a relaxation. We know. So basically you can install it in virtual box or hyper V or what? A very like What you need to know is that I have set up a static i p address to this machine. And I have also set up my hosts file on DA the Let me get it so C Windows system 32 drivers at sea hosts here. I have set up the name resolution for my future machines. So all I need to do here is to say that I would like the ssh into center Acie. And by the way, what I'm using is the CME, the er. So it's a consul emulator from windows, which allows you toe have kind of something similar issue would have in a Lennox environments. You have the common cat, we I ssh and stuff like that. So I think it's pretty convenient. So now what do we need to east? Ah Griffon. There are basically two wasting stock Griffon, either. You odd the repository on the mm at sea Yum repose ants on. And you would say that graph Ana the three Po and hear what you would put is the following . So let's just do this with me. I complain that this is no, it's not company. So basically, what you could do is to chose a stable version off this repository. And here you would stay that this is a afanah. There is a base. You are Ah, packages graph analysis. RPM a neighbor G PG check and you would have the SSC a certain and so on. And you could have Ah beta stuff. Ah, let's say feet ish when you want the latest off the capability is developments. And that way all you would need to modify its to say that this is our P Mbita and that does the same basically. But what we would like to do is to say that we want to install the graph in a r. P. M. And in order to install this graph in rpm, what we would need to do is to issued a pseudo sue and we would like to insert something like this. So we will use the w get to download from the graph Ana an rpm five. And after this is downloaded, what we could do is to use the young local install and specify the RPM. And this way we can have the graph Ana itself installed. And then what we could do is to wait for it to complete. But after it was completed, What we need to do is to specify for the system cdr that this service that graph ana has needs to start automatically after each reboot. And ah, this can be specified with the following commands. So system city out and a ba and we would like a neighbor the graph fun server. And then we would like to start the graph Honest, sir, and this is not done because, ah, currently we have firewall the running on our system. So system city, our status, fire or the and this is really ah, an interesting topic. So when you are, um, developing a proof of concept or some kind of solution, then you would like to go there as fast as possible. So what, you would do as, ah let's say someone who wants to be efficient. It's, ah seem to say that we would like to stop this firewall D and this is perfectly fine. This will them allow us toe excess the Web interface? Graffagnino. But on the long run, what we would like to do is to configure our fire war to allow specific traffic in a specific zone. So if you issue the fire war CMB list zone not the Liz, um, what should issue? I think it's something similar. So about with me least three true's with four or ports lease icmp. I think I'm going to need to grab it for the list. Mm. So list or so Smaby? Yeah. So I myself not so much into this fire body. So most of the time it's like a pain in the else. But we would like to list all zones and what we would like to do it say that fire war CME the and we would like to say that for the zone which is equal to public, we would like to add a service which is called http and we would also like the odd the https for later videos and what we would also like to say that this is the imminent, so apparent and means that after restart or reload of the fire wasa risk, it will stay intact. So if we would just go with this, these two commands, it would only allow us to communicate Were these ports until we restart. I did the service on a machine. But this way, if he should both of these commands, we will be able to, ah, preserve these settings across reboots. Or, um, that's a service restarts. And what we would like to do now is to access our admin interface. So our UNMIN interface by the Ford goes on the port 3000. So we would like to go with a city P. And we have the Santo West's A with 3000 and ceased. Um, CDO real old firewall the And why is it not working when it's supposed to so not start in up? Mm whoa. So this is not really in. Store them. Great. So now we have this running on the local poor 3000 so that you get http local hosts 3000 men. It seems to be able to do this so as they did it with the girl. So this is Logan. And now if you go here for to log in, can we do that? No, we can not. But why it is supposed to be I'm just kidding. So this is part of the set off video. So what you need to know when you're working with Griffon A is that you have to important files. Yeah, at least two. The 1st 1 is something we call at sea Gra phonograph afanah that I and I. So this is the end. If I for the configuration with which the server runs with and here you can specified paused SMTP users and fine tune your whole Graf in installation and what we can and should do is to just to make sure that we stop this fire war. And then what we can do is to say that we would like to look in. So now we use the admin at me. We are required to change the password. So I'm going to change it. Whatever I want to and you should do the same. And now we are able to access our graph. Ana instance. So what I would also suggest you to do is to they say, Well, the fire, Woody. So ah, this way you are able to follow along with the videos without trying to figure out why you cannot look in. But in when you are in a production environment, what you should and must do is to configure appropriately or security functions. And technically, that was all I wanted to show in this same store videos you in the next one. 4. Grafana Reconfigure http: well come back. So in this video, we are going to take a look at how and what you can do is to reconfigure your default port off HDP. So, in order to reconfigure the different port for http, so you would like to move from the poor 3002. Let's say something like Port 80 which is the standard a city people, Um it is a bit tricky with Graffagnino because there is Ah, there are some things that you, you may would like to come figure in the sense. So as I have mentioned in the previous video, we have something which is under the graph Ana graph Ana, that I and I. And here what we need to do is to go down to the http port and say that we would like to use the port 80. But online, Oakes, the sport 80 is a little bit tricky because it the it is a restricted port. So every port under 10 24 is ah, only accessible by the route process or a process which has ah appropriate privileges. And there are two things that you can do in order to achieve this. So, 1st 1 is to issue the sad cap kept net buying service plus cp use the being graph on a server. This will grant binary privileges to your graph in a process. And this this could be enough. The second thing that you could do is to redirect these ports and the sports. Ah ah are going to be redirected by the I P tables. So let's take a look at that. So system city are restored. Graph ana server. Now what we can do is to simply say that we would like to access Graffagnino with http. Send the U. S. A. And that ego. We were able to access it. Now what we can also do I still want if I this ah section so here. What we can do is to say that we would like to have a custom board and discussed import is going to be 18 18 and let's save it. And what we would like to do is to use a 90 Happy Tables rule and this I p tables rule is going to say that we would like to use a pre routing function off I p tables and we would like to pre route the port 80 to 18. 80. No, if you shoot this command and then we start autograph on a server. What we will see is that http sand the U. S. A. Is going to bring us to the same port despite the fact that we didn't specified 18 18. So, basically, this is how you can reconfigure your http Sessions against graf Ana. So what you need to remember? Either you modify the port in the configuration file and Grant Byner privileges if the port is under then 24. Otherwise, what you would like to do is to use I p tables and using that feature off rerouting. And you would like to pre route the specified port from the 80 to the specified bought where the griffin neurons on. And technically, this is all I wanted to show you. See you in the next one. 5. Grafana Configure https: why come back in the various video? We have seen how we can change a city. People default, one in graph Ana. And now we're going to take a look at how we can give https. So a secure connection against our graph in II stunts. So you know, order to do that. What we would like to do, It's the first. Now we get at the root user on the at sea graph on a folder, and then what we would like to do is to generate the self signed certificate. So the South signed certificates generated. Why openess a cell? And we have the 4096 bit R C encryption. If I'm correct and then what we can do is to not specify ah, password, so to speak. So now what we would also like to do is to change the owner of the K, dot PM and the said up PM, and then what we would like to do is to try and restart our graph. Iniesta's. So after we have restarted out Khalfani stance, we will not not notice anything changed because what we need to do it's a tag Ravana that these new self signed certificates are going to be used for trafficking encryption. So what we would like to do is to edit the graph. Ana, I m I five and hear what we would like to do is to say that the protocol is not Http anymore, but and you guessed right, https. And now what we would like to do is to change the institute report and just simply commented out. So, by default, the Scdp else uses four for three a sport. And what we would like to do is toe say that this issue the report goes for 4th 443 and we would like to see the following modified. So here we have SAT file and the third key and these are going to need to be with the following while you or while you. So we would like to have as the search fire, the following etc. Graph. Ana said that I am And for the third key, we would like to have the at sea graph anarchy the P A. M. And now what we can and should do is to save this file and say that system CTL restored graph ana server and Now, if you say that we change. This currently used one from http to Https sent the west. It should give us response. If he doesn't give us the response, we can tail the war log graph on Griffon That lug. And as you can see, it cannot find this DSS a search fire at sea graph in a said that be am Maybe we have made a typo. Andi. Yes, we did. So now, in order to resort that what we would like to do is to issue the following command. So currently, we have used the following comments. So this one to request these certificates and, uh, the result of this command is the key depth P A m and the ski, the P a m. He is going to be something that we do not really want and so small You must type. Let's give it a surge. Great. Now I fee check the contents of the current folder. We can see that the creator key, the PM and the certain PM is available. Now we can change the owners from the root user. The graph on the graph, Ana. So this is a different user. When you install Griffon A And as you can see, this was now changed and we need to remove the key from this graph. Ana and we need to specify the password that we have used. So now we can change our configuration five under the etc. Graph on I and I and we can say that this is not the key but the cakey. So we double key K And now what? We can do this issue the system CT Aga restored Afanah server And if you go to the https santo s, then now we really should be able to do this. But don't be afraid, because we are here to resolve this issue. So currently it says that system cdr status graph on Sir, It is running and it says that the Sarah is listening to the is the d B. What so 443 and now Https Santo say or for three Currently it seems to be working. So now we have successfully secured autograph in installation. It says that it's not secure because it is self signed certificate but basically everything that you need to know there's going to be with double for you in the get hub report. So if you want to reproduce this current situation, then I suggest you visit this repository to you in the next one. 6. Grafana postgres setup: So now we have seen how we can configure Http and https and we have basically out off a graph in II instance. What we would like to do now is to configure database, which will feed our dashboards. And in order to do that, what we need to do. I used to go and in Star Post Grey sequel. So in order to pose Grey sequel installation to succeed, we need to install the post grace Equal Lives package. And we would also like to install the Devil Package. And we would also like to install the Fight on Devil Package. And then what we can and should do is to have our fight on three instances to install the pie psycho up G to package with the peep. And after this is done, what we can do is to, let's say, try and in so the post Grey sequel itself, because a psych off G two is going to allow us to ah interact with the database itself. So now what we would also like to do is to install the post Grey sequel server and the country packages, and this is basically the heart and soul off the database itself. And after this was done, what we can do is toe in it the database. And after this was initialized what we need to do, Mr Issue the system City L a neighbor post grace equal, and then simply start this pause Grey sequel and, ah, what we would also like to do. It's set a password for the Post Grace equal so angling to set a password which is known to me if I can type it correctly and then what we can do is to pseudo to the post Grey sequel user. And if we issue the B sequel Boesch al, it is going to least our databases and these databases are going to allow us to interact with, uh, the database itself. And what we would like to do is tow issue. The post grace equaled HD template one. See alter user, prosperous, equal with best password pause grace. So this way we are going to alter the different role, and what we can and should do is tow edit With the we I command the etc. Not the war lib PG sequel. The the P G. C. Not the post gray secret configuration file and here what we would like to do is to make sure that we have the following configured. So under the configuration, we would like to have the listen Address is local host on port as 15. 32 and that is the default. So I just wanted to make sure that you know which fight to edit. And then what we would like to do is to added HB that configuration file. So this is under the war lib sequel data P G H B A That comes five. And here what we would like to do is to add the few lines. So these few lines are under our Gettler get hub repository. So I'm just going to simply paste them. So basically, these ah configuration FIEs define ah, who and how can access the database. It's half. So now, since this is done, we can save, and what we can do is to issue Dury start off the post Grey sequel instance, and after this has restarted, we can check a safe status off the post grey sequel service. So now it seems to be working. And if you go back to ah Griffon a dashboard what we can do now. It's odd. A data source and this data source should be configured as follows. So currently we would like to add a post Grey sequel databases, and we would have the local host on the default port. So the database disposed Gray Seiko, and we would like to have the post Gray, Seiko and the password as posed Grey sequel. And now if you say that save and tests, it says that the Mataric request your roar. So now I have no idea what the problem might be because it was supposed to be working. So currently the SSL more This is the same of and no watery should see Suppose Grace and Post Grease and the local host 54 32. And now we would like to reserve spots fert and save and test. So it failed for the Post Grace. Now a fee. Specify the Post Grace password. It will say that database connection is okay. And technically, this was all I wanted to show you. So now we have a graph on a instance installed, and we have a database configured with the user which has access to ah database. It's af so to speak. And if you have a Windows machine, this is what I would also like to show you. So there is a package or software which is called PG admin. So bgf mean is ah, Web is interface to oppose grey sequel databases that you have and ah, if you run it. What you will I see is that you have these servers on the left pain, and what we can do is to create a new server, and the server is going to be sent us A. And the connection is going to be sent the West. Yeah, and the port is the fourth and the database is the same, and the password is going to be a post three sequel, and it should work. But it is not working. So no, we are troubleshooting. So currently it says that accessing tp t c p i p connections on board, Whatever. Let's go here and say the system ctr the ISS. And we would like to say the fire war, the so it is not running currently. And what we would like to see is that we have this pose grace, database, the user and the post grace bath word. And then we would like to have this connection to our server. So the SSL is the same of we do not have ssh tunnel, and maybe this one will work. So I think I'm going to have a separate video about how you can troubleshoot this. But for now, what we know is that we have our post. Greece equals set up, and, ah, configured with the user that is able or should be able to access the database itself and see you in the next. 7. Grafana Initialize dashboards: while come back in the previous video, we have set up our post great Seiko and added as data source How does show the still under this data source to our graph on my instance? So in order for me to further or continue with this demonstration, of course we Ah, I need to create a database table which hold data that we will be able to visualize. So let's get to it. There is a really fun way off interacting with, uh, post grace equal. And it is called Ah, fightin and psycho G two module. So which bite on do I have? What do I want to install it to? We will need the 3.7 and who he was saying that still side G two. And there you go. It is already satisfies because I have used the VM for other stuff, then discourse. But ah, after this is done, we can and should start fightin interpreter import upside cup g two and we can create our connection. And it will come from the psy cop G two that and we need to specify database which is going to be called post grace, a user which is going to be called post Greece and a password which is going to be does Chris and Post Grace and the host which will be our 1 72 That zero, that's zero, That one. And a port which is actually optional. So that's 5432 And if it doesn't throw you an arrow, then it means that you are connected to the data with Now let's create a table in order to create a table. What we needs to do is to create a cursor. Soaker is coming from the connection cores are, and what we can, and should do now is to create our table. So I have prepared this multi line statement for you. But what you will do is to use the cores or to execute the following. Yes, Yes, yes, yes. Oh, no. What happened? I didn't copy or three of those. So cores are that execute and great. So now this is the statement that we will use. So we would like to create a table under the public domain and it is going to be called statistics, and the stable is going to have a device on availability and the timestamp column, and we would like to have it in a different table space. And the owner should be post grace. You can go figure it any way you like, but, I mean, the database part is not really the focus off discourse. So we just need database, table, some data, and then we were one. So now, after this is done, what we can and should do, it's the import to very necessary manuals. So we need the important time and the random my yours. And, ah, the time is going to be needed to create Ah, a Siri's off rose for a specified device. And the run don't will be the actual data that we would like to visualize. So now what? We would like to say that our base is the date and time off today. Ah, on then we need to import date time as well. All right. And now what we would like to do is to create a date list which will go back 100 days from today so that we have enough data to visualize. And once this is done, we can create the four loops off four device and let's core one of the devices D. C. As domain controller and the other should be called DNS and let's separate them. So first, we will create this 14 to D. C. And four date in date list. And this is where we come with the random availability. So this is going to be around them integer between 60 and 81. And then what we would like to do is to execute the query with our course. Or so now this query will insert into the statistics table device name, which is a device which we are reiterating over on availability and the type stuff. We did the specific values. So now we can do this for the Deanna's as well. So four the in the list, and we would like to also have and availability, which is from 80 to 1 a one. And we would also like to execute this query. Let me go beyond based it. And with this we are not done because these these changes are only staged. And in order for this to work, we need to commit these changes well and not with the courts, are about the connection. Great. So now we have data, and we have what we need to visualize it. So let's get back to our graph Ana, and we say that we would like to creating you there. Sport and his dashboard should have a query. And this query is going to come from not a time serious format but the table format, and we would like to edit the sequel. Let's just simply delete this one and say that we would like to use I have prepared this statement for you so you can check to get Hub Repository and it will be linked under the video, this one. So we would like toa selected the time stem the device and the availability. And we would like toa apply this filter on the top right column I'm going to show you. But what the r that is so basically the idea off graph ana is to allow you to dynamically filter specific range. So we are interested in the results off this query. In the last 30 days, let's say and then what we can and should do is tow. Say we would like to futre this based on the value off these these bottom and then what we can do is to apply specific modifications. And we would like to say that where and and fear ter device is equal to they see ended, not thrown. What? So we have the one in quotes? Great. So now, as you can see, you have this fancy availability and the point for your device and what we can also do is the four month or changed the visualization here. So there is a mode which is called field. So if I said it zero, it will not feel the values. If I said it to six, then it just only changes the transparency off this field field. We can have this, Grady and changed, and we can have this line with change. So basically, this is just eye candy from now on. And what is interesting or important is the Hauer to a tip. So they have a toe tip comes into play when you I want to inspect the value what you are representing for a specific day and you can change it to a single one, which will on Lee if you have multiple devices on the same graph will only show you the devices data for a specific date. If you have the more off Siri's than it will show every device for the specific date point , you can also change these access stuff. So currently what we have here is that we do not know what this unit is. And we would like to say that this is a date time, but not a day time, but person between zero and 100. So we have changed it to personally sign and we can say what kind of X axis we would like to see. We can specify this legend where it shows up. So religion will just tell you what device these data points belong. Toe what you are seeing and you can also name your device or tile. So availability for device D. C and we can make it transparent. So I'd like to use this transparent mode. Now we can go back, change size of this and say that we would like to have a new panel. We would like to add it this query and we would also like to see the availability for the DNS s well, so device is equal to the Ennis. Great. Now worked. Come on. So devices. Nautical great. So now we would like to change it and device, Let's give it to like the sea and eight. Mm. And when this happens, what I usually do is to change this back to the previous dashboard, where it was working, and and go here and change it back. So now Ah ha! I see. So Deanna's there is a difference between the well, that's a the book quotes and single quotes and how it isn't interpreted, so availability four. Device the Ennis and let's just make it transparent on Douala. What you can also see is that you would like to specify a trash hold which real, let's say, make it ah visible when a specific value is below or above the threshold. And what we can do in order to do this is that if we say that this T one is greater Dan or we'll ask them 95 then we would like to feel it with the line and so on. Great. Now what we would also like to do is to address short here and then if we say that there is a 99% or this is going tol read all the way, but anyway, availability. And basically, this was what I wanted to show you for now. See you in the next one. 8. Grafana Users and teams: well, come back in this video. We're going to talk about the user management because if you are family are read one of the first videos. You have seen how we can create or looking with the developed user. And Griffin Al owes us to have, ah, different way too up new users or outright specific users that can access this system. And, um, basically, you have on the left side this user configuration and team configuration. Let's look at the teams at first, so teams allow you to group users based on their intent. If I'm correct and, ah, we can create teams and let's say ABT mean theme or add means. And we say that that means great fun, that company that come great. Now what this does is it creates a logical container for users, and you can set and I'm email address, which is going to be used to communicate with these Ah, this group. So this should be a distributional. E stores something like that, and you can see some preferences for the U I'd home. There's board at the time zone, so it's it's really need to configure users this way and what you can also do is to check on the users. Currently, we have one at me user, and usually a user has logging, logging them and the role. So there are three types of privileges. There are Edmunds editors and viewers, and they have different di perfections that they can perform. So currently, if we take a look at our availability dashboard, what we can do is to try and that it is that this dashboard and under the edit, apart from many things, we can specify an auto refresh, the time zone graph, tool tape and so on and we and specify permissions. So based on this, we can say that members off a specific group or role based on the group membership can do this. That and so on. So by default that means can edit or do whatever they want with their boards. You were scan ah, view, a dashboard paddy cannot modify, and editors can edit a specific dashboard if they are out, too, and when you have logged the within at me with so you have this icon, which has maybe a shield on it, and this is going to allow you to That's discarded changes to create organisations and users. So by default, if you want what the new user, it's invitation based. But here you have the option off creating a new user. And let's say that this is going to be Decebal and the team is the symbol. Well, that's make it the Reaper. Pied gmail dot com and graph on a oh, the civil and graph Ana. This is going to be the password. So we can then modified this user and it's permissions. We can assign an organization and the role and that user becomes, Let's say, the editor, the admin or whatever off that given organization, we can't granted the Griffon Oddeman. So now let's Ah, look out and log in the subway and here what you can see is that we can view these dashboard, but we do not have any privilege to edit. And technically, this is it from the Web interface part. But if we go and dig deep down under the well, let's make it less etc. Graph on a graph Ana that I and I and permission was denied so sido Now I can do it. So what we can do here is to a spouse if I ah get yeah, different forms off authentication. So I'm looking for the sex. Ah, and yeah. So here you can specify something which is called basic authentication Agape authentication . And you can also have graph on a calm based authentication. So if you have a user on graph ana, you have to come. Then you can use the domain to authenticate users against your own graph on instance, and it's it's pretty neat. But when you are in a company, you may want to use different out indications. So there is this oath and you also have the Google out indication Get about indication and there are many ways to go about it. But after you have modified the and I file, what you need to do is to issue the system CTL restored. Good. Have fun server for these changes to be applied. And that was all I wanted to show you. Thank you for what 9. Grafana API Users and teams: Welcome back in this video, we're going to talk about the http API i of car afanah and what it allows you to do. So. So far, you have seen how you can let to create teams and users with the hap off the web interface . But what happens when you would like to automate this process? So, for example, you would like to grant ah, serves every sport, er for your customers or users that allow them to create a user to the graph in any stunts , and that user would get the appropriate permissions. And first, we are going to look at this that are two ways that you can authenticate against the graph on a a p I. The 1st 1 is the basic authentication, and the 2nd 1 is the a p I key based. They are basically very similar, and I would like to show you how this basic works. So what we would like to do or have is the following. Yeah, so currently I'm in my repository on my local machine, so we are going to go remote. So in order to go remote, we need the requests more. You're and from the requests that health. We need the import The http Basic health life. Ah, class And we create our credentials. We are this common. So http, basic out and we say that this is admin on the start. Exclamation like 123 Now, in orderto let's say very five, everything is working properly. We should go and issue this Get requests against the yuet out, which is https. Currently it's running on my santo s a machine and we would like to get a p I admin set things and we would like to specify an authentication which will come from the credentials , and we would like not verify this connection because this is a self signed certificate and it will fail if we want to worry fight. Now, if we issue the enter, it will respond with 200 states gold, which means that the query has round successfully. And if we inspect the text property of the response, then we can see the basic informations about a graph in a instance. All right, now, what we would like to do is to create a user, and in order to create that user, we need to specify user data and this user data will be a dictionary. So we would like to have this user name and this name is going to be best. You there and this is going to have anemia ale. And we say the test at graf on dot com and we would like to have a Logan which will be used to log in with this user, and this is going to be test use their and we will have a password that is going to be best bus. And now we can close this dictionary, and what we can do is to issue the following post requests. So, the http AP, I allows you to utilize the crude Pathan, so create Abdi it delete and modify If I said correctly. So what we would like to do is to post this following data that we have created under the users context. Truth off the admit. And we change this to a post request and we specified the data. And this data will come from the Jason dumps user data, and it will fail because Jason was not imported. So, Jay, some import and we say that we also need a separator here now What we also need to do is to specify Heather and that Heather is going to be in the content type, which will be our application. J. Sohn. Great. Now we have created the user whose idea is five. If you go back to the http interface and refresh this one, you can see that our test use there was created with the viewer or which is the default. Now what we can do is to get a list off our teams. So in order to retrieve the list off the teams that are currently in our instance, what we need to do is through issued a get request and use on the teams and point and basically that's it. So now you can see all the information about the teams that are configured under our graph , Inna instance. What we can do is to create a new team and for that we would like to use the post request off. The more you're and we would like to pose to the later which will come from the Jason dumps and we specify here what we would like so test team and this is going to be the name off our team, and we would like to also specify an email for the steam. So test theme at graph Ana that come and it gives us a syntax error because I forgot, right the separator. And what we also need to specify is that we would like to use the heather, which is the just second this one that we are going to repurpose. So now if we insert it with the age, you will see that we have successfully created a team with the I D three. All right now we can update the team. That's basically the same request. But let's first inspect it. Also, themes, esteem, and maybe we have a change in the email address. So remember that in the previous response we got back that the idea of this team is three. So what we would like to the do is to specify three. As a team, I d. And we say that the data that we would like to post is the new mail for best Ed Graf Ana that come and basically that is going to be applied. So now it says that this team was not found, but I was it not found. So teams post test team. What? What? It should have Bean found. So what's the probe? Let's see our web interface. How does it look? So fat things testy him. And if he refreshed this one on go here. All right, so now it seems like there may be something wrong. So currently I'm checking my cheat sheet and it says the that we do not want to post this request the but put So this is for the crude functionality. And now you can see that the team waas successfully updated. If you refresh it, you can see that we have modified the the team s email address. So now let's get back to our concern and that the new use that that we have created to our team. So now what we would like to do is to use and, uh, members context route and we would like to hard a new user with the user I d which is going to be five if we go back and check When we created the user, it got the user i d as five. And now you can see that the member was added to the team so Now, if we check the members, you can see that the test user waas successfully added. And, uh, we can simply delete specific member by calling the following. So we say that members and the member I d. Is five. We do not need this Jason data and we need to use to delete request. So did it. And now you can see that the member was successfully removed. And if you want to get rid off the team itself, then this is the same. We just remove the members slash five. And as you can see, this team is no more. Great. So I think Ah, I have shown you what about how you can manage to use us, Griffon A. And in the next video, we are going to take a look at how we can mark many Pilate dashboards. 10. Grafana Outro: welcome to the final video of this course. So far you have learned how you can build your own roughen up from the ground up. You learned how you can install Graffagnino. How you cannot the data source, how you can configure it with the user interface of the Web. You I and also you got in a taste off the a p I itself so that our many aspect which can be managed off the graph ana, we had Web interface and it, as I mentioned before, supports the crude functionality so we can create dilate, Abit and query Resource is provided by the deep Yeah, and we have covered how you can create teams and users. There are many other aspects which really depend on your situation as to how you can use it . But as a general rule of thumb, when you want to create something, you will use post requests with the data payload as Jason, and when you want updates something, use a put request and when you want to delete something, you use a delete request, and when you want to query something, you used to get request and based on that and the documentation, you should be able to cope with whatever challenge you my face in your career or environment. So all in all I would like to thank you for taking this course. And if you have any suggestions, I would like you to send them to me either real messages and leave a review because it helps me get better and create more resource for courses. Thank you for watching.