prometheus FAQ 要点整理
The main Prometheus server runs standalone and has no external dependencies.
Most Prometheus components are written in Go
Why do you pull rather than push?
Pulling over HTTP offers a number of advantages:
You can run your monitoring on your laptop when developing changes.
You can more easily tell if a target is down.
You can manually go to a target and inspect its health with a web browser.
Overall, we believe that pulling is slightly better than pushing, but it should not be considered a major point when considering a monitoring system.
For cases where you must push, we offer the Pushgateway.
使用 http 拉 模式 及优点
使用 Pushgateway 支持推模式
How to feed logs into Prometheus?
Short answer: Don't! Use something like the ELK stack instead.
Longer answer: Prometheus is a system to collect and process metrics, not an event logging system.
The Raintank blog post Logs and Metrics and Graphs, Oh My! provides more details about the differences between logs and metrics.
Can I create dashboards?
Yes, we recommend Grafana for production usage. There are also Console templates.
Can I change the timezone? Why is everything in UTC?
To avoid any kind of timezone confusion, especially when the so-called daylight saving time is involved,
we decided to exclusively use Unix time internally and UTC for display purposes in all components of Prometheus.
There are a number of client libraries for instrumenting your services with Prometheus metrics.
机器 网络设备 批量任务 监控
Can I monitor machines?
Yes, the Node Exporter exposes an extensive set of machine-level metrics on Linux and other Unix systems such as CPU usage, memory, disk utilization, filesystem fullness, and network bandwidth.
Can I monitor network devices?
Yes, the SNMP Exporter allows monitoring of devices that support SNMP.
Can I monitor batch jobs?
Yes, using the Pushgateway. See also the best practices for monitoring batch jobs.
Can I monitor JVM applications via JMX?
Yes, for applications that you cannot instrument directly with the Java client,
you can use the JMX Exporter either standalone or as a Java Agent.
the list of exporters and integrations.
What is the performance impact of instrumentation?
Performance across client libraries and languages may vary.
For Java, benchmarks indicate that incrementing a counter/gauge with the Java client will take 12-17ns, depending on contention.
This is negligible for all but the most latency-critical code.
Why are all sample values 64-bit floats?
We restrained ourselves to 64-bit floats to simplify the design.
Why don't the Prometheus server components support TLS or authentication?
不支持安全传输 和 身份验证
Adding Basic Auth to Prometheus with Nginx.
非正常关机 恢复模式 启动会慢一些