首页 运维 网络学院 查看内容

超级好看的windows服务器监控界面--基于prometheus+grafana

2019-10-19 09:57 |来自: 互联网 3206 0

摘要: 概述Prometheus是一个最初在SoundCloud上构建的开源系统监视和警报工具包 。自2012年成立以来,许多公司和组织都采用了Prometheus,该项目拥有一个非常活跃的开发人员和用户社区。它现在是一个独立的开源项目,可以 ...
关键词: Exporter Prometheus windows 采集器 dashboard https grafana 已经 地址 wmi

概述

Prometheus是一个最初在SoundCloud上构建的开源系统监视和警报工具包 。自2012年成立以来,许多公司和组织都采用了Prometheus,该项目拥有一个非常活跃的开发人员和用户社区。它现在是一个独立的开源项目,可以独立于任何公司进行维护。

Prometheus 服务本地已经启动了,接下来,需要安装并运行 Exporter,它的主要作用是持续输出监控的组件信息并格式化,同时提供 Http 接口供 Prometheus 服务来抓取。Exporter 也是通过 GO 语言编写的,Prometheus GitHub 已经为我们提供了很多实用的 Exporter,直接拿来使用即可。

下面介绍一下怎么用prometheus去监控windows服务器。


一、部署Windows采集器(wmi_exporter)

1、下载

开源地址:https://github.com/martinlindhe/wmi_exporter/

下载地址:https://github.com/martinlindhe/wmi_exporter/releases/download/v0.9.0/wmi_exporter-0.9.0-amd64.msi

2、安装

Windows默认9182端口。直接双击安装即可,安装后自动启动。

3、测试访问

访问http://IP:9182/metrics;显示以下数据说明数据采集器安装成功


二、关联Prometheus

Prometheus 和wmi_exporter 服务都已经启动起来了,那么接下来就需要将二者关联起来,让 Prometheus 来定时抓取 Exporter 提供的数据。我们需要修改 Prometheus 的配置文件 prometheus.yml 增加 rabbitmq 相关 exporter job。

- job_name: 接口平台
static_configs:
- targets: ['xx.xx.xx:9182']
labels:
instance: gateway_win

重启容器,隔一会查看targets:


三、grafana配置

1、下载dashboard

在 https://grafana.com/dashboards?search=windows 下载windows相关的dashboard,但是上边提供的dashboard效果不一定好,可以根据需要自己配.

下载地址:https://grafana.com/dashboards/10467

2、导入json

3、展示


后面会分享更多devops和DBA方面内容,感兴趣的朋友可以关注下!


本文出处: https://www.toutiao.com/a6746584492061753867/
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手
1

鲜花

鸡蛋

刚表态过的朋友 (1 人)

最新评论

返回顶部