Wednesday, April 21, 2021

What is Ram Navami

 What is Ram Navami?

It is a sprint Hindu festival that celebrates the birthday of Hindu God Lord Rama.

Ram was born to King Dasharath and Queen Kaushalya in Ayodhya in the Tretha Yug.

Ram is considered the the seventh incarnation of Vishnu.

It is celebrated as ninth day of Chaitra Navratri.

Tuesday, April 20, 2021

How to create a HTTP server, listener and response with NodeJS at runtime?

Pre-requisute: Install nodejs, visual studio code and the http modul

Descrption: The use of createServer from http module - will help create an object that servers as a webserver running on localhost:8080

const {createServer} =require('http');
cons server=createServer((request,response))=>{
    response.writeHead(200,{'Content-Type':'application/json'});
    response.write(JSON.stringify({a:1,b:2,c:3}));
    return response.end();
});

server.listen(8080);

What does this mean?

This means, you can technically launch a webserver on the fly and create a response work temporarily and shut it down. 

I am assuming its a good strategy to not have a webserver always running, but that question is for another day.

Cheers

Credits : https://www.youtube.com/watch?v=TrofE5tDRag

How to copy filepath from Finder and open it in Terminal on MacOS

 Open Finder

If you do not see the Path listed above status bar, do the following.

Select the following Menu Option
View -> Show Path Bar

Now click on any file in the finder window.

You should be able to see the path of the file below

Macintosh > Library > WebServer > Documents > index.html

The format we are looking for is /Library/WebServer/Documents/index.html

Right click on index.html file you should see an option Copy "index.html" as Pathname

Paste it into a Terminal and you should be the path of the format.
/Library/WebServer/Documents/index.html

To open the folder in the Termainal, right click on any folder (blue icons), example Documents in this case or Library. Use "New Terminal Tab at Folder" or "New Terminal at Folder". A new terminal would open with the path set by default.

use pwd to verify the path.

What is prometheus?

Prometheus is a software for mentoring and alerting. The idea it to time 

Similar tools:

Borgman remains internal to Google. Treating time-series data as a data source

Monday, April 19, 2021

What is graphana? what does it do?

Graphana is an open source web application.

It supports Prometheus database and ships it inbuilt.

What purpose does it serve?

It allows you to build Charts, Graphs and Dashboards that you want to Visualize

What is the architecture of Graphana?

-> Data producer (Jenkins, Kubernetes, Virutal Machine) - Aggregate data - Temperate, weather
-> Data Source (Prometheus or any other database) - Pull data (sensor data) or Data Producer pushes data
-> Graphana queries the data source and provides a Dashboard

What are the Categories of data that Graphana visualizes over?

Metrics - CPU Load, Memory Usage
Logs - errors [TimeSliced]

What does the Dashboard show?

It shows CPU/Memory along with TimeSeries Graph that you can Zoom in and factor data for the controlled set of data.

Similar Tools:

Kibana