So enough of looking at visualizations now with a test data.
DB Let's use a real data source.
The first one will be a mask.
Your data source will also need to install a collective for and then we can install a dashboard.
Okay.
So what we can do is get ourselves a dedicated mask crossover.
Don't use an existing production server for now.
We can create one using the digitalization coupon from earlier, or you might have a different cloud
provider set up.
Okay.
So looking at the diagram so far on a server, might want to take you to be a microphone and the speaker
has an IP address of ports 84, 43 and actually 22 as well for this H we've been playing around with
the test data DB data source.
We're now moving on to the micro data source, which is one of many.
So I'm going to install a micro server first, then install a collector.
That collector will then prepare tables in a time series format that we can use in profile.
Okay, so first thing, let's get a nice crossover I digitalization I'm going to create new droplet.
Many cloud providers will have a specialized database option.
I'm not going to do that.
I'm just going to create a droplet.
I'm going to install it open to 20 minimum spec and I'm going to manually install my Q onto that.
Okay.
So open to 20 basic $6 a month I can put anywhere I like Amsterdam, for example, I'm going to use
my size H key.
I already have one.
You can use a password if you want.
I'm going to call it my school.
Like that.
Create droplet.
Okay.
So that's the IP address I've been given as a public IP copy that.
I'm now going to set that up in putty.
That's what I use for site.
So IP address in there, I'm going to call it my secure.
I'm going to set the authentication, my private key, because I'm using this as a key method and I'm
going to change my parents to be larger font because it's hard to say otherwise.
Okay.
Before I open that, I just save that.
Okay.
So my school, there it is.
There.
So I can open that up.
This is my new my SQL Server.
I'm logging on this route.
There we go.
There.
So route at my school, this is another server.
So I've got two servers now I can find a server at that IP address and a micro server at that IP address.
It's going to update my documentation.
There we go.
Very good.
I need to have open port 22 and 3306, but more about that after.
Okay, first thing you normally do and get anybody server is update the app to cache so it knows about
the latest packages.
Okay.
Now we're going to install my SQL Server onto that server.
So sudo ipt install my secure server.
Now we go now precious.
Okay, now I'm creating a brand new micro server.
I don't want to use a production server just yet.
I can do that later.
So I recommend not using a production server.
Just use something that we can experiment with and then delete when you're finished with it.
Okay, that's done.
Let's check its status.
Very good active running.
Now it's important to know what version you've just installed.
So with that you can run my skill half and capital V like that version eight.
That's important to know because we'll use it at the moment.
Okay.
So we don't have the server module server and that's my IP address.
Your IP address is going to be different.
Next thing I'm going to do is I need to install a collector.
All data sources will have some kind of collection process going on, preparing data from the end data
source and saving it into a format that Bafana can quickly retrieve from.
That will usually be a table of some sort that contains rows with a timestamp and one or more values.
Okay, so for this, Mike, your data source, there are several options that we can choose from.
I'm going to use a dashboard and collector that you can get from the Gryphon Dashboards website.
Okay.
So the dashboard I'll use will be the popular my to ask you all simple dashboard from this link here.
So open that this is the Carvana Dashboards page.
We scroll down.
I have my SQL data source selected from this list of many, and it's this one here to my well simple
dashboard.
There are several others that you can try out, but I always found this one to be the best.
Okay, so there's some sample images here, what it will look like when we've finished.
Okay.
It's dependencies.
Our minimum grant of 8.1.2.
And we use these visualizations down here.
Now, this dashboard requires a specific collector and you can see that written here in the reviews
section down here.
You must use a collector from there.
So I have a link to that also.
So the collector will be from here.
That's the collector will install, it's on GitHub and I'm using version eight.
So I'll need to download this script here.
My to underscore, I'd ask you if you're using version five of my show, then download that script.
So on my documentation of prepare a get a command here, you can copy that and that's downloading the
my to underscore idisk on my my server right click so pastes.
Okay so you get raw GitHub user, etc. my collector master my two ideas.
Cool.
And so that's downloaded 100% very fast.
We need to edit that file.
So Sudo no I'll use that I for that.
Nano is a text editor for Linux sudo.
My two ideas.
Cool.
Now we scroll down.
What it's actually doing is creating a database called my two.
It will create some tables in that database where it will store statistics about how skill server.
And these are the commands that will create and run if you are good at school.
You might find this very informative, but if you don't know high school, then you don't really need
to know this to understand professional.
But what the collector is essentially made from is a stall procedure which will collect daily stats.
And it will run every 10 minutes.
Now, right at the end, we need to uncomment these last three lines.
We need to create a user called My Two Hat.
That's the wild card for this server identified by anything like this is the password.
I'm just going to keep it simple.
I can use the word password grant.
All that means all permissions on my two dot star, which means all the tables in the mitu database
to the user.
My to add wildcard this server because to my two user is going to be querying global statistics about
the module server.
It also needs to have select permission on the performance schema database all tables to my to same
user.
Now this is all about the collect.
So control x to save that.
Yes.
What I've just done was installed the script for the collector.
When we run the script it will credit stored procedure.
It will run every 10 minutes running a command called Show Global Status and store that data into a
table in a time series fashion so that we can clear that using Gravano.
Now, the last three lines we commented were about creating this user called Meitu just here, and it
has a grant select permission on everything in performance schema.
We don't need to run that script.
We can run that script using my so copy that line just there and on your server my school run my to
ID is Kuo press enter case that's just run that mask your script that we just edited using nano and
it would accredit a new user we can now open a module prompt and do some simple tests.
So just type my school like enter and it should present you with a module prompt that greater than sign
with the mask.
Yeah that's the mask.
You are prompt.
We can now start typing skill commands.
So the first one will do show databases.
Show databases.
And we have several databases on this as your server, the new one we just credit from the script is
called two, has several tables that our collector will be using and Gravano will be rating from this
also the performance schema type that already exists on the Moscow server, but we've created that my
two user, which can read from the performance schema and summarize information into the my two table
so that my two user and my two table are name the same thing.
But just beware that this is the database called My Two and there's a user that we also created called
my two with select permissions on the performance schema.
Okay.
Now part of what's important about the collector is that, well, we use an event scheduled to run that
every 10 minutes, so copy that line pasted in show variables where variable name equals event scheduler.
If it says on that is good.
If it says off like it used to in the older versions of Moscow, then would have to do some things to
enable it.
We don't have to do that case.
The next line let's have a look at some information about our users in our database.
Can select host user from my secure DOT user.
Okay, so we have some in-built users that we use and we also have our own one that we created to hold
my two.
And my two is the specific user that the collector will use to read that performance schema and summarize
it into the my two that will query in Gryphon.
Okay.
Next, let's look at the my two database.
So use my two.
Now switching to the my two database, it's to show tables, finish with a semicolon.
So there's two tables in it called current and status.
The collector will be saving data into those two tables.
So let's see what there is now select all from current and each with a semicolon and there's some data
there.
So can do the same thing.
Select all from status.
We get get and this morning, too.
Now, if you want to exit the mosque you prompt just talk.
Quit like that.
So we're back into the normal ubuntu bash prompt now.
Okay.
That's very good.
So we now have the collector running and this data there, we can now go into fauna and try and set
up the data source.
It's not going to work completely, but it's good to see what kind of problems will have so that we
know how to fix them.
Okay, so, inka fauna, I'm going to go down here to configuration data sources and I'm going to add
a data source.
Scroll down until I find my school select.
Okay, so this is like the test out a DB, but instead this is a back thinking to my skill set.
So the host will be the IP address of my skill server.
Call 3306 the IP address.
What's that?
Okay, so host call and 3306.
Now, these things aren't going to work initially, but we'll just show you what those problems will
be.
The database that I'll be connecting to will be called my two.
Now, that's the database that we just created by run that script, and our collector will be saving
data into that.
My two database, the user that we'll use is called Gryphon with a password.
I'm going to keep it simple.
I'm going to use the word password.
I can see that if I click that.
So that's the simple password I'm using.
You can use something a lot more complicated.
Okay.
Now this user doesn't yet exist on our skill server, so walk right that also depending on where you
got your skill server from and how we've installed it, we won't be able to connect on Port 3306, but
we'll get on to that also.
So let's just save and test and see what we get.
Okay.
So data source updated, but we got a problem connecting to the server will resolve that.
Okay.
So several things to do.
So one of those is to create a user called Griffon on that server.
Now I'm creating a new user because it's advised to.
So Gryphon does not validate the query to site.
So queries can contain any obscure segment, for example, use on the database or drop tables or do
any other malicious thing and use carvana as a vector.
So what you do is you create a specific user with minimum permissions, for example, select only on
a specified database and tables that you want to query.
So I could also use the my to user, but the my to use our has advanced permissions because you can
also read from the performance schema table and also insert data.
So I'm creating a specific user culture fauna with only select permissions and select permissions on
all the tables in the My two database.
So first thing will do is create a user.
So going back onto our my skill server, I'm on my skill server, I'm going to log back into the module
prompt.
So type in mask.
You will enter like that and will create a user.
So create user co-founder at identified by password.
Now we need to know what the IP address is all about on a server.
So replace that and the IP address of microphone or server is this value that I saved earlier.
Okay.
So I'm creating a new user called Gryphon at that IP address.
So that will be used for connecting to the skill server from microphone to server.
And that's the username that my expect and that's the password I'm using.
It's very simple, just password.
And that's the password that I entered here before.
Okay.
So identified by password.
Presenter So we have a new user now I'm going to select on that user to all the tables in the Meitu
database so that user to find at 142.
Okay.
So I'm allowing that you're finally use it to read all the tables in the my two database press enter
flush privileges.
And before we go, we can verify that user exists by typing in select host user from my skill user.
And then we go.
We have a new user called a co-founder and that's the host that it will be connected properly.
So quit.
Now that's not all the problems solved yet.
Let's try connecting again to see what error we get now in the data source.
So save and test data source updated, but we still have a problem now by default.
When you were still my school, it won't allow external connections.
So my server, that IP address isn't able to connect to the running module process.
Okay.
So to allow remote connections, we need to open the module configuration file that there will use that
command pseudo nano adc might kill my boss know scroll down and add this section here.
This will bind my school to all IP addresses on your server being the external IP address as well as
localhost.
Because right now by default it's only bound to local host cases.
So that control ex wife is enter now to restart my skills.
So copy that sudo service module restart.
Let's check its status.
All right.
Good active running control.
See, to get out of that now.
If we try again to connect using the Morse code data source, it should be okay.
Save and test.
Okay.
Database connection.
Okay.
So when connecting to external data sources, you are going to have lots of different issues related
to connectivity and permissions.
So on my my skill server, I have an IP address.
I have ports 22 and 3306 already open.
I'm using an unrestricted ubuntu server with no port blocking by default.
So 3306 works already.
I've created a user culture rafinha at the IP address of my Gryffindor server because that's how school
is going to see the connection.
I've also bound my school to 0000 so that it also binds to the external IP address.
Now if you're using us or any other cloud provider, port 3306 will probably also need to be opened
in your security group settings.
However you do this in your cloud provider, I didn't need to do that in my digitalization server because
it's already open by default.
Okay, so that's good.
We can get out of that.
Now, if we go to the Explore tab, just click that and select the mask will data source at the top.
We will now be able to run queries on that my to table now the mask will query wizard here is quite
hard to understand first so instead go straight to the skill option.
If you're familiar with school, that statement will make some sense to you.
But anyway, I'm not going to run that.
What I want to run is this section here, so copy that and replace that.
And now run query.
And there we go.
We start to get some data.
So we're reading data from my two dots status where variable name equals threads connected in order
by time of sending.
We don't have to really understand what's going on there yet, but you will understand that item anyway.
That just verifies that we're connecting to the mosquito database.
Through it, they might kill data source.
The next part is about creating the dashboards.
So dashboards manage.
We're going to import a dashboard.
We're going to import the dashboard from Gravano.
Okay.
So back on onto your Fauna Labs website, all to mask your simple dashboard.
There is an ID just to you get this dashboard.
So copy that to clipboard seven, nine, nine, one.
Go back into this graph on a page here, type in the ID or paste and load.
Okay, so it's found to my kill.
Simple dashboard followed a general we could create around photos if we wanted to.
I'm not going to do that.
Select a default data source being my school and now import.
Okay, so we now have an import that we've just downloaded from Bafana, which is built specifically
for that collector that we just installed and set up in MySchool.
And we've created the users, we've opened the appropriate ports, we've made appropriate changes to
my keyboard to allow the external connection and we can now start getting data.
Now the collector runs every 10 minutes, so we're not going to see a real lot for now.
Every 10 minutes there'll be a new update to these graphs.
So what I'll do is pause my recording and come back in an hour and we'll see some more data written
here about our MySchool server.
Excellent.
Okay.
So my MySchool data source has been running for about two and a half hours.
I set that to 3 hours, so see it.
Okay.
So also note that my database server that I just installed isn't working very hard.
It's not a production server, so there isn't really much to see here.
It's not working hard at all.
Anyway, with each of these visualizations, we can look into those and inspect them a little more to
see what they are.
For example, I can press a on these threats and errors here, and if I scroll up, that's the query
the cofounder is using, which is worth being aware of.
There are two queries running in here I am B threads connected threads running a few other particular
properties from the data source we see on the one single graph.
So you can see how that is put together.
Another thing here where a graph has been coded to 180 days, despite me expecting 3 hours update.
So if I edit that one and if I click query options, I can change that 180 days to be two days.
For example, there isn't two days of data, so it's still not that interesting to see.
But I could apply that and now says last two days there's another one down here, last 14 days, this
is a heat map and will become more interesting as it fills up.
Let's change that to two days.
Well, just to see.
Okay, so apply that.
So that's now showing two days.
This will look more interesting when it's been running for many days and especially if it was actually
a production secured database use by a website or other application anyway.
So I hope you can see from all that that setting up a dashboard is actually a very complicated process.
We will set up many dashboards.
The MySchool was the first one.
There'll be more as we go across.
Important thing about setting up dashboards in profile is that you need to consider that the graphic
on a server is going to have potentially privileged access to the end data source you're connecting
to.
So you need to manage permissions and security so that your phone can't be used as a vector to steal
data or even destroy data.
So that was important that I had set up appropriate uses and permissions and IP restrictions, which
leads me on to setting up IP tables rules now for my server on 3306.
Since I don't have a dedicated firewall on my server, I'm going to manage access to Port 3306 using
IP tables.
Okay.
So I'm on my, my school server, I'm just going to type in IP tables.
I find there are no dedicated rules on this, so I'm going to create one for port 3306.
So if I scroll to the bottom their IP tables, import source or Fana ESP code dot net, that's my server
destination port 3306 accept.
So what this rule will do is accept incoming connections to this server from a server with the IP address,
sacrifice B code on it.
So I enter that and if I do IP tables l again, it has updated that domain name to be the actual IP
address.
So I could have actually just taught the IP address in there, but doesn't matter.
You can type the domain of your group on a server or the IP address of it.
That is my IP address and that is my domain.
Anyway, the other thing I should drop all are the connections to port 3306 like that IP tables.
Okay, now let's check that IP tables URL.
Okay, so I'm accepting connections to port 3306.
It's replace that with my show just there automatically and dropping everything else.
So the only server that can remotely connect to my mask server is microphone a server.
So these are things you should consider.
Now with the username, it's especially important that that user that is connecting to the server has
only read only permissions, so that I can't do escalated commands such as drop database, drop table
or read data from tables on the database.
So these are things to consider.
Anyway, this was a long video, a lot of steps involved in getting a micro data source to work.
I'm using one kind of dashboard that's called the My Two Simple Dashboard.
You will find other dashboards for my school throughout the incident, and they'll all have a different
process for setting them up.
You can create a whole set up yourself, but this example has shown that it's quite a large jump in
skill.
You need to have some very good MySchool knowledge to be able to create a dashboard from the ground
up for a more secure server.
And that is the same for any data source that you connect to.
So that's why it's important not to send the font.
It doesn't actually exist by itself, despite the refinery's actually promoted as a magic tool for everything.
Getting it to work properly does require in-depth knowledge of the data source that you're connecting
to.
Anyway, we'll move on to other data sources and that will start to make more sense.
Now, if you didn't understand all the things in this video, it doesn't matter.
You have the video forever.
It's a long video and you can move on to other data sources and come back to that when you've had some
time away from it.
Excellent.
In the next few videos, we'll do some more MySchool examples.
Excellent.