You need to log in to create posts and topics.

Installing APM for Node.js with Windows

Application Performance Monitoring(APM) collects in-depth performance metrics and errors from inside your application. It allows you to monitor the performance of thousands of applications in real time.

 

1. Download the APM 6.5.4 Server for Windows.

https://artifacts.elastic.co/downloads/apm-server/apm-server-6.5.4-windows-x86_64.zip

 

2. Extract the contents of the zip file into  C:\Program Files.

 

3. Rename the apm-server-6.5.4-windows directory in C:\Program Files to APM-Server.

 

4. Open a PowerShell prompt as Administrator.

Tip: Right-click on the Powershell icon and select Run as Administrator.

 

5. Set the execution policy to be able to run the execution script. Cd into APM-Server and run the following:

PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-apm-server.ps1

 

6. Configure the apm-Server.yml with the correct Vizion.ai credentials.

Tip: The easiest way to do this is to open up the file in a code editor such as Visual Studio Code. 

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
# Scheme and port can be left out and will be set to the default (http and 9200)
# In case you specify and additional path, the scheme is required: http://localhost:9200/path
# IPv6 addresses should always be defined as: https://%5B2001:db8::1]:9200
hosts: ["<Elasticsearch API Endpoint>"]
username: "<username>"
password:"<password>"
7. Test the apm-Server.yml configuration in PowerShell.
.\apm-server.exe -e -configtest
Tip: The APM-Server configuration should display in the terminal without and ERROR messages if everything is entered correctly.
8. Run the program in the foreground to make sure everything is set up. 
9. Start the APM Server.
The server processes and stores application performance metrics in Elasticsearch.

start-service apm-server

10. Install the APM agent.
Install the APM agent for Node.js as a dependency in your application.

npm install elastic-apm-node --save