2. INDEX 1. Prometheus
1. Prometheus Architecture
1. What is Grafana
1. Prometheus - Grafana
1. Features of Grafana-Prometheus
1. What we are using
1. Dashboard
1. Reference Links
3. Prometheus
● Prometheus is a free software application used for event
monitoring and alerting.
● It records real-time metrics in a time series database built
using a HTTP pull model, with flexible queries and real-time
alerting.
4. Prometheus Architecture:
The Prometheus Server:
● This is the brain of the system. It collects metrics in the
form of time series data from nodes and stores them.
The process of collecting metrics is referred to as
scraping.
● Prometheus metrics are stored in the time series
format, which is basically a sequence of data points
taken at successive equally spaced points in time
(usually in milliseconds).
Continue...
5. ● The Prometheus server actively pulls (scrapes) metrics from
applications it monitors at intervals (scrape interval) as opposed
to other tools like Graphite which passively wait for the
applications to push their metrics. This model relieves clients of
most of the workload, since the Prometheus server does all the
heavy lifting. All they have to do is expose their metrics in a way
that the Prometheus server can access. They do this by exposing
an HTTP endpoint, usually /metrics, which returns the full list of
metrics (with accompanying label sets) and their values.
Continue...
Prometheus Architecture:
6. Client Libraries and Exporters:
● The metrics exposed by clients have to be in this format for
Prometheus to scrape. However, time series formatted metrics do
not typically spring forth from applications; usually,
instrumentation that produces these types of metrics would have to
be manually added.
● Client libraries: where you control the source code, with very few
lines of code, you can define and add your desired metrics using
Prometheus’ client libraries in a process called direct
instrumentation.
Continue...
Prometheus Architecture:
7. Exporters:
● Where we have no control over the source code, direct
instrumentation is not an option.
● Exporters are pieces of software that we can deploy
alongside applications whose metrics you’re interested
Continue...
Prometheus Architecture:
8. Push Gateway:
The Prometheus Push Gateway exists solely to allow short lived
jobs to expose their metrics to Prometheus. Since these kinds of
jobs may not exist long enough for Prometheus to scrape them,
they can instead push their metrics to a Push Gateway, which acts
as kind of a metric cache, holding them long enough so they can
be scraped by Prometheus
Continue...
Prometheus Architecture:
9. Alertmanager:
The Prometheus Alertmanager allows you to define your own
alerts on the collected metrics, so that you can be notified in
case of any abnormalities or discrepancies in the data collected.
Continue...
Prometheus Architecture:
10. Visualization:
● The metrics collected by Prometheus are stored locally in a time
series database. With the help of the Prometheus Query Language
(PromQL), a user can select and aggregate existing time series data
in real time.
● The result of this can either be shown as graphs or tabular data in
the Prometheus Expression Browser or be used to feed an external
visualization integration via the use of an HTTP API. The external
integration of choice for Prometheus visualization would be
GRAFANA.
What is Grafana
11. What is Grafana
● Grafana is an open-source platform for data visualization, monitoring
and analysis.
● Grafana is solution for running data analytics, pulling up metrics that
make sense of the massive amount of data & to monitor our apps with
the help of cool customizable dashboards.
● The tool helps us to study, analyse & monitor data over a period of
time.
Continue...
12. ● Grafana connects with every possible data source, commonly
referred to as databases such as Graphite, Prometheus,
Influxdb, ElasticSearch, MySQL, PostgreSQL etc.
● It provides us with tools to turn your time-series database
(TSDB) data into beautiful graphs and visualizations.
What is Grafana
13. Prometheus - Grafana
● Prometheus is an open source data monitoring tool. The combination of
Prometheus & Grafana is the tools of combination in the industry for
deploying a data visualization setup.
● Grafana dashboard is used for visualizing the data whereas the backend
is powered by Prometheus.
● Though Prometheus too has data visualization features & stuff. But still,
Grafana is preferred for visualizing data. Queries are fired from the
dashboard & the data is fetched from Prometheus.
14. Features of grafana-Prometheus
● Grafana shows information about instances were down or a
critical issue caused the system to crash, all of these
scenarios were tracked on the Grafana dashboard which
made our lives a lot easier.
● The data was pulled from Prometheus which was plugged-in
to the Grafana dashboard as a data source. Queries were
fired from the dashboard with different expressions such as
min, avg etc.
Continue..
15. ● The tool is used to monitor the stuff happening in the production
environment.
● We can plan out the future operations using past data, which we
could track on the dashboard by filtering down by time range.
● The grafana dashboard is pretty equipped, & continually evolving,
to make sense of complex data from displaying graphs to
heatmaps, histograms, Geo maps.
Features of grafana-Prometheus
16. What we’re Using
● Installed and configure Prometheus in server of which we
want to see metrics
● Added servers Prometheus Metrics HTTP endpoint in grafana
data source.
● Created Dashboard as per requirement.
17. Dashboard
● Prepared monitoring dashboard which include below
monitoring details
● Server status details/docker container details/probe and SSL
related details
Continue...
18. Up time Virtual CPU Available
RAM
Available
Memory
CPU usage
Load
Average
Memory
Details
Memory
Distribution
Disk Usage Disk I/O
Total
running
container
Total
memory
usage
Total CPU
usage
Container
specific
memory &
CPU usage
HTTP status
code
SSL expiry HTTP probe
duration
ICMP Probe
duration
Dashboard
19. Thank You!!
We hope you find this info. helpful. Here are few reference links:
-- ttps://prometheus.io/docs/introduction/overview/
-- https://prometheus.io/docs/visualization/grafana/
20. Reach us at
Email: contact@addwebsolution.com | hi@addwebsolution.com
Phone: +1-302-261-5724| +44-020-8144-0266 | +91 903 317 7471
Life at AddWeb: https://www.youtube.com/watch?v=8AGFAefuQE4
We are Social:
Team Culture | LinkedIn | Happy Clients | Twitter