prometheus+telegraf无法监控网络流量的问题

原因是prometheus缺少以下紫色框的部分

 解决办法:

比如要监控的机器ip为172.16.12.7,机器内部 安装了telegraf。

1)先查看机器的网卡:ifconfig

 发现ip地址位于网卡:enp5s0上

2)打开/etc/telegraf/telegraf.conf,添加紫色框部分

3)重启telegraf服务

原文地址:https://www.cnblogs.com/boshen-hzb/p/9803089.html