- Consulting
- Training
- Partners
- About Us
x
Prometheus is an open-source tool for monitoring and alerting. It is a data model & query language which can help the user to analyze the application and monitor the performance of the infrastructure. Over a decade, many companies and organizations have adopted Prometheus for its lightweight feature.
It is used for recording numeric time series and for monitoring dynamic service-oriented architecture. It collects the data in the form of time series, which is built through a pull model.
For starters, understanding Prometheus can be tricky. In this article, you will gather an overview about Prometheus, the architecture, the highlighted features, how to install it on ubuntu server and other references to get deeper knowledge on related topics.
Prometheus stores the metrics sent by multiple exporters into chunks of data and it stores for 90 days, which means the data older than 90 days is not available is Prometheus (this limit can be changed).
Every exporter has a set of queries that fetches information about a specific set of metrics, all the raw metrics fetched by the exporter, which can be used for alerting or visualization purposes.
The data metrics are being collected by different types of exporters that have different use cases. The list of exporters currently in use are:
Prometheus does not support the intended dashboard to view the metrics. It is used only for fetching specific queries and data for the log. Therefore, the metrics collected from different types of the exporter are stored into Prometheus.
Installing Prometheus on ubuntu server:
Note: Open port 9090 in the security group along with SSH and HTTP port.
1 |
sudo yum update -y |
1 2 3 4 5 |
sudo useradd --no-create-home --shell /bin/false prometheus sudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /etc/prometheus sudo chown prometheus:prometheus /var/lib/prometheus |
1 2 3 4 |
curl -LO https://github.com/prometheus/prometheus/releases/download/v2.17.1/prometheus-2.17.1.linux-amd64.tar.gz tar -xvf prometheus-2.17.1.linux-amd64.tar.gz mv prometheus-2.17.1.linux-amd64 prometheus-files |
1 2 3 4 |
sudo cp prometheus-files/prometheus /usr/local/bin/ sudo cp prometheus-files/promtool /usr/local/bin/ sudo chown prometheus:prometheus /usr/local/bin/prometheus sudo chown prometheus:prometheus /usr/local/bin/promtool |
1 2 3 4 |
sudo cp -r prometheus-files/consoles /etc/prometheus sudo cp -r prometheus-files/console_libraries /etc/prometheus sudo chown -R prometheus:prometheus /etc/prometheus/consoles sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries |
1 |
sudo vi /etc/prometheus/prometheus.yml |
1 2 3 4 5 6 7 8 |
global: scrape_interval: 10s scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:9090'] |
1 |
sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \ --config.file /etc/prometheus/prometheus.yml \ --storage.tsdb.path /var/lib/prometheus/ \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/console_libraries [Install] WantedBy=multi-user.target |
1 2 |
sudo systemctl daemon-reload sudo systemctl start prometheus |
1 |
sudo systemctl status prometheus |
1 |
http://<prometheus-ip>:9090/graph |
As always, if you have any more queries or feedback, feel free to drop a comment and we will get back to you right away.
If you want to learn more about Prometheus go to our website and check more courses on DevOps.
We have just touched the tip of the iceberg and there is a lot more about Prometheus. Would you like to know more on Prometheus? Visit our blogsite
https://blog.cloudthat.com/integration-and-visualization-of-prometheus-metrics-in-grafana/
That is all folks!
Voiced by Amazon Polly |
Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!
Anusha Shanbhag
Oct 15, 2020
May I know which feature of Azure Prometheus represents; for a somebody with the fundamental knowledge to understand this better?
Rimmi
Oct 14, 2020
This blog was very resourceful. A lot of my doubts got cleared
Sindhu Priya M
Oct 14, 2020
Thank you
Click to Comment