本文使用的 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. Windows 10 启动出现蓝屏 终止代码:UNMOUNTABLE_BOOT_VOLUME

    解决办法:在命令符窗口中[管理员权限] 1.– 修复Windows文件:损坏的Windows文件可能会导致严重的问题. sfc /scannow 2 .– 修复硬盘:确保您的硬盘依次运行,以及Wind ...

  2. Git命令之diff

    工作区(working tree),暂存区(index /stage),本地仓库(repository) git跟不同的参数,比较不同的区间的版本. git diff:是查看working tree与 ...

  3. php之策略模式

    策略模式:封装算法,选择所用具体实现的置业由客户对象承担. 将算法具体类,然后互相替换,不影响客户. <?php /** * 设计模式之策略模式 * User: 小狗蛋儿 * Date: 201 ...

  4. C++变量的存储类型

    C++变量和函数包括两个属性:数据类型和数据的存储类型.存储类型是指数据在内存中存储的方式.变量的存储类型分为四种:自动类型(auto),寄存器类型(register).静态类型(static)外部类 ...

  5. 蒲公英 &#183; JELLY技术周刊 Vol.29: 前端智能化在阿里的那些事

    蒲公英 · JELLY技术周刊 Vol.29 前端智能化是指借助于 AI 和机器学习的能力拓展前端,使其拥有一些超出现阶段前端能力的特性,这将是未来前端方向中一场重要的变革.目前各家互联网厂商都有自己 ...

  6. VMware 虚拟机下CentOS 7连接网络

    查看主机网络配置 ipconfig 1.在centos打开终端命令 2. 输入命令 cd /etc/sysconfig/network-scripts/  进入文件 输入 ls查看此文件夹下的文件 3 ...

  7. 数字取证autopsy系列——保存证据镜像(一)

    简介: 在学习autopsy之前,我们先学习如何将犯罪嫌疑人的磁盘保存为一个证据镜像.我们使用的将磁盘保存为证据镜像的工具为AccessData FTK imager,你可以自行搜索下载. Acces ...

  8. 经典c程序100例==41--50

    [程序41] 题目:学习static定义静态变量的用法 1.程序分析: 2.程序源代码: #include "stdio.h" varfunc() { int var=0; sta ...

  9. 《Machine Learning in Action》—— 剖析支持向量机,优化SMO

    <Machine Learning in Action>-- 剖析支持向量机,优化SMO 薄雾浓云愁永昼,瑞脑销金兽. 愁的很,上次不是更新了一篇关于支持向量机的文章嘛,<Machi ...

  10. AI时代,还不了解大数据?

    如果要问最近几年,IT行业哪个技术方向最火?一定属于ABC,即AI + Big Data + Cloud,也就是人工智能.大数据和云计算. 这几年,随着互联网大潮走向低谷,同时传统企业纷纷进行数字化转 ...