Category Archives: prometheus

用Prometheus细化Nginx监控

国内用Nginx的比较多,Nginx的监控比较老的方案可能是通过跑脚本定期收集nginx的status模块的数据,或者监控nginx的日志;后来阿里的tengine在国内开始流行,于是诞生了很多不错的lua模块;但是这些监控方案在有新的监控需求的时候,可能就需要再修改脚本或者更改nginx... Read More | Share it now!

PromQL Functions

https://prometheus.io/docs/prometheus/latest/querying/functions/ Some functions have default arguments, e.g. year(v=vector(time()) instant-vector). This means that there is one argument v which is an instant vector, which if not provided it will... Read More | Share it now!

PromQL Operators

https://prometheus.io/docs/prometheus/latest/querying/operators/ Binary operators Prometheus’s query language supports basic logical and arithmetic operators. For operations between two instant vectors, the matching behavior can be... Read More | Share it now!

PromQL Basic

https://prometheus.io/docs/prometheus/latest/querying/basics/ Prometheus provides a functional expression language that lets the user select and aggregate time series data in real time. The result of an expression can either be shown as a graph, viewed... Read More | Share it now!

Prometheus 中 alertmanager报警规则详解

这篇文章介绍prometheus和alertmanager的报警和通知规则,prometheus的配置文件名为prometheus.yml,alertmanager的配置文件名为alertmanager.yml 报警:指prometheus将监测到的异常事件发送给alertmanager,而不是指发送邮件通知 通知:指alertmanager发送异常事件的通知(邮件、webhook等) Gmail... Read More | Share it now!

Redis Metrics Exporter

GIT: https://github.com/oliver006/redis_exporter Prometheus exporter for Redis metrics. Supports Redis 2.x, 3.x and 4.x Building, configuring, and running Locally build and run it: $ go get github.com/oliver006/redis_exporter $ cd... Read More | Share it now!

Prometheus configuration

CONFIGURATION Prometheus is configured via command-line flags and a configuration file. While the command-line flags configure immutable system parameters (such as storage locations, amount of data to keep on disk and in memory, etc.), the... Read More | Share it now!

Alertmanager

GIT: https://github.com/prometheus/alertmanager Alertmanager     The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver... Read More | Share it now!

Prometheus python client sample server

Flask:   from flask import Response, Flask, request import prometheus_client from prometheus_client.core import CollectorRegistry from prometheus_client import Summary, Counter, Histogram, Gauge import random, time # Create my app app =... Read More | Share it now!