- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Prometheus 监控 Linux 机器上的网络流量。我看到了几个有用的指标,例如 node_network_receive_bytes_total
、node_network_transmit_bytes_total
和 node_network_receive_errs_total
。当我不知道机器的网络带宽时,如何设置网络流量警报?
最佳答案
您应该使用一些查询来获得良好的网络监控结果。我在 Grafana 上使用了一些查询,并与您分享:
Query-outbound
sum (irate(node_network_transmit_bytes{hostname=~"$hostname", device!~"lo|bond[0-9]|cbr[0-9]|veth.*"}[1m])) by (hostname) > 0
Legend format: {{hostname}} - {{device}} - outbound
Query-inbound
sum (irate(node_network_receive_bytes{hostname=~"$hostname", device!~"lo|bond[0-9]|cbr[0-9]|veth.*"}[1m])) by (hostname) > 0
Legend format: {{hostname}} - {{device}} - inbound
eno(或任何你想要的东西)设备的网络 terafic:
Legend format:
{{hostname}} - ({{device}})_in
irate(node_network_receive_bytes{hostname=~'$hostname',device=~"^en.*"}[5m])*8
Legend format:
{{hostname}} - ({{device}})_out
irate(node_network_transmit_bytes{hostname=~'$hostname',device=~"^en.*"}[5m])*8
网络统计:
Legend format:
{{hostname}} established
node_netstat_Tcp_CurrEstab{hostname=~'$hostname'}
udp 统计:
irate(node_netstat_Udp_InDatagrams{hostname=~"$hostname"}[5m])
irate(node_netstat_Udp_InErrors{hostname=~"$hostname"}[5m])
irate(node_netstat_Udp_OutDatagrams{hostname=~"$hostname"}[5m])
irate(node_netstat_Udp_NoPorts{hostname=~"$hostname"}[5m])
契约(Contract)
Legend format:
Queue Used ({{hostname}})
node_nf_conntrack_entries{hostname=~"$hostname"}/node_nf_conntrack_entries_limit{hostname=~"$hostname"}
请注意主机名。它是 Grafan 上的模板变量。图例格式是 Grafana 上指标的标签解析。
关于linux - 如何使用 Prometheus 在 Linux 机器上设置网络流量警报?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46368241/
我是普罗米修斯的新手。根据我到目前为止所阅读和尝试的内容,Prometheus 客户端库通过 HTTP 公开收集的指标,Prometheus 定期读取(抓取)。 在 Prometheus 抓取指标之前
我们正在寻求实现监控和警报解决方案,我们希望为每个功能单元提供自己的 prometheus 实例。 目前我们通过 prometheus-operator 使用单个 prometheus 实例运行它,但
在 Prometheus 中,有标签柯里化(Currying)。一些示例方法类似于 CurryWith()。 这是什么意思?抱歉,我没有找到这方面的任何文档。 问题可能与英语不是我的母语有关,我从函数
如何编写一个查询来输出过去 24 小时内实例的平均内存使用情况? 以下查询显示当前内存使用情况 100 * (1 - ((node_memory_MemFree + node_memory_Cache
我正在向 prometheus 发送与两个磁盘相关的数据。我想提醒一个磁盘的指标是否停止发送指标。假设我有 diskA 和 diskB,我正在收集 disk_up 指标。现在diskB失败了。在普罗米
我正在考虑将一些指标导出到 Prometheus,但我对我计划做的事情感到紧张。 我的系统由一个工作流引擎组成,我想跟踪工作流中每个步骤的一些指标。这似乎是合理的,有一个名为 wfengine_ste
我想根据 prometheus 值文件中的环境 qa/prod 设置环境特定的值 ## Additional alertmanager container environment variable
我有一个包含路径和状态代码的请求直方图...如果过去一小时内的错误比前一小时增加了 20%,我如何发出警报? 一个指标示例: {instance="someIp",instance_hostname=
我有一个包含路径和状态代码的请求直方图...如果过去一小时内的错误比前一小时增加了 20%,我如何发出警报? 一个指标示例: {instance="someIp",instance_hostname=
像这样的 Prometheus 规则文件: groups: - name: ./example.rules rules: - alert: ExampleAlert expr: vec
我们有多个在数据中心运行的 Prometheus 实例(我将它们称为 DC Prometheus 实例),以及一个额外的 Prometheus 实例(在下面的文本中我们将其称为“主”),我们在其中从
最近 prometheus-operator图表已弃用,图表已重命名 kube-prometheus-stack更清楚地反射(reflect)它安装了 kube-prometheus 项目堆栈,其中
我在 Amazon linux 2 实例上安装了 prometheus,这是我在用户数据中使用的配置: cat /etc/systemd/system/prometheus.service [Uni
我们正在使用 prometheus 运算符,我们现在想将数据存储在磁盘上,有一个博客对此进行了解释,但不确定来自查询的数字/大小响应 https://www.robustperception.io/h
目标 通过 grafana 和 prometheus 跟踪 RPM 和正常运行时间 情况 我们正在使用 django-prometheus -> To emit metrics fluent-bit
我有 Prometheus 从几台机器上的节点导出器中抓取指标,配置如下: scrape_configs: - job_name: node_exporter static_configs
我的 Prometheus 设置中有一个警报,它会在 someMetric > 100 时发送警报已对 5m 有效然后每隔 24h 重新发送警报根据下面的配置: prometheus-alert.ym
我有两个计数器。一个是测量累加器,另一个是测量计数。如何生成范围向量平均值? 我尝试了以下但得到的结果为空。 rate(my_events{type="sum"}[60s]) / rate(my_ev
因为 Prometheus 仅支持文本指标和许多 json 中的工具返回指标(如 Finatra、Spring Boot),所以我创建了一个简单的代理,将 json 转换为文本。因为我想将它用于多个源
Prometheus 是否可以计算指标具有特定值的持续时间(例如以秒为单位)? 一个简单的例子是 up可以有两个值的度量:1或 0指示系统是否正在运行。想象一下,自上周以来,系统多次上下波动。 我希望
我是一名优秀的程序员,十分优秀!