本文使用的 Prometheus 版本为 2.22.0,node exporter 版本为 1.0.1;部署在 Linux 服务器
Prometheus 是开源的监控报警系统和时序列数据库 (TSDB);node exporter 用来监控服务器CPU、内存、磁盘、I/O等信息

一、node exporter

node exporter 下载地址:https://prometheus.io/download/#node_exporter,下载 node_exporter-1.0.1.linux-amd64.tar.gz
执行命令:

tar -xzvf node_exporter-1.0.1.linux-amd64.tar.gz
nohup ./xx/node_exporter-1.0.1.linux-amd64/node_exporter >/dev/null 2>&1 &
`

其中 xx 为自定义目录
默认端口为 9100

二、Prometheus

Prometheus 下载地址:https://prometheus.io/download/#prometheus,下载 prometheus-2.22.0.linux-amd64.tar.gz
执行命令:

tar -xzvf prometheus-2.22.0.linux-amd64.tar.gz

在 prometheus.yml 文件末尾添加:

scrape_configs:
... ...
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']

启动 Prometheus:

nohup /xx/prometheus-2.22.0.linux-amd64/prometheus \
--config.file=/xx/prometheus-2.22.0.linux-amd64/prometheus.yml \
--storage.tsdb.path=/xx/data/prometheus \
--storage.tsdb.retention=7d \
/dev/null 2>&1 &

其中 xx 为自定义目录
默认端口为 9090

三、在 Grafana 中添加数据源与看板

3.1. 添加数据源

  1. 登录 Grafana,在 Configuration > Data Sources 点击 “Add data source” 按钮,选中 Prometheus
  2. URL 填入 http://localhost:9090,并保存

    3.2. 添加看板

  3. 在 “+” 点击 “Import”
  4. 在 “Import via grafana.com” 下面的输入框,输入 8919,然后点击”Load”按钮
  5. 在 Dashboards 即可看到面板列表
    关于 8919 的解释:
    Grafana 官网有已经可以直接使用的 dashboard,地址:https://grafana.com/grafana/dashboards 输入对应的 id 即可添加

Prometheus 使用之 node exporter的更多相关文章

  1. Prometheus Node_exporter 之 Node Exporter

    Node Exporter 1. Node Exporter Scrape Time type: GraphUnit: secondsLabel: Seconds{{collector}} - 各个收 ...

  2. Prometheus + Node Exporter + Grafana 监控主机运行信息

      上一篇文章中讲了如何利用Prometheus和Grafana监控SpringBoot应用的JVM信息,这次就来看看如何监控 服务器运行状态,先列出用到的工具: Prometheus node_ex ...

  3. Prometheus exporter的Node exporter是可以独立安装,用来测试的

    现在慢慢在把prometheus operator的一些概念组织完整. https://github.com/coreos/prometheus-operator/tree/master/contri ...

  4. Prometheus 集成 Node Exporter

    文章首发于公众号<程序员果果> 地址:https://mp.weixin.qq.com/s/40ULB9UWbXVA21MxqnjBxw 简介 Prometheus 官方和一些第三方,已经 ...

  5. 【开源监控】Prometheus+Node Exporter+Grafana监控linux服务器

    Prometheus Prometheus介绍 Prometheus新一代开源监控解决方案.github地址 Prometheus主要功能 多维 数据模型(时序由 metric 名字和 k/v 的 l ...

  6. [k8s]prometheus+grafana监控node和mysql(普罗/grafana均vm安装)

    https://github.com/prometheus/prometheus Architecture overview Prometheus Server Prometheus Server 负 ...

  7. Prometheus 监控K8S Node监控

    Prometheus 监控K8S Node监控 Prometheus社区提供的NodeExporter项目可以对主机的关键度量指标进行监控,通过Kubernetes的DeamonSet可以在各个主机节 ...

  8. Node Exporter监控指标

    访问http://localhost:9100/metrics,可以看到当前node exporter获取到的当前主机的所有监控数据,如下所示: 每一个监控指标之前都会有一段类似于如下形式的信息: # ...

  9. node exporter

    在prometheus中负责数据汇报的程序统一叫做exporter; 负责主机信息收集的node_exporter 可以利用prometheus的static_configs来拉取node_expor ...

随机推荐

  1. cenos7 u disk install

    分类:             其他              2014-08-24 13:53     3406人阅读     评论(0)     收藏     举报 CentOS安装教程操作系统 ...

  2. 微信小程序获取高宽uniapp

    代码片段 <template> <view> <view class="text" id="w">补充文字</view ...

  3. swjtuoj2433 Magic Mirror

    描述 Magic Mirror is an artificial intelligence system developed by TAL AI LAB,It can determine human ...

  4. Thinkphp3.2 cms之文章模块

    二.文章模块 <?php namespace Admin\Controller; use Think\Controller; class NewController extends Common ...

  5. thinkPHPbiji

    ThinkPHP3.2验证码操作 在当前的控制器内 我这里是登录后台控制器 class LoginController extends Controller { public function ind ...

  6. tensorflow的广播机制

    TensorFlow支持广播机制(Broadcast) TensorFlow支持广播机制(Broadcast),可以广播元素间操作(elementwise operations).正常情况下,当你想要 ...

  7. Flink的sink实战之四:自定义

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  8. IL角度理解for 与foreach的区别——迭代器模式

    IL角度理解for 与foreach的区别--迭代器模式 目录 IL角度理解for 与foreach的区别--迭代器模式 1 最常用的设计模式 1.1 背景 1.2 摘要 2 遍历元素 3 删除元素 ...

  9. linux学习,c语言头文件分类总结

    1.includee 称为文件包含命令,其意义是把尖括号""或引号<>内指定的文件包含到本程序来,成为本程序的一部分.被包含的文件通常是由系统提供的,其扩展名为.h.因 ...

  10. Shodan搜索引擎详解及Python命令行调用

    shodan常用信息搜索命令 shodan配置命令 shodan init T1N3uP0Lyeq5w0wxxxxxxxxxxxxxxx //API设置 shodan信息收集 shodan myip ...