I am trying to setup ElasticSearch APM, my OS is Ubuntu 16.04,
I installed ElasticSearch and Kibana on the system,
I am referring the following site for installation steps -
https://jee-appy.blogspot.com/2018/02/setup-kibana-elastisearch.html
The installation commands for ElasticSearch and Kibana are as follows-
# Install Elasticsearch-6
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.1.tar.gz
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
ls /etc/init.d/elasticsearch
sudo service elasticsearch status
Change bind address and JVM heap option as per requirement
Change network.host to 0.0.0.0 in elasticsearch.yml and set -Xms 4g & -Xmx 4g in jvm.options
sudo vi /etc/elasticsearch/elasticsearch.yml
sudo vi /etc/elasticsearch/jvm.options
Setting read replicas to 0 if you are creating single node cluster
curl -XPUT H 'Content-Type: application/json' 'http://localhost:9200/_all/_settings?preserve_existing=false' -d '{"index.number_of_replicas" : "0"}'
Install Kibana
sudo apt-get update && sudo apt-get install kibana
sudo service kibana restart
Install nginx
sudo apt-get -y install nginx
Add nginx config file for kibana
sudo vi /etc/nginx/conf.d/kibana.conf
Replace mykibana.com with your server_name or IP. We will setup auth in next step, hence we have placed a line for auth_basic in kibana.conf
server {
listen 80;
server_name mykibana.com;
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Setup auth
After installing apache2-utils when you run htpasswd, it will ask for a password, provide a password. This username and password would be useful when you try to access kibana from browser.
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/htpasswd.users efkadmin
sudo service nginx restart
Web view of Kibana
After successful Setup, hit http://localhost:5601.
Put username and password and you will see kibana web as shown below.
APM setup
After installing ElasticSearch and Kibana,
I am trying to install APM server into it.
I used the following commands to install it -
curl -L -O https://artifacts.elastic.co/downloads/apm-server/apm-server-6.3.1-amd64.deb
sudo dpkg -i apm-server-6.3.1-amd64.deb
Import dashboard -
./apm-server setup
On firing the above command I get the following error -
bash: ./apm-server: No such file or directory
Please help to setup APM