OK, let's look at the ElasticSearch data source now.
It's another monitoring solution which has recently become quite popular for this whole install version
seven point sixteen.
Also, it uses the Java VMS, so it's going to need a minimum of two gigs of RAM for the ElasticSearch
service.
So I'm going to get my cell phone on the server.
I'm on digitalization crate droplets.
I'm going to use Ubuntu Point for Basic is $12 a month, two gigabytes ram, which is perfect.
I'm going to put it in Amsterdam.
I'm going to use the same VPC that I've been using throughout the course of my associated key, and
I'm going to call it.
ElasticSearch pay correct droplet.
OK, so I got my pay now.
Copy that.
I'm going to set that up and putting the stick.
Search.
Save it.
Pay parents.
Okay.
And go back and just cite that again, ElasticSearch.
Hey, I'm on my new ElasticSearch server with 2GB of RAM.
OK, so I'm going to install Debian package from this address here.
I've already copied the commands, so copy that lawn paste into the next line.
We need to install the dependencies.
It's actually already there next to save the repository definition, couldn't quite click until now
to run APT Update and install ElasticSearch.
OK, we can check the status.
OK, so it's loaded, but it's not running control.
See, OK, we can start it.
It usually takes 30 seconds to stop.
OK.
Double check status.
OK, so it's running very good.
If you're getting errors, you could run that line to see what they were.
But mine's booking.
We can see that a new user was created called ElasticSearch and we can see what processes it's running.
OK, so is running Java and controller OK?
We can test that it is running locally by doing a curl request and saying if we get a response for nine
200, no go.
There's a response.
So name ElasticSearch, et cetera, and a few other things.
OK, now we're going to need to modify ElasticSearch configuration.
That is because microphone a server will be connecting to the ElasticSearch server, which is a different
server.
So I'm going to need to allow remote connections at minimum.
OK, so let's say into the folder and see what we have.
OK.
So it was installed in ATC ElasticSearch.
So let's lasso Hitesh and there are a few falls.
We need to edit this ElasticSearch women also sudo nano ElasticSearch dot.
Why email?
OK, so scroll down.
Uncomment that.
So cluster name my application.
I'm going to let those default node name node one.
I'm leaving at this default.
Network host changed that to zero zero zero zero binds to all Ethernet interfaces, uncomment nine 200,
that's the default anyway.
And down here, cluster initial masternodes only need one and comment that OK, control x yes.
OK, so those changes are just written there and what documentation we now have to restart it.
OK.
Plastic search restart.
OK, that's good.
Sometimes we're errors.
You can inspect those by running that line up there, but that works.
OK, so got a running ElasticSearch server now?
Now we don't have any indexes in it.
It needs to have an index in it.
So let's create an index.
I'm going to call the index one so clear.
OK, I'm putting index one.
OK, acknowledged true index one.
OK, let's view the metadata into OK, so there we go.
That's all about index one.
That's good enough.
OK, we can add some data to index one time.
Yeah, OK.
I'm adding a road called ABC one to three.
I'm X or X and a timestamp.
That's good.
We can view the contents now of the index.
OK, so source ABC one, two, three nine mix, was it and that's the time stamp.
So we have some data in our index we can view the indices or indexes.
I could see index one exists.
OK, now if you want to index one, you can run that line.
So I'm not going to do that.
I'm not going to go into Crafar and create the elastic search data source.
OK?
Data sources and data source I scroll down ElasticSearch select.
The address of molesting search server was TTP colon slash slash.
I'm going to use the VPC IP address and not the external IP address because I'm going to block that
off using the firewall eventually.
So networking BBC go down to Amsterdam or put it View members my ElasticSearch.
I paste that site one three three zero six.
Copy that!
Colin, nine, two hundred.
OK.
My index name was index one.
Time stamp is correct, and the version is seven, 10 plus.
Now let's save and test, okay.
And networked index time field time.
Okay.
Excellent.
So let's go into explore and up here we should get ElasticSearch.
OK, so I can see some data straight away, but instead select for metric select raw data that shows
the table.
Now, that first row is the information I input using the curl statement before ABC one two three.
Name X Y Z and a timestamp.
We can add another row going back to my documentation and some data to the index.
Copy that back onto your ElasticSearch server ElasticSearch server economically.
Right click to paste.
This time, I'm going to put something different, such as a b, c, d f four or five six.
Name anything I like.
And the current timestamp, which is right.
I think it's excellent.
Successful one.
Very good.
Back into Safana.
Run that query again.
OK, I got two rows, so you can see now that I have an ElasticSearch server running and I'm able to
import data into that and I can read that through the Explore tab.
Now the next videos, rather than putting data into ElasticSearch like that, I'll install two different
services on different computers.
You can have them all over the place.
It's very similar to Loki or Prometheus in this way that will collect data and push data into the ElasticSearch
server.
Okay, so that's the next video.
Also note that you need to manage firewall rules when you use plastic surgeons on the internet because
as you can see, I can easily just create indexes and add data to them.
So I'm going to set up my firewall rules now.
OK.
So if you don't have a firewall like I do in digital version, you can use IP tables or whatever firewall
service your cloud provider gives you.
So you would allow local host Port 9100, you would allow your profoundest server's IP Port nine 200,
for example, and you would drop at nine 200 for everything else.
I'm going to use the digital ocean firewall option, so I'm going to allow microphone a server on the
VPC IP to access my ElasticSearch.
So quite the firewall now.
So firewalls.
Create a firewall ElasticSearch firewall.
I'm going to create a new rule custom nine to hundreds TCP.
Get rid of the defaults, paste, microphone or service IP addressing that.
I'm also going to wall.
I'm here.
Get rid of these on my S-H and use my external IP address that I'm using to create this video.
I guess so.
Only organization to that server and only microphone a server can send messages.
Three point nine.
Two hundred Okay.
So let's apply that to my ElasticSearch.
Server pay Great Firewall.
OK, so only like often a server that's in here can make those requests to nine 200, so query that
we go.
Excellent.
OK, so anyway, next video will install file bait, which is good for reading.
System log was very similar to the Loki pronto service, but for ElasticSearch?
Excellent.