Simple steps to install Prometheus & configuring it in 32/64 bit Ubuntu OS. Start with downloading & installing Prometheus and Node-Exporter, executing queries and check its running Metrics on the local server. Then install & configuring Grafana Service to monitor data collected every second by adding data sources & rows(for Graphs) to the Grafana Dashboard.
Handwritten Text Recognition for manuscripts and early printed texts
Prometheus Installation & Configuration in Ubuntu
1. PROMETHEUS INSTALLATION & CONFIGURATION...
[ 8 SIMPLE STEPS ]
1. Open Terminal as root user --
Just type sudo su and then Enter password as shown below.
Then, Go to main directory(optional).
2. Use sudo apt-get update command to check if ubuntu is up-to-date or not
3. Go to root dir using cd root (optional) as shown below.
{Sometime this shows ‘no file or directory’ : No issue continue to next command }.
Now,
Download Prometheus tar.gz file based on your system confg. [32/64 bit]
from https://prometheus.io/download/
=> I recommend to use either of two commands for downloading i.e.;
i. wget “Url/File_Link_Location”.
ii. curl -LO “Url/File_Link_Location”
[If curl not installed then use sudo apt install curl]
Then,
To check whether prometheus tar.gz file downloaded successfully use ls command
2. 4. Download Node_Exporter tar.gz file based on your system confg. [32/64 bit]
from https://prometheus.io/download/ same as above.
Then,
To check whether node_exporter tar.gz file downloaded successfully use ls command.
5. Extract node_exporter tar.gz file using --
tar xvfz file_name..
Then,
To verify file is extracted successfully again use ls – you can see that in list.
Similarly,
Extract prometheus from tar.fz file using same command.
Again you can see that in list.
3. 6. Now, change your pwd to node_exporter to run it as shown.
Then, Start your node_exporter using ./node_exporter command
For checking whether node_exporter works properly or not --
Go to your browser & check it on http://localhost:9100 port.
Here, you can check that it show large no. of metrics.
4. 7. Starting prometheus server --
Open new terminal as root in similar way.
Again, change you pwd to prometheus using cd as shown below.
Then,
Check whether prometheus has all needed dir and files using ls.
Now, [ Very Imp]
Open prometheus.yml file using cat or vi or nano command and make some update in
the existing code.
Go to last line of code and add one more target ‘localhost:9100’ as shown below
Rem.. ->
i. If you use cat command then you have to copy code from --
https://prometheus.io/docs/introduction/getting_started/ and update
prometheus.yml file at same time.
ii. If you use vi then you need to update target only. [Check if vi package installed
Reason – cat > prometheus.yml delete existing data/code & make new file. And
vi prometheus.yml open existing file for editing – But here before inserting
or editing press [i key] and for saving file - press esc then :wq then press enter.
5. Now, Everythig is configured
Therefore, To start prometheus use ./prometheus.
Next, Prometheus started and it shows a status page about itself at
http://localhost:9090
6. 8. Starting Grafana Service : Dashboard
Represents and monitor data collected every sec --
So, To install and start services of grafana follow command in new root terminal
Now, You can use grafan services at http://localhost:3000
7. Here, You can signup & create your passwd for grafana.
After log In you can create your dashboard and can execute queries after
creating org. in Main Org.Then, You can add Data sources.Then, create
dashboard -> Add Row -> Select Graph/Table.