WEBVTT

00:00.480 --> 00:06.180
In this video, we'll now set up a telegraph collector which will collect stats about our operating

00:06.180 --> 00:11.820
system that I installed influx flux debris onto and store them in influx daily, and we'll install those

00:11.820 --> 00:14.970
statistics into a bucket that we've named Telegraph.

00:15.130 --> 00:20.280
OK, so it's going to be installed locally on the same server, so to pushed to one two seven zero zero

00:20.280 --> 00:21.900
one one eight eight six.

00:21.960 --> 00:23.880
Now, I mean, influx to be right now.

00:23.880 --> 00:27.780
If I look at the buckets there and I click Telegraph, I can explore it.

00:27.900 --> 00:31.550
So there's a whole lot of information already that we can already raid these orders.

00:31.560 --> 00:36.470
Internal statistics being created from the telegraph bucket that was created in influx DB.

00:36.480 --> 00:42.360
But the Telegraph agent that I'll install now will push a whole lot of extra statistics to that that

00:42.360 --> 00:43.230
will be able to use.

00:43.590 --> 00:49.620
But just to show that we can already breed data in Gravano just from these available statistics, for

00:49.620 --> 00:56.340
example, memes stats allocated bots, we can see that as a graph, we can actually view that data in

00:56.350 --> 01:01.860
Gravano right now without actually installing Telegraph because this data's already present in flux

01:01.860 --> 01:02.220
DB.

01:02.220 --> 01:06.570
So click script editor up there and that script we can just copy.

01:06.570 --> 01:10.440
Go into Safana and in the Explore tab on Safana.

01:10.470 --> 01:17.100
Select Influx DB paste that there make the time frame a little bit smaller, for example, and you'll

01:17.100 --> 01:18.390
begin to see data.

01:19.320 --> 01:22.140
So we're reading that in Kafala now.

01:22.170 --> 01:27.630
So everything we're seeing in influx DB we can see in Gravano.

01:27.630 --> 01:35.420
And mostly the reason for that is because of the API token here that I'm using code griffon as token

01:35.430 --> 01:41.490
now, something which I should have done in a previous video I'll fix now is actually create a read

01:41.490 --> 01:47.190
only token because if we look at the Gryffindor token, it has a lot of permissions reading right authorizations,

01:47.190 --> 01:49.470
buckets, dashboards, org sources.

01:49.470 --> 01:50.280
Many, many things.

01:50.280 --> 01:51.450
That's an admin user.

01:51.450 --> 01:55.980
We shouldn't be using Raphinha to query influx DB using an admin user.

01:56.010 --> 02:00.570
So what I'll do is create a new API token, a read write API token.

02:00.600 --> 02:05.880
In fact, only I read token that will be Bafana read only.

02:05.880 --> 02:06.900
That's what I'll call it.

02:06.930 --> 02:10.080
Save that refinery to only copy that to clipboard.

02:10.470 --> 02:18.030
Go back into a Farnum data sources in flux DB down here where it says token just reset that and replace

02:18.030 --> 02:20.130
it with the new token save and test.

02:20.340 --> 02:23.850
And now I can only see one bucket and that is the telegraph bucket.

02:24.000 --> 02:29.090
So going back out into Explore sample query showed buckets.

02:29.100 --> 02:30.810
I can only see one telegraph bucket.

02:30.810 --> 02:35.450
So going forward, I'm going to use this to only use your finger Gryphon.

02:35.460 --> 02:38.850
Okay, so I'm no longer going to use that token, and that's this bit better practice.

02:38.910 --> 02:42.990
OK, so going back to explore my script edits a copy that.

02:43.900 --> 02:45.640
That should still work.

02:45.870 --> 02:47.230
There we go and there's some data.

02:47.260 --> 02:50.470
Just be sure that you can still do that with your Read-Only user.

02:50.530 --> 02:55.810
Anyway, if we look at those values that we can query, switch back to query builder.

02:55.840 --> 02:56.890
There's quite a lot in there.

02:56.950 --> 02:59.040
But normally you want more.

02:59.050 --> 03:04.510
If you go to the data tab and you look at these sources page as a whole, lot of things in here that

03:04.510 --> 03:06.140
you can choose from in this video.

03:06.170 --> 03:14.630
I was told the Telegraph collect a process and set it up so that the query data about the CPU disk disk

03:14.690 --> 03:22.650
I was will mem memory net and through other things, processes as well.

03:22.660 --> 03:26.950
This millions of things to choose from, but I'm just going to show you a very quick way to get all

03:26.950 --> 03:27.670
those things in.

03:27.700 --> 03:30.550
First thing, though, is to install the telegraph process.

03:30.730 --> 03:33.640
OK, so we can install that from the downloads page.

03:33.760 --> 03:34.950
So open that up.

03:35.050 --> 03:35.500
OK.

03:35.530 --> 03:37.620
This is the same page from the last video.

03:37.630 --> 03:42.730
Instead of scrolling down further telegraph open source dot a click to installing Telegraph version

03:42.730 --> 03:48.280
one point twenty point four Ubuntu Debian is a few choices there, and they are the instructions.

03:48.430 --> 03:50.440
I've copied these onto my documentation as well.

03:50.470 --> 03:54.730
So first line log on to your influx DB server pasting.

03:55.330 --> 03:59.620
OK, that's downloaded now to install it using the Debian package manager.

03:59.980 --> 04:00.460
And so.

04:01.730 --> 04:02.100
OK.

04:02.130 --> 04:04.340
Sudo service.

04:05.380 --> 04:07.300
Telegraph status.

04:07.690 --> 04:14.020
OK, so it's active running now, it's got an error for one unauthorized will solve that problem now,

04:14.020 --> 04:14.420
so.

04:14.440 --> 04:15.850
Just control C to get out of that.

04:15.910 --> 04:20.020
The telegraph process needs permission to push into the influx DB database.

04:20.220 --> 04:25.570
OK, so what we can do is create a specific token for that purpose, but instead, I'll show you another

04:25.570 --> 04:26.450
way of doing this.

04:26.590 --> 04:31.840
If we go to telegraph here and we select create configuration, we get this wizard and I'm just going

04:31.840 --> 04:34.100
to click system there and continue.

04:34.120 --> 04:39.850
I'm going to court system and it's going to create a dashboard in influx DB querying these properties.

04:39.850 --> 04:41.140
So I create and verify.

04:41.170 --> 04:41.530
OK.

04:41.560 --> 04:47.410
So it's just created a token for us, which we'll use in the moment, but we can ignore this page.

04:47.440 --> 04:48.220
Press finish.

04:48.250 --> 04:49.540
Go to API tokens.

04:49.540 --> 04:50.860
The new token is down here.

04:50.860 --> 04:51.810
So right?

04:51.820 --> 04:54.830
Telegraph bucket rate system telegraph config.

04:54.850 --> 04:56.980
So it has the required permissions.

04:57.100 --> 04:59.320
So we'll use that token there.

04:59.410 --> 05:06.190
But before then, let's modify the configuration for telegraph back on the server side into the new

05:06.190 --> 05:07.090
Telegraph folder.

05:07.090 --> 05:09.340
So ATC Telegraph.

05:09.430 --> 05:12.550
And if we do place there are three files in the Telegraph.

05:12.550 --> 05:13.920
Conf is the one we want.

05:13.960 --> 05:21.640
I'm going to create a backup of that file to C.P Telegraph Token to telegraph dconf thought back.

05:21.790 --> 05:25.030
That's just the backup that you can refer to later on if you want to.

05:25.280 --> 05:28.120
OK, Alex, like OK, it's full force now.

05:28.150 --> 05:31.450
Delete Telegraph to arm telegraph dconf.

05:31.660 --> 05:35.980
OK, we're going to create a new one sudo nano telegraph dconf.

05:36.130 --> 05:40.690
Just like that into all my documentation, I have a default configuration.

05:41.110 --> 05:43.990
Right click is setting up just the minimum we need.

05:44.650 --> 05:46.180
It's quite an output plugin.

05:46.180 --> 05:47.750
Influx DB version two.

05:47.770 --> 05:51.640
We're pushing to the local eight zero eight six the token.

05:52.950 --> 05:53.610
Delete that.

05:54.670 --> 05:59.830
And put this in copy that now if you just right click it, will paste it in.

05:59.860 --> 06:02.190
Don't worry about the word rapping like that.

06:02.200 --> 06:07.800
That's just what A. us when the line is too long to fit with that organization.

06:07.810 --> 06:12.580
And when I created my first log in, I actually created an organization as well, and I called that

06:12.580 --> 06:13.450
SB code.

06:13.600 --> 06:19.180
You can verify that using the application here on your user says SB Code.

06:19.190 --> 06:20.340
That's my organization.

06:20.360 --> 06:21.160
You be different.

06:21.310 --> 06:22.690
Pay packet telegraph.

06:22.810 --> 06:30.340
OK, so we have our inputs for CPU disk disco mem net processes swap and system control.

06:30.360 --> 06:31.390
X Yes.

06:31.480 --> 06:33.130
Now let's restart telegraph.

06:34.820 --> 06:35.600
Restart.

06:35.930 --> 06:38.630
Give it a moment and then check its status.

06:39.500 --> 06:43.120
OK, and if we move along, there are no errors there.

06:43.460 --> 06:47.150
OK, go into flux again, go to explore.

06:47.580 --> 06:54.500
If I just zoom up there, we start to see some extra properties mem net processes.

06:55.540 --> 07:02.890
Swap system, so if I type in process says, for example, I start to see a whole lot of extra things.

07:03.190 --> 07:04.300
Another one is Troy.

07:04.300 --> 07:09.040
Super nice to see you dislike that usage user is a good one.

07:09.850 --> 07:13.000
Submit that I can see the CPU usage user.

07:13.030 --> 07:18.250
Now this same query script editor, we can copy that and put that into a photo.

07:18.250 --> 07:19.140
Click out of that.

07:19.150 --> 07:22.000
And now I'm seeing that same information in graphite.

07:22.030 --> 07:26.080
We can start creating dashboards with that last five minutes.

07:26.410 --> 07:30.850
Now, I'm not going to show you how to try to dashboard, and his video will do that in the next video.

07:30.880 --> 07:35.800
What I'm going to do the next video is rebuild this system dashboard.

07:36.250 --> 07:44.530
Now this system dashboard was just created when I before when to data press, telegraph and did create

07:44.530 --> 07:46.420
configuration and chose system.

07:47.800 --> 07:52.600
So Board's system, so we'll create that in the next video.

07:52.930 --> 07:53.830
OK, excellent.
