一、安装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. 【iOS】得到当前年、月、周的第一天和最后一天

    在写一个记账软件,其中有个统计功能.比如,统计某月的支出,需要知道某天所在的月的第一天和最后一天,以便从数据库中根据时间取数据. 话不多说,上代码: // // EBDate.h // ChargeM ...

  2. 虚拟机VMware14 pro下安装REHL5U11

    1. 创建虚拟磁盘,自定义,磁盘类型选IDE,确保安装系统过程中只有一个物理光盘驱动/ISO镜像: 2. 安装VMware Tools 2.1 虚拟机>安装VMware Tools 2.2 在光 ...

  3. js 跳转链接的几种方式

    1.跳转链接 在当前窗口打开 window.location.href="http://www.baidu.com" 等价于 <a href="baidu.com& ...

  4. MongoDB的查询索引

    ​ 目录 为什么要建立索引? 索引的分类有哪些? _id索引 单键索引 多键索引 复合索引 过期索引 hello,今天是万圣节

  5. 《Java语言程序设计》编程练习6.31(财务应用程序:信用卡号的合法性)

    6.31(财务应用程序:信用卡号的合法性)信用卡号遵循下面的模式.一个信用卡号必须是13到16位的整数.它的开头必须是: 4,指Visa卡 5,指Master卡 37,指American Expres ...

  6. Activity的四种加载模式详解:

    先来看看总结图: 模式详解: standard模式: 标准启动模式,也是activity的默认启动模式.在这种模式下启动的activity可以被多次实例化,即在同一个任务中可以存在多个activity ...

  7. 设计模式----行为型模式之命令模式(Command Pattern)

    下面来自head first设计模式的命令模式一章节. 定义 将"请求"封装成对象,以便使用不同的请求.队列或者日志来参数化其他对象.命令模式也支持可撤销的操作. 类图 注: 1. ...

  8. spring boot使用vue+vue-router构建单页面应用

    spring boot http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/ vue https: ...

  9. Window下的VScode快捷键

    转载自4ark 全局 Ctrl + Shift + P, F1 显示命令面板 Ctrl + P 快速打开Ctrl + Shift + N 打开新窗口Ctrl + Shift + W 关闭窗口 基本 C ...

  10. ionic3 浏览器端返回

    首屏component.ts文件中使用setupBrowserBackButtonBehavior() { // Register browser back button action(s) wind ...