In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
What is prometheus?
Prometheus is an open source monitoring and alarm solution by SoundCloud, which began to write code in 2012 and has attracted 9k + attention and the use of many large companies since it was open source on github in 2015. in 2016, Prometheus became the second CNCF (Cloud Native Computing Foundation) member after K8s.
Main functions:
Multidimensional data model (the timing consists of the metric name and the labels of KBV).
Flexible query statement (PromQL).
No dependent storage, supporting different models of local and remote.
Using http protocol, using pull mode, pull data, easy to understand.
Monitoring targets can be achieved by service discovery or static configuration.
Support a variety of statistical data models, graphical friendly.
Core composition:
Prometheus Server, mainly used to grab data and store time series data, but also provides query and Alert Rule configuration management.
Client libraries, used to interface with Prometheus Server, can query and report data.
Push gateway, used for batch, short-term monitoring data summary node, mainly used for business data reporting, etc.
Exporters, agent deployed on the client, such as node_exporter reporting machine data, MongoDB exporter reporting MongoDB information, and so on.
Alertmanager is used for alarm notification management.
Infrastructure diagram:
From this architecture diagram, you can also see that the main modules of Prometheus include Server, Exporters, Pushgateway, PromQL, Alertmanager, WebUI, and so on.
It uses logic roughly like this:
Prometheus server periodically pulls data from statically configured targets or service-discovered targets.
When the newly pulled data is larger than the configured memory cache, Prometheus persists the data to disk (if you use remote storage to persist it to the cloud).
Prometheus can configure rules, and then query the data regularly, and when the condition is triggered, the alert will be pushed to the configured Alertmanager.
When Alertmanager receives a warning, it can be configured, aggregated, de-duplicated, reduced noise, and finally sent a warning.
You can query and aggregate data using API, Prometheus Console, or Grafana.
The above content is reproduced: https://songjiayang.gitbooks.io/prometheus/content/introduction/what.html
Installation: prometheus
(1) download the installation package https://prometheus.io/download/ to the specified directory such as / Download
Shell > gwet https://github.com/prometheus/prometheus/releases/download/v2.13.1/prometheus-2.13.1.darwin-amd64.tar.gz
(2) decompress prometheus
Shell > tar-xvzf ~ / Download/prometheus-2.13.1.linux-amd64.tar.gz
Shell > mv prometheus-2.13.1.linux-amd64 prometheus
Shell > cd prometheus
Shell > ls prometheus
Prometheus startup file
Prometheus.yml profile
Data storage file
(3) check the prometheus version
Shell >. / prometheus version
Prometheus, version 2.13.0 (branch: HEAD, revision: 6ea4252299f542669aca11860abc2192bdc7bede) build user: root@f30bdad2c3fd build date: 20191004-11:25:34 go version: go1.13.1
(4) start prometheus server
Shell >. / prometheus # normal startup will output a lot of information
Level=info ts=2019-10-17T09:29:45.851Z caller=main.go:332 msg= "Starting Prometheus" version= (version=2.13.0, branch=HEAD, revision=6ea4252299f542669aca11860abc2192bdc7bede) "
(5) View port listening and listen port 9090
Shell > netstat-tunlp | grep prometheus
Tcp6 0 0: 9090: * LISTEN 31879/./prometheus
(6) access http://IP:9090 through web
(7) start as a service
Shell > vim / etc/systemd/system/prometheus.service
[Unit] Description=Prometheus Monitoring SystemDocumentation=Prometheus Monitoring system [service] ExecStart=/Download/prometheus/prometheus\-- config.file / Download/prometheus/prometheus.yml\-- web.listen-address=:9090 [Install] WantedBy=multi-user.target
Shell > systemctl daemon-reload
Shell > systemctl enable prometheus
Shell > systemctl start prometheus
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.