... | ... | @@ -6,10 +6,13 @@ ElasticMon was developed and tested with Ubuntu server edition x86_64 GNU/Linux |
|
|
|
|
|
**Note to readers:** _Please, read ElasticMon's **[terms of use](http://mosaic-5g.io/resources/terms.pdf)** first before you continue with this tutorial._
|
|
|
|
|
|
# Install and Configure
|
|
|
|
|
|
# Download and Install
|
|
|
There are 2 approaches to install and configure ElasticMon and you can choose either one. First approach is manual, one by one installing the package. The second approach is using the existed ElasticMon installation script and faster. We explain both ways.
|
|
|
|
|
|
## ElasticSearch Server
|
|
|
## 1) Manual Steps
|
|
|
|
|
|
### ElasticSearch Server
|
|
|
|
|
|
Visit [ElasticSearch Download page](https://www.elastic.co/downloads/elasticsearch) and download the server for your platform. For portable setup, follow the commands below by replacing the version of 6.x.x to any 6+ desired version.(i.e 6.3.1, 6.5.1 tested)
|
|
|
```bash
|
... | ... | @@ -17,7 +20,7 @@ curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6. |
|
|
tar -xvf elasticsearch-6.x.x.tar.gz
|
|
|
rm elasticsearch-6.x.x.tar.gz
|
|
|
```
|
|
|
### Configurations
|
|
|
#### Configurations
|
|
|
Update the file located at `elasticsearch-6.x.x/config/elasticsearch.yml` with your clustering and endpoint configurations.
|
|
|
_(Default configurations run elasticsearch on localhost, port 9200 for HTTP interface and 9300 for node connections)_
|
|
|
|
... | ... | @@ -30,15 +33,15 @@ Update the file located at `elasticsearch-6.x.x/config/jvm.options` for configur |
|
|
|
|
|
For more information about configurations visit [ElasticSearch Configurations](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html)
|
|
|
|
|
|
### Run
|
|
|
#### Run
|
|
|
Run the executable to start the server. Observe the terminal log to detect the binded endpoints(i.e `publish_address {193.xx.xx.xx:PORT}`)
|
|
|
```bash
|
|
|
elasticsearch-6.x.x/bin/elasticsearch
|
|
|
```
|
|
|
|
|
|
## Visualisation Tools
|
|
|
### Visualisation Tools
|
|
|
Visualisation tools are useful to analyse and plot metrics of recorded data.
|
|
|
### Kibana
|
|
|
#### Kibana
|
|
|
|
|
|
Visit [Kibana Download page](https://www.elastic.co/downloads/kibana) and download it. For portable setup, follow the commands below by replacing the version of 6.x.x to any 6+ desired version.(i.e 6.3.1, 6.5.1 tested)
|
|
|
|
... | ... | @@ -48,7 +51,7 @@ shasum -a 512 kibana-6.x.x-linux-x86_64.tar.gz |
|
|
tar -xzf kibana-6.x.x-linux-x86_64.tar.gz
|
|
|
rm kibana-6.x.x-linux-x86_64.tar.gz
|
|
|
```
|
|
|
### Configurations
|
|
|
#### Configurations
|
|
|
Update the file located at `kibana-6.x.x/config/kibana.yml` with your own configurations.
|
|
|
_(Default configurations run kibana on localhost, port 5601 and expect ElasticSearch to be on localhost:9200)_
|
|
|
|
... | ... | @@ -63,13 +66,13 @@ elasticsearch.username: "user" |
|
|
elasticsearch.password: "pass"
|
|
|
```
|
|
|
|
|
|
### Run
|
|
|
#### Run
|
|
|
Run the executable to start the tool:
|
|
|
```bash
|
|
|
kibana-6.x.x/bin/kibana
|
|
|
```
|
|
|
|
|
|
### Grafana
|
|
|
#### Grafana
|
|
|
Visit [Grafana Download page](https://grafana.com/grafana/download) and download it.
|
|
|
_NOTE: ElaticSearch support on Grafana only exist on versions starting from v5.2+_
|
|
|
|
... | ... | @@ -78,7 +81,7 @@ wget https://dl.grafana.com/oss/release/grafana-5.4.3.linux-amd64.tar.gz |
|
|
tar -zxvf grafana-5.4.3.linux-amd64.tar.gz
|
|
|
```
|
|
|
|
|
|
### Run
|
|
|
#### Run
|
|
|
Run the executable to start the tool:
|
|
|
|
|
|
By default grafana will bind to localhost, port 8080. Visit [Grafana Configurations](http://docs.grafana.org/installation/configuration/) to edit configurations.
|
... | ... | @@ -89,6 +92,39 @@ grafana-5.x.x/bin/grafana-server |
|
|
Add your ElasticSearch as a DataFrame and click test to confirm.
|
|
|
|
|
|
|
|
|
## 2) Installing and Configuring ElasticSearch and Kibana using ElasticMon Installation Script
|
|
|
1. Git clone to elasticmon repository and switch to branch `develop`
|
|
|
2. Go inside `ElasticSearchScript` folder and run `setup_script.sh`. The script will download and install both ElasticSearch and Kibana with version 6.3.1.
|
|
|
|
|
|
**Notes:** _You can skip step 3, 4, and 5 for the first time, and straight to step 5. If you encounter error, you can revisit these steps._
|
|
|
|
|
|
3. (Optional) Increase the virtual memory limit
|
|
|
```
|
|
|
sudo sysctl -w vm.max_map_count=262144
|
|
|
```
|
|
|
4. (Optional) Increase the java heap by updating the configuration inside `elasticsearchsearch-6.3.1/config/jvm.options` and set it like below
|
|
|
```
|
|
|
-Xms512m
|
|
|
-Xmx512m
|
|
|
```
|
|
|
5. (Optional) Update the max descriptor file inside `/etc/security/limits.conf`
|
|
|
```
|
|
|
elasticsearch soft nofile 65536
|
|
|
elasticsearch hard nofile 65536
|
|
|
elasticsearch memlock unlimited
|
|
|
```
|
|
|
6. Update elasticsearch yaml file inside `elasticsearch-6.3.1/config/elasticsearch.yml`
|
|
|
```
|
|
|
network.host: 0.0.0.0 # to make it accessible from outside
|
|
|
http.port: 9200 # default port of elasticsearch
|
|
|
```
|
|
|
7. Edit `/kibana-6.3.1-linux-x86_64/config/kibana.yml`
|
|
|
```
|
|
|
server.port: 5601 # default port of kibana
|
|
|
elasticsearch.url: "http://<publicurl>:9200" # change into elasticsearch url public address
|
|
|
```
|
|
|
8. Run both ElasticSearch and Kibana services with the script `launch_script.sh`
|
|
|
|
|
|
# Use Case examples
|
|
|
|
|
|
There are more than one way to interract with an ElasticSearch server. Visit [ElasticSearch Clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html) or [ElasticSearch Community Contributed Clients](https://www.elastic.co/guide/en/elasticsearch/client/community/current/index.html) to see the list of clients they support.
|
... | ... | |