question archive Your assignment for this week is to add HTTP logging to a NodeJS application (the one you created in my demo video)

Your assignment for this week is to add HTTP logging to a NodeJS application (the one you created in my demo video)

Subject:Computer SciencePrice: Bought3

Your assignment for this week is to add HTTP logging to a NodeJS application (the one you created in my demo video).  You will feed that logging to your ELK stack.

You are to build 1 visualization of the data using any logging parameters.   For example, you might have a pie chart or you might have a line graph.   You will put the visualization on a dashboard.  

Steps:1.  Install the ELK server in your AWS environment.

  • Search for "ami-01172c9bc29e6c3a0" - Bitnami v6 of ELK in the AWS Marketplace when you create a new EC2 instance.
  • Select a t3a.medium for your instance type
  • Follow the steps to obtain the password for your new ELK server (Bitnami Steps (Links to an external site.))
  • Configure the security group attached to the ELK server to allow ports 9200 and 9300

2.  Configure your NodeJS application to send HTTP logs (Helpful Link: winston-elasticsearch (Links to an external site.))

  • Install winston-elasticsearch on your web application server that we built in our demo, use this command to install an older version
    • npm i --save winston-elasticsearch@0.7.12
  • In your winston.js file, you will need to complete the following steps:
    • Declare the following variable Elasticsearch = require('winston-elasticsearch')
    • Add the following code right before var logger = winston.createLogger....
      • var esTransportOpts = {level: 'debug',clientOpts: {host: [{host: '',protocol: 'http',port: ‘9200’}]}};
  •  
    • Add the following transport line to the var logger transports: [ section
      • new Elasticsearch(esTransportOpts)

3.  Visit your "Hello World" website and refresh the page multiple times (you will want to visit it a LOT of times, even better if you can do it over multiple days).  Visit your ELK server to see if there are any new logs available to import into the Kibana dashboard.4.  You will turn in the IP address to your application and the SSH key that allows the instructor to connect for grading your code.  You will also provide the IP address for your ELK server so the instructor can view your dashboard visualizations.

**********************************************************************************************

I did everything but kibana dashboard is not working. [Your ELK dashboard is accessed via HTTP/HTTPS, so you will need to add these ports to the security group attached to your ELK EC2 instance. Also, make sure you allow 0.0.0.0/0 access to these two ports.]

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions