一、安装wmi-exporter

首先在需要监控的Windows机器上安装wmi_exporter。wmi_exporter下载地址:https://github.com/martinlindhe/wmi_exporter/releases

下载后,双击即可完成安装。

完成安装后,会自动创建一个开机自启的服务

验证服务是否启动,默认wmi-exporter端口为9182

浏览器访问  http://192.168.56.1:9182/metrics  (Windows系统IP地址:9182端口),显示数据,则服务开启成功。

二、修改Prometheus配置

进入Prometheus的安装文件夹,打开Prometheus配置文件

#  cd /usr/local/prometheus
# vim prometheus.yml

在scrape_configs标签下,添加以下内容,配置监控

- job_name: 'Windows'
static_configs:
- targets: ['192.168.56.1:9182']
labels:
instance: Windows

以下是Prometheus.yml 文件全部内容

# my global config
global:
scrape_interval: 15s # Set the scrape interval to every seconds. Default is every minute.
evaluation_interval: 15s # Evaluate rules every seconds. The default is every minute.
# scrape_timeout is set to the global default (10s). # Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager: # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus' # metrics_path defaults to '/metrics'
# scheme defaults to 'http'. static_configs:
- targets: ['localhost:9090'] - job_name: 'Linux'
static_configs:
- targets: ['192.168.56.201:9100']
labels:
instance: Linux - job_name: 'Windows'
static_configs:
- targets: ['192.168.56.1:9182']
labels:
instance: Windows

保存退出,重启Prometheus服务

#  systemctl restart prometheus

浏览器访问 http://192.168.56.200:9090/targets  查看监控信息

可以看到,Windows机器已经加入进来。

三、配置Grafana

添加dashboard

Grafana官方为我们提供了很多dashboard页面,可直接下载使用。浏览器访问 https://grafana.com/grafana/dashboards 下载所需要的dashboard页面

此处我们使用Windows 监控的dashboard,dashboard Id为:10467

然后打开我们的Grafana监控页面,打开dashboard的管理页面

点击【import】按钮

然后将我们刚才的dashboard Id (10467) 复制进去

Grafana会自动识别dashboard Id 。

然后点击【change】按钮,生成一个随机的UID,然后点击下方输入框,选择我们之前创建的数据源Prometheus,最后点击【Import】按钮,即可完成导入。

导入成功后,会自动打开该Dashboard,即可看到我们刚才设置好的Windows监控

至此Prometheus监控Windows机器,配置完成。

Prometheus(二):Prometheus 监控Windows机器的更多相关文章

  1. 【转】open-falcon监控windows机器

    open-falcon监控windows机器 时间:2016-05-22 15:34:04   来源:眷恋江南   编辑:涛涛   点击:791   A-A+     最近公司上线了一款新的游戏,用的 ...

  2. Docker下实战zabbix三部曲之二:监控其他机器

    在上一章<Docker下实战zabbix三部曲之一:极速体验>中,我们快速安装了zabbix server,并登录管理页面查看了zabbix server所在机器的监控信息,但是在实际场景 ...

  3. Prometheus笔记(二)监控go项目实时给grafana展示

    欢迎加入go语言学习交流群 636728449 Prometheus笔记(二)监控go项目实时给grafana展示 Prometheus笔记(一)metric type 文章目录 一.promethe ...

  4. Grafana+Prometheus通过node_exporter监控Linux服务器信息

    Grafana+Prometheus通过node_exporter监控Linux服务器信息 一.Grafana+Prometheus通过node_exporter监控Linux服务器信息 1.1nod ...

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

    原因是prometheus缺少以下紫色框的部分 解决办法: 比如要监控的机器ip为172.16.12.7,机器内部 安装了telegraf. 1)先查看机器的网卡:ifconfig 发现ip地址位于网 ...

  6. prometheus+grafana实现监控过程的整体流程

    prometheus安装较为简单,下面会省略安装步骤: 一.服务器启动 Prometheus启动 ./prometheus --config.file=prometheus.yml Grafana启动 ...

  7. linux(centos8):prometheus使用mtail监控错误日志

    一,mtail的用途? mtail :从应用程序日志中提取指标以导出到时间序列数据库或时间序列计算器 它是一个google开发的日志提取工具,用途就是: 实时读取应用程序的日志. 再通过自己编写的脚本 ...

  8. Spring Boot 微服务应用集成Prometheus + Grafana 实现监控告警

    Spring Boot 微服务应用集成Prometheus + Grafana 实现监控告警 一.添加依赖 1.1 Actuator 的 /prometheus端点 二.Prometheus 配置 部 ...

  9. Prometheus+Grafana+kafka_exporter监控kafka

    Prometheus+Grafana+kafka_exporter搭建监控系统监控kafka 一.Prometheus+Grafana+kafka_exporter搭建监控系统监控kafka 1.1K ...

随机推荐

  1. setInterval、setTimeout之遗忘的第三个参数

    今天看阮一峰老师的ES6入门,在一个关于promise的小demo里,老师用到了setTimeout的第三个参数,惊了有没有,定时器还有第三个参数? 喏就是下面这个demo: function tim ...

  2. java自学小测试 九九乘法表

    public class Ninenine { public static void main(String[] args) { for(int i=1;i<=9;i++){ for(int j ...

  3. Spring boot 梳理 - Spring boot自动注册DispatcherServlet

    spring boot提供的DispatcherServlet的name就是“dispatcherServlet”. 源码 public ServletRegistrationBean dispatc ...

  4. Ceph 的 'MAX AVAIL' 和 数据平衡 - Storage 6

    1. 客户环境 节点数量:4个存储节点 OSD数量:每个节点10块8GB磁盘,总共 40 块OSD Ceph 版本: Storage 6 使用类型:  CephFS 文件 CephFS数据池:  EC ...

  5. Jquery Ztree异步加载树

    1. 下载jquery的JS文件/ztree的CSS文件和JS文件 https://jquery.com/download/ https://gitee.com/zTree/zTree_v3/tree ...

  6. 短视频处理LanSoEditor-SDK之功能介绍

    短视频处理LanSoEditor-SDK之功能介绍  (注释: 我们的SDK每3周更新一次, 一下功能是在2.8.2版本上列出的,可能不是最新的功能, 请知悉) 和别家最大的不同在于: 别人提供功能, ...

  7. Java利用反射排序

    前言 Java为我们提供了几种排序得方法,比如Arrays和Collections类,但是前提是数组或者集合中的元素都必须实现Comparable接口,基本的数据类型都已经实现了Comparable接 ...

  8. ES 32 - Elasticsearch 数据建模的探索与实践

    目录 1 什么是数据建模? 2 如何对 ES 中的数据进行建模 2.1 字段类型的建模方案 2.2 检索.聚合及排序的建模方案 2.3 额外存储的建模方案 3 ES 数据建模实例演示 3.1 动态创建 ...

  9. jobs后台任务

    前台作业:占据了命令提示符,就是你当前可以操作的作业后台作业:启动之后,释放命令提示符,后续的操作在后台完成 前台——>后台 ctrl+z:把正在前台的作业送往后台,这时作业的状态是暂停. CO ...

  10. ServiceStack.Redis高效封装和简易破解

    1.ServiceStack.Redis封装 封装的Redis操作类名为RedisHandle,如下代码块(只展示部分代码),它的特点: 1)使用连接池管理连接,见代码中的PooledClientMa ...