Time series database: data points continuously generated over time
Based on httpcall, periodically obtain indicator data from the network endpoint specified in the configuration file, that is, pull data
There are three types of ways to pull data:
exporters: traditional indicator data, formatted in a Prometheus compatible format, and respond to Prometheus
Instrumentation: measurement system, the indicator data built into the application program, just respond directly
Pushgateway: Short-term tasks and batch tasks may have uncertain start/end times. Push methods are generally used to provide indicators. (Prometheus itself does not support the push mechanism, so the pushgateway mechanism allows short-term tasks to send data to pgw, and then wait for pgw to save After saving, you can accept Prometheus to collect data in the form of pull)
Ecological components:
prometheus server: collection: scraping storage: tsdb
alertmanager: alert
exporter: output compatible indicator format
dashboards: grafana
PromQL indicator types: counter (counter counter, monotonically increasing), dashboard (gauge dashboard, which can be increased or decreased), histogram (histogram cumulative histogram, evaluation of the number of samples and the sum of sample values), summary (summary, similar Calculate and report the quantile directly based on the histogram but not very precise)
job: multiple similar targets multiple hosts, multiple mysql, multiple MongoDB
instance: each network endpoint endpoint, an instance
Even if the vector: expression, = != =~ !~ metric_name{lable="value",...} Example: http_requests_total{env="",method="get"} The tag is zero or the value is zero, not at the same time Zero
Range vector: Offset modifier: http_requests_total offset 5m 5 minutes ago http_requests_total[5m] offset 1d within 5 minutes of 1 day's money
Consul: Provides functions such as service registration/discovery, health check, key/value storage, multiple data centers, and distributed consistency guarantee
ignoring blacklist
on whitelist