1
00:00:00,480 --> 00:00:06,180
In this video, we'll now set up a telegraph collector which will collect stats about our operating

2
00:00:06,180 --> 00:00:11,820
system that I installed influx flux debris onto and store them in influx daily, and we'll install those

3
00:00:11,820 --> 00:00:14,970
statistics into a bucket that we've named Telegraph.

4
00:00:15,130 --> 00: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

5
00:00:20,280 --> 00:00:21,900
one one eight eight six.

6
00:00:21,960 --> 00:00:23,880
Now, I mean, influx to be right now.

7
00:00:23,880 --> 00:00:27,780
If I look at the buckets there and I click Telegraph, I can explore it.

8
00:00:27,900 --> 00:00:31,550
So there's a whole lot of information already that we can already raid these orders.

9
00:00:31,560 --> 00:00:36,470
Internal statistics being created from the telegraph bucket that was created in influx DB.

10
00:00:36,480 --> 00:00:42,360
But the Telegraph agent that I'll install now will push a whole lot of extra statistics to that that

11
00:00:42,360 --> 00:00:43,230
will be able to use.

12
00:00:43,590 --> 00:00:49,620
But just to show that we can already breed data in Gravano just from these available statistics, for

13
00:00:49,620 --> 00:00:56,340
example, memes stats allocated bots, we can see that as a graph, we can actually view that data in

14
00:00:56,350 --> 00:01:01,860
Gravano right now without actually installing Telegraph because this data's already present in flux

15
00:01:01,860 --> 00:01:02,220
DB.

16
00:01:02,220 --> 00:01:06,570
So click script editor up there and that script we can just copy.

17
00:01:06,570 --> 00:01:10,440
Go into Safana and in the Explore tab on Safana.

18
00:01:10,470 --> 00:01:17,100
Select Influx DB paste that there make the time frame a little bit smaller, for example, and you'll

19
00:01:17,100 --> 00:01:18,390
begin to see data.

20
00:01:19,320 --> 00:01:22,140
So we're reading that in Kafala now.

21
00:01:22,170 --> 00:01:27,630
So everything we're seeing in influx DB we can see in Gravano.

22
00:01:27,630 --> 00:01:35,420
And mostly the reason for that is because of the API token here that I'm using code griffon as token

23
00:01:35,430 --> 00:01:41,490
now, something which I should have done in a previous video I'll fix now is actually create a read

24
00:01:41,490 --> 00:01:47,190
only token because if we look at the Gryffindor token, it has a lot of permissions reading right authorizations,

25
00:01:47,190 --> 00:01:49,470
buckets, dashboards, org sources.

26
00:01:49,470 --> 00:01:50,280
Many, many things.

27
00:01:50,280 --> 00:01:51,450
That's an admin user.

28
00:01:51,450 --> 00:01:55,980
We shouldn't be using Raphinha to query influx DB using an admin user.

29
00:01:56,010 --> 00:02:00,570
So what I'll do is create a new API token, a read write API token.

30
00:02:00,600 --> 00:02:05,880
In fact, only I read token that will be Bafana read only.

31
00:02:05,880 --> 00:02:06,900
That's what I'll call it.

32
00:02:06,930 --> 00:02:10,080
Save that refinery to only copy that to clipboard.

33
00:02:10,470 --> 00:02:18,030
Go back into a Farnum data sources in flux DB down here where it says token just reset that and replace

34
00:02:18,030 --> 00:02:20,130
it with the new token save and test.

35
00:02:20,340 --> 00:02:23,850
And now I can only see one bucket and that is the telegraph bucket.

36
00:02:24,000 --> 00:02:29,090
So going back out into Explore sample query showed buckets.

37
00:02:29,100 --> 00:02:30,810
I can only see one telegraph bucket.

38
00:02:30,810 --> 00:02:35,450
So going forward, I'm going to use this to only use your finger Gryphon.

39
00:02:35,460 --> 00:02:38,850
Okay, so I'm no longer going to use that token, and that's this bit better practice.

40
00:02:38,910 --> 00:02:42,990
OK, so going back to explore my script edits a copy that.

41
00:02:43,900 --> 00:02:45,640
That should still work.

42
00:02:45,870 --> 00:02:47,230
There we go and there's some data.

43
00:02:47,260 --> 00:02:50,470
Just be sure that you can still do that with your Read-Only user.

44
00:02:50,530 --> 00:02:55,810
Anyway, if we look at those values that we can query, switch back to query builder.

45
00:02:55,840 --> 00:02:56,890
There's quite a lot in there.

46
00:02:56,950 --> 00:02:59,040
But normally you want more.

47
00:02:59,050 --> 00: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

48
00:03:04,510 --> 00:03:06,140
you can choose from in this video.

49
00:03:06,170 --> 00: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

50
00:03:14,690 --> 00:03:22,650
I was will mem memory net and through other things, processes as well.

51
00:03:22,660 --> 00: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

52
00:03:26,950 --> 00:03:27,670
those things in.

53
00:03:27,700 --> 00:03:30,550
First thing, though, is to install the telegraph process.

54
00:03:30,730 --> 00:03:33,640
OK, so we can install that from the downloads page.

55
00:03:33,760 --> 00:03:34,950
So open that up.

56
00:03:35,050 --> 00:03:35,500
OK.

57
00:03:35,530 --> 00:03:37,620
This is the same page from the last video.

58
00:03:37,630 --> 00:03:42,730
Instead of scrolling down further telegraph open source dot a click to installing Telegraph version

59
00:03:42,730 --> 00:03:48,280
one point twenty point four Ubuntu Debian is a few choices there, and they are the instructions.

60
00:03:48,430 --> 00:03:50,440
I've copied these onto my documentation as well.

61
00:03:50,470 --> 00:03:54,730
So first line log on to your influx DB server pasting.

62
00:03:55,330 --> 00:03:59,620
OK, that's downloaded now to install it using the Debian package manager.

63
00:03:59,980 --> 00:04:00,460
And so.

64
00:04:01,730 --> 00:04:02,100
OK.

65
00:04:02,130 --> 00:04:04,340
Sudo service.

66
00:04:05,380 --> 00:04:07,300
Telegraph status.

67
00:04:07,690 --> 00:04:14,020
OK, so it's active running now, it's got an error for one unauthorized will solve that problem now,

68
00:04:14,020 --> 00:04:14,420
so.

69
00:04:14,440 --> 00:04:15,850
Just control C to get out of that.

70
00:04:15,910 --> 00:04:20,019
The telegraph process needs permission to push into the influx DB database.

71
00:04:20,220 --> 00:04:25,570
OK, so what we can do is create a specific token for that purpose, but instead, I'll show you another

72
00:04:25,570 --> 00:04:26,450
way of doing this.

73
00:04:26,590 --> 00:04:31,840
If we go to telegraph here and we select create configuration, we get this wizard and I'm just going

74
00:04:31,840 --> 00:04:34,100
to click system there and continue.

75
00:04:34,120 --> 00:04:39,850
I'm going to court system and it's going to create a dashboard in influx DB querying these properties.

76
00:04:39,850 --> 00:04:41,140
So I create and verify.

77
00:04:41,170 --> 00:04:41,530
OK.

78
00:04:41,560 --> 00: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.

79
00:04:47,440 --> 00:04:48,220
Press finish.

80
00:04:48,250 --> 00:04:49,540
Go to API tokens.

81
00:04:49,540 --> 00:04:50,860
The new token is down here.

82
00:04:50,860 --> 00:04:51,810
So right?

83
00:04:51,820 --> 00:04:54,830
Telegraph bucket rate system telegraph config.

84
00:04:54,850 --> 00:04:56,980
So it has the required permissions.

85
00:04:57,100 --> 00:04:59,320
So we'll use that token there.

86
00:04:59,410 --> 00:05:06,190
But before then, let's modify the configuration for telegraph back on the server side into the new

87
00:05:06,190 --> 00:05:07,090
Telegraph folder.

88
00:05:07,090 --> 00:05:09,340
So ATC Telegraph.

89
00:05:09,430 --> 00:05:12,550
And if we do place there are three files in the Telegraph.

90
00:05:12,550 --> 00:05:13,920
Conf is the one we want.

91
00:05:13,960 --> 00:05:21,640
I'm going to create a backup of that file to C.P Telegraph Token to telegraph dconf thought back.

92
00:05:21,790 --> 00:05:25,030
That's just the backup that you can refer to later on if you want to.

93
00:05:25,280 --> 00:05:28,120
OK, Alex, like OK, it's full force now.

94
00:05:28,150 --> 00:05:31,450
Delete Telegraph to arm telegraph dconf.

95
00:05:31,660 --> 00:05:35,980
OK, we're going to create a new one sudo nano telegraph dconf.

96
00:05:36,130 --> 00:05:40,690
Just like that into all my documentation, I have a default configuration.

97
00:05:41,110 --> 00:05:43,990
Right click is setting up just the minimum we need.

98
00:05:44,650 --> 00:05:46,180
It's quite an output plugin.

99
00:05:46,180 --> 00:05:47,750
Influx DB version two.

100
00:05:47,770 --> 00:05:51,640
We're pushing to the local eight zero eight six the token.

101
00:05:52,950 --> 00:05:53,610
Delete that.

102
00:05:54,670 --> 00:05:59,830
And put this in copy that now if you just right click it, will paste it in.

103
00:05:59,860 --> 00:06:02,190
Don't worry about the word rapping like that.

104
00:06:02,200 --> 00:06:07,800
That's just what A. us when the line is too long to fit with that organization.

105
00:06:07,810 --> 00:06:12,580
And when I created my first log in, I actually created an organization as well, and I called that

106
00:06:12,580 --> 00:06:13,450
SB code.

107
00:06:13,600 --> 00:06:19,180
You can verify that using the application here on your user says SB Code.

108
00:06:19,190 --> 00:06:20,340
That's my organization.

109
00:06:20,360 --> 00:06:21,160
You be different.

110
00:06:21,310 --> 00:06:22,690
Pay packet telegraph.

111
00:06:22,810 --> 00:06:30,340
OK, so we have our inputs for CPU disk disco mem net processes swap and system control.

112
00:06:30,360 --> 00:06:31,390
X Yes.

113
00:06:31,480 --> 00:06:33,130
Now let's restart telegraph.

114
00:06:34,820 --> 00:06:35,600
Restart.

115
00:06:35,930 --> 00:06:38,630
Give it a moment and then check its status.

116
00:06:39,500 --> 00:06:43,120
OK, and if we move along, there are no errors there.

117
00:06:43,460 --> 00:06:47,150
OK, go into flux again, go to explore.

118
00:06:47,580 --> 00:06:54,500
If I just zoom up there, we start to see some extra properties mem net processes.

119
00:06:55,540 --> 00:07:02,890
Swap system, so if I type in process says, for example, I start to see a whole lot of extra things.

120
00:07:03,190 --> 00:07:04,300
Another one is Troy.

121
00:07:04,300 --> 00:07:09,040
Super nice to see you dislike that usage user is a good one.

122
00:07:09,850 --> 00:07:13,000
Submit that I can see the CPU usage user.

123
00:07:13,030 --> 00:07:18,250
Now this same query script editor, we can copy that and put that into a photo.

124
00:07:18,250 --> 00:07:19,140
Click out of that.

125
00:07:19,150 --> 00:07:22,000
And now I'm seeing that same information in graphite.

126
00:07:22,030 --> 00:07:26,080
We can start creating dashboards with that last five minutes.

127
00:07:26,410 --> 00: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.

128
00:07:30,880 --> 00:07:35,800
What I'm going to do the next video is rebuild this system dashboard.

129
00:07:36,250 --> 00:07:44,530
Now this system dashboard was just created when I before when to data press, telegraph and did create

130
00:07:44,530 --> 00:07:46,420
configuration and chose system.

131
00:07:47,800 --> 00:07:52,600
So Board's system, so we'll create that in the next video.

132
00:07:52,930 --> 00:07:53,830
OK, excellent.

