How to Install Analytics Applications
How to Install Elasticsearch for Analytics
Note: Do not confuse this Elasticsearch instance with your Elasticsearch search index (backend), if you are using an Elasticsearch search index.
Tip: The Elasticsearch instance described in this topic is required by the SmartHub application and can be either the same or a separate instance of Elasticsearch.
This is the search engine where all the recorded user activity is stored.
- Documentation: To see the Elastic documentation, go to Elasticsearch Documentation.
To run the installation operation:
- Go to Elasticsearch Downloads page and download the .msi package of Elasticsearch.
- Follow the steps from the installation Elasticsearch page to install Elasticsearch as a Windows service.
- Set the following properties in the YML file
\config\elasticsearch.yml
:- network.host: 0.0.0.0
Set the value to one of the following:- An IP address attached to an individual network device such as NIC.
- This IP address must resolve to your elastic server (or a DNS which does).
- Once set, you can only access Elastic through this network interface device.
- 127.0.0.1 to make elastic accessible from this server only by using "localhost"
- 0.0.0.0 to make elastic accessible from any address/IP.
- http.port: 9200: Leave this set at the default value of 9200
- discovery.type: single-node: Set this property if you are using a single server for your elastic instance.
- network.host: 0.0.0.0
- Go to Windows services and start the Elastic service, which is running as a Local System service.
-
Verify the Elastic node status by going to http://localhost:9200.
Note: You must have an instance of Elasticsearch up and running.
Make sure that JSON is loaded.
See the following graphic as an example only.Note: Keep the Elastic window open while you install Kibana.
How to Install Kibana for Analytics
Note:
-
BA Insight clients often run Kibana as a Linux service or from a Linux machine.
-
If you do not have Kibana installed or running and want to do so on a Windows machine, use the topics and steps below:
How to Install Kibana as a Windows Service
- Kibana v7.10-8.x is the data visualization engine for Elasticsearch.
- SmartHub Analytics uses reports that are built on top of Elastic Kibana.
Use the Elastic prerequisites to install Elastic Kibana either on the same server where the SmartHub Analytics reporting site is installed, or a different server. For more information, see the Kibana page.
To install Kibana as a Windows service, follow these steps:
-
Download and unzip Kibana
-
Go to NSSM Download page, download and unzip the file.
-
Use the command prompt with administrator permissions to navigate to the folder which contains nssm.exe:
cd path_to_nssm/nssm-2.24/win64
orpath_to_nssm/nssm-2.24/win32
-
Run the install Kibana command for your version of Kibana (v7.10.2 is used below):
nssm install kibana-7.10.2
In the "NSSM service installer" window:
-
Application tab: Set kibana.bat as Application Path
-
Details tab: Enter display name, description, startup type
- Dependencies tab: Enter Elasticsearch service name.
- This name is found under the Windows Elastic service properties. For example, elastic-service-x64.
- Click the Install Service.
-
- You receive a service "installed successfully!" message.
- Update the port, host information, and the Elastic node URL in the kibana.yml file found at <path_to_kibana>\config\kibana.yml. For more information see Configuring Kibana.
- server.port:
5601
- server.host:
"localhost" or "0.0.0.0"
- elasticsearch.hosts:
Set the URL of your Elasticsearch instance between square brackets.
For example, [
http://localhost:9200"]
- kibana.index:
".kibana"
Note: If your SmartHub is configured to use HTTPS, Kibana must also be set to use HTTPS.
To do this, follow the steps in How to Set Kibana to HTTPS.
- server.port:
- Go to the Windows services application and start the Kibana service.
The starting process for the Kibana service does not finish immediately. As a result, the startup may take a minute to complete and you should wait before testing.
- Verify Kibana by going to http://localhost:5601/
- If you already have Elasticsearch and Elastic Kibana running, or if you have installed either of these applications, you can continue to use these Elasticsearch applications.
This is possible because SmartHub Analytics creates a new Elasticsearch index.
- If you already have Elasticsearch and Elastic Kibana running, or if you have installed either of these applications, you can continue to use these Elasticsearch applications.
How to Set Kibana to HTTPS
To encrypt traffic between the browser and Kibana, follow these steps:
-
Obtain a server certificate and private key for Kibana:
Note: If you already have an SSL certificate and its private key, skip this step.
Generate a certificate and private key using the elasticsearch-certutil tool:
- Open a command prompt as administrator.
- Navigate to the bin folder of Elasticsearch.
- Run the following command:
elasticsearch-certutil cert --name <name_of_certificate> --pem
- When asked "Please enter the desired output file [certificate-bundle.zip]" provide a name for your certificate .zip file, for example:
kibanaCertificate.zip
- Extract the files from the newly created .zip file.
- Copy the <name_of_certificate> folder to your Kibana config folder.
- Update the SSL enable setting, server certificate, private key and host information in the kibana.yml file found at <path_to_kibana>\config\kibana.yml:
- server.ssl.enabled: true
- server.ssl.certificate: "/path/to/kibana-server.crt"
- server.ssl.key: "/path/to/kibana-server.key"
- server.host: (optional) enter a host name that matches the host name (host names) associated with the SSL certificate.
NOTE: When configuring windows paths in Kibana's configuration file, you must use a double-backslash.
Example: server.ssl.certificate: C:\\Elastic\\Certificates\\server.crt
- Restart the Kibana service.
- Access SmartHub Administration page at https://<hostname>:<port>/_admin.
- Go to the Additional Settings Configuration page and replace the Kibana Server Address with the new address shown in the screenshot below:
- For more information see Encrypting communications in Kibana.
- For more information see Encrypting communications in Kibana.